Four Pillars MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Four Pillars MCP Server Calculate BaZi pillars for 1990-05-20 14:30 Asia/Shanghai, longitude 104.0668"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Four Pillars MCP Server
An MCP server for deterministic BaZi (八字) Four Pillars calculation from a local date, time, IANA timezone, and longitude.
Built for transparent calendrical and software workflows that need year, month, day, and hour pillars without address geocoding, gender-dependent luck cycles, stored birth data, or automated interpretation.
Why this is useful
Coordinates in, no hidden location lookup. Callers pass the timezone and longitude they already trust.
True solar time included. Day and hour calculations use local apparent solar time; the response exposes the correction details.
Solar-term aware. Year and month use astronomical solar-term boundaries.
Facts before interpretation. The tool returns versioned chart facts, not guaranteed predictions.
Related MCP server: OpenFate Bazi MCP
Tool
calculate_four_pillars
Input:
{
"date": "1990-05-20",
"time": "14:30",
"timezone": "Asia/Shanghai",
"longitude": 104.0668,
"latitude": 30.5728
}The calculation uses:
local apparent true solar time for day and hour calculations;
astronomical solar-term boundaries for year and month;
23:00 Zi-hour as the next-day boundary;
explicit engine and rules versions in every result.
The result contains the year, month, day, and hour pillars, stem and branch elements, yin-yang labels, Day Master, time correction details, nearby solar-term information, warnings, and provenance.
Quick start
git clone https://github.com/cdaily1995-create/four-pillars-mcp.git
cd four-pillars-mcp
pnpm install
pnpm build
node dist/server.jsMCP client configuration:
{
"mcpServers": {
"four-pillars": {
"command": "node",
"args": ["/absolute/path/to/four-pillars-mcp/dist/server.js"]
}
}
}Example
calculate_four_pillars {
"date": "2005-12-23",
"time": "08:37",
"timezone": "Asia/Shanghai",
"longitude": 121.4737,
"latitude": 31.2304
}The response contains the four pillar names, stem and branch elements, yin-yang labels, Day Master, true-solar correction details, nearby solar-term information, warnings, and engine/rules versions.
Input contract
Field | Required | Description |
| yes | Local civil date in |
| yes | Local civil time in |
| yes | IANA identifier such as |
| yes | Decimal degrees, east positive, from |
| no | Decimal degrees, from |
Links
BaZi Calculator — the public calculator project for Four Pillars workflows.
Free chart entry — the public chart route.
Four Pillars of Destiny guide — terminology and context.
What is a BaZi chart? — beginner-friendly explanation.
True Solar Time MCP Server — the companion standalone time-normalization tool.
MCP specification — protocol documentation.
MCP TypeScript server SDK — server SDK used by this project.
tyme4ts on npm — calendar and solar-term dependency.
Search-friendly description
This project is a Four Pillars of Destiny calculator for BaZi birth-chart normalization. It provides reproducible year, month, day, and hour pillars from date, time, timezone, and longitude, including true solar time and solar-term handling. It is intended for calendrical and software workflows that need transparent calculation facts rather than automated fortune-telling claims.
Privacy and scope
The server accepts coordinates and time-zone identifiers only. There is no address search, analytics, database, account, payment, or remote API requirement. Results are calculated locally by the process running the MCP server.
Traditional BaZi meanings are culturally interpretive and are not presented here as scientific proof, diagnosis, or guaranteed prediction.
License
MIT
Available Tools
1 toolcalculate_four_pillarsARead-onlyIdempotent
Calculate the BaZi (Four Pillars) chart from a local birth date, time, IANA timezone, and decimal longitude. The calculation uses local apparent true solar time, astronomical solar-term boundaries, and the 23:00 Zi-hour next-day boundary. Returns only reproducible chart facts and provenance, not interpretation or prediction.
Inputs: date (required), time (required), timezone (required), longitude (required), +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 1 tool
With only one tool in the set, there is no possibility of misselection or overlap. The tool's purpose (compute a BaZi chart from birth data) is unambiguous and clearly stated.
The single name calculate_four_pillars follows a clean verb_noun snake_case convention. There is no competing convention to create inconsistency.
One tool is on the thin side even for a narrowly scoped domain. The server is defensible as a single-purpose calculator, but a single operation gives an agent no alternative entry points.
The core calculation is covered, but the surface stops there. Useful companions such as solar-term lookup, current-pillar calculation, or input validation (timezone/longitude checks) are absent, leaving dead ends for follow-up questions.
Maintenance
Related MCP Connectors
InsightBaZi exposes a public, read-only MCP tool (`calculate_bazi_chart`) that calculates BaZi pillars, hidden stems, Ten Gods, and Five Elements from birth inputs. Birth date and an IANA time zone are required. Recorded birth time, birthplace longitude, a birthplace display label, gender, and one of ten supported languages are optional. The birthplace label is for display; it does not look up coordinates. With a birth time, the tool returns all Four Pillars and true solar time, using the supplied longitude or an estimated time-zone meridian when longitude is omitted. Without a birth time, it returns Year, Month, and Day Pillars only, assumes a birth before 23:00 for the Day Pillar, and omits true solar time and luck pillars. Luck pillars require both birth time and gender. Historical daylight-saving offsets are derived automatically from the IANA time zone and birth date/time; there is no separate DST input, and the recorded time should not be pre-adjusted. Supported languages are English, Simplified Chinese, Traditional Chinese, Japanese, Korean, Thai, Indonesian, Spanish, Portuguese, and French. No authentication is required.
Bazi (Four Pillars) and Qimen Dunjia charts with true solar time and historical time zones.
Cast a BaZi (Four Pillars) chart with true solar time, plus a reflective personality sketch.
BaZi (Four Pillars) and Zi Wei Dou Shu chart calculation with true solar time. No install or login.
1
Related MCP Servers
- FlicenseNot gradedqualityNot gradedmaintenanceCalculates Chinese BaZi (Four Pillars of Destiny) charts based on birth date, time, and location, including solar term information, decade luck cycles, and true solar time corrections.2-

OpenFate Bazi MCPofficial
AlicenseAqualityBmaintenanceEnables AI agents to calculate deterministic Bazi (Four Pillars) charts with True Solar Time and Earthly Branch interactions, avoiding LLM hallucination of calendrical math.6181 npm162MIT- AlicenseNot gradedqualityCmaintenanceProvides precise Chinese metaphysics chart calculation (Bazi, Ziwei, Qimen) with true solar time correction, outputting structured JSON and Markdown for AI integration.3MIT
- AlicenseNot gradedqualityCmaintenanceEnables calculation of Four Pillars of Destiny (BaZi) charts using true solar time and a global geographic database, providing pillars, Da Yun, and branch interactions for any location and time.36 npm1MIT