Overview
What is Bazi?
Bazi is a MCP server that integrates with the Yuanfenju (缘分居) API, a platform for traditional Chinese Bazi (八字) fortune‑telling calculations. It is intended for developers who want to expose Bazi‑related functionality through the Model Context Protocol.
How to use Bazi?
Configure the server in your MCP client’s mcpServers block by setting the command path and an API_KEY environment variable. Then build the server using the provided build.sh (Linux/macOS) or build.bat (Windows) script, which generates platform‑specific binaries in the dist/ directory.
Key features of Bazi
- Integrates with the Yuanfenju Bazi API
- Cross‑platform builds (Mac Intel, Arm64; Windows amd64, ARM64, 386; Linux amd64, ARM64, ARMv7, 386)
- Simple build scripts for Linux/macOS (
build.sh) and Windows (build.bat) - Requires only an API key for authentication
- Outputs compiled binaries to the
dist/directory - Supports all major operating systems and architectures
Use cases of Bazi
—
FAQ from Bazi
How do I configure Bazi in my MCP client?
Add a bazi entry under mcpServers with the command path to the built binary and an API_KEY environment variable obtained from the Yuanfenju API documentation.
How do I build Bazi?
Run ./build.sh on Linux/macOS or build.bat on Windows. Both scripts produce binaries for multiple platforms and architectures.
Where are the build outputs placed?
All compiled binaries are placed in the dist/ directory after running the build script.
Which platforms are supported?
Bazi supports Mac (Intel and Apple Silicon), Windows (64‑bit, ARM64, and 32‑bit), and Linux (amd64, ARM64, ARMv7, and 32‑bit).
What is the API endpoint used by Bazi?
The server uses the Yuanfenju API, documented at https://doc.yuanfenju.com.