freebazi-mcp
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., "@freebazi-mcp Compute Bazi chart for a male born June 15 1990 at 9:30 AM in New York"
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.
freebazi-mcp
English | 繁體中文
A Model Context Protocol server that computes a full Chinese Bazi (八字, Four Pillars of Destiny) chart from a birth date, time, and place.
It wraps the same calculation engine that powers freebazi.com: an offline engine that corrects for True Solar Time and historical daylight saving, and is cross-validated against established Bazi libraries. No API key, no network calls, everything runs locally.
What it returns
Give it a birth moment and a city, and compute_bazi_chart returns:
The Four Pillars (Year, Month, Day, Hour), each as a Heavenly Stem and Earthly Branch
Your Day Master (日干) and the Ten Gods (十神) of every character
Hidden Stems (藏干), Na Yin (纳音), and the Twelve Growth Stages (十二长生)
Five Elements distribution, both visible and including hidden stems
Shen Sha (神煞) and branch relations (合冲刑害)
Luck Pillars (大运) with the current period flagged, and the current year's pillar
A link to the full interactive chart on freebazi.com
Related MCP server: Bazi (Eight Characters) Calculation MCP Server
Install
Requires Node.js 18+.
Run directly with npx:
npx freebazi-mcpClaude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"freebazi": {
"command": "npx",
"args": ["-y", "freebazi-mcp"]
}
}
}Other MCP clients (Cline, Continue, Cursor, etc.) take the same command / args.
Tools
compute_bazi_chart
Compute a full chart.
Argument | Type | Notes |
| number | Birth date |
| number | Local clock time as recorded (omit if |
|
| Needed for luck-pillar direction |
| string | e.g. |
| number | Alternative to |
| boolean | Hour pillar becomes tentative |
| boolean | Default |
|
| Day boundary, default 23:00 |
|
| Year boundary, default Li Chun |
search_cities
Search about 490 major world cities by English or Chinese name. Returns each match's country, longitude, and IANA time zone, so you can pass an exact city to compute_bazi_chart.
Example
Compute the Bazi chart for someone born 15 June 1990, 9:30 AM, in New York.
The server resolves New York, applies True Solar Time (9:30 AM becomes 8:34 AM, 56 minutes earlier, which shifts the Hour pillar), and returns the four pillars 庚午 壬午 辛亥 壬辰 with a Xin (辛) yin Metal Day Master, all Ten Gods, elements, luck pillars, and more.
Accuracy and honesty
Solar-term boundaries are computed from the sun's apparent longitude with standard astronomical formulas, and time zones (including historical daylight saving) are resolved from the IANA database. The engine's four pillars match established libraries character for character across thousands of test charts.
Bazi is a traditional framework for reflection on temperament, tendencies, and timing. This tool describes a chart; it does not predict events.
Links
Interactive calculator, guides, and full charts: freebazi.com
What Bazi is and how to read it: freebazi.com/what-is-bazi
How a Bazi chart is built: freebazi.com/bazi-chart
The Five Elements (Wu Xing): freebazi.com/chinese-elements
What a Day Master is: freebazi.com/day-master
The Ten Gods explained: freebazi.com/ten-gods
Credits
City data from GeoNames (CC BY 4.0). Simplified to Traditional conversion via OpenCC.
License
MIT
繁體中文
一個 Model Context Protocol 伺服器,依出生的日期、時間與地點,排出完整的八字(四柱)命盤。
它使用與 freebazi.com 相同的排盤引擎:完全離線,會校正真太陽時與歷史上的日光節約時間,並和主流八字程式庫逐字對拍。無需 API key、不連網,全部在本機執行。
回傳內容
給它一個出生時刻與城市,compute_bazi_chart 會回傳:
四柱(年、月、日、時),每柱含天干與地支
日干與每個字的十神
藏干、納音、十二長生
五行分布(含藏干與不含藏干兩種)
神煞與地支刑沖合害
大運(標出當前運)與當年流年
一條連往 freebazi.com 完整互動命盤的連結
安裝
需要 Node.js 18+。直接以 npx 執行:
npx freebazi-mcpClaude Desktop 及其他 MCP 客戶端(Cline、Continue、Cursor 等)的設定與上方英文段相同。
工具
compute_bazi_chart:排出完整命盤,參數見上方英文表格。search_cities:以中文或英文搜尋約 490 個世界主要城市,回傳國家、經度與 IANA 時區,方便傳給compute_bazi_chart。
連結
免費八字排盤與命盤:freebazi.com/zh-hant
英文版與說明頁:freebazi.com
八字是一套用於反思性格、傾向與時機的傳統框架。本工具只描述命盤,不預測具體事件。
Available Tools
2 toolscompute_bazi_chartCompute a Bazi (Four Pillars) chartA
Compute a full Chinese Bazi (八字, Four Pillars of Destiny) chart from a birth date, time, and place. Returns the four pillars, Day Master, Ten Gods, Hidden Stems, Five Elements, Na Yin, Growth Stages, Shen Sha, branch relations, Luck Pillars, and the current year, computed with True Solar Time and historical daylight-saving handling. Provide a birth city (use search_cities to resolve it) for accurate true solar time, or pass longitude and utcOffset directly.
Inputs: day (required), year (required), month (required), gender (required), +9 more.
search_citiesSearch birth citiesA
Search the built-in city list (about 490 major world cities) by English or Chinese name. Returns matches with their country, longitude, and IANA time zone, so you can pass an exact city to compute_bazi_chart for accurate True Solar Time.
Inputs: query (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
The two tools have completely distinct purposes: one searches for cities and the other computes a Bazi chart. There is no overlapping functionality, and the reference from compute_bazi_chart to search_cities makes the intended workflow clear.
Both tool names follow a consistent snake_case verb_noun pattern: search_cities and compute_bazi_chart. The names are descriptive, predictable, and aligned with their actions.
Two tools is slightly below the typical 3-15 range, but the narrow domain of Bazi chart computation is well served by a single core computation tool plus a supporting city search utility. The count feels minimal but not inadequate for this purpose.
The tool surface fully covers the stated purpose: resolving a birth location via search_cities and computing a comprehensive Bazi chart via compute_bazi_chart. The returned chart includes the major Bazi components, luck pillars, and current year, leaving no obvious dead ends or missing core capabilities.
Maintenance
Related MCP Connectors
Accurate BaZi (Four Pillars) charts with time zones, DST, True Solar Time and solar terms.
Hosted remote MCP server for BaZi (Four Pillars) charts and the Chinese almanac. No install.
Free Qimen Dunjia and BaZi charts via MCP - deterministic engine, nine palaces and four pillars.
Bazi (Four Pillars) and Qimen Dunjia charts with true solar time and historical time zones.
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-
- AlicenseNot gradedqualityDmaintenanceProvides professional Chinese astrology calculations including Four Pillars, Five Elements, zodiac signs, and lunar calendar details. It allows users to perform accurate Bazi analysis with global timezone support directly within MCP-compatible clients.18 npm10MIT
- AlicenseAqualityCmaintenanceMCP server for computing BaZi (Four Pillars) charts. Supports Gregorian, lunar, or direct Four Pillars input, with optional true solar time correction, and outputs strength, pattern, and useful god.1Apache 2.0
- 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.43 npm1MIT