Freebazi

io.github.alexsu1212Published by GitHub account alexsu1212v1.0.1Updated Oct 27, 2026

Offline Bazi (八字, Four Pillars) chart: True Solar Time, Ten Gods, Shen Sha, luck pillars.

VerifiedSTDIODesktop only

Overview

AI-generated overview

Offline MCP server that computes a full Chinese Bazi (Four Pillars) chart from a birth date, time and city, with True Solar Time correction.

What you can do
  • Compute a complete Bazi chart from birth date, clock time, gender and city or longitude/UTC offset, with options for unknown time, True Solar Time, day and year boundaries
  • Return the Four Pillars, Day Master, Ten Gods, hidden stems, Na Yin, Twelve Growth Stages, Five Elements distribution, Shen Sha and branch relations
  • Return luck pillars with the current period flagged, plus the current year's pillar and a link to the interactive chart on freebazi.com
  • Search about 490 major world cities by English or Chinese name and get country, longitude and IANA time zone for use in the chart calculation
When to use it
Useful when you want an assistant to produce a structured Bazi chart for a birth moment, or to look up a city's coordinates and time zone before charting. It suits reflective or cultural interest in Four Pillars analysis rather than event prediction.
Requirements
Runs locally as an npm package via npx; requires Node.js 18 or later. No API key, account or network access is needed for the calculation itself.
Before you install
The server handles birth date, time, gender and birthplace, which are personal data; it runs locally and the README states it makes no network calls. The README notes the tool describes a chart and does not predict events, so results should not be treated as forecasts.

Installation

In SourceWeft

  1. Open Freebazi in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

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

Install

Requires Node.js 18+.

Run directly with npx:

bash
npx freebazi-mcp

Claude Desktop

Add to your claude_desktop_config.json:

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.

ArgumentTypeNotes
year, month, daynumberBirth date
hour, minutenumberLocal clock time as recorded (omit if timeUnknown)
gender"male" | "female"Needed for luck-pillar direction
citystringe.g. "Taipei", "New York". Resolved to longitude + time zone for True Solar Time
longitude, utcOffsetnumberAlternative to city
timeUnknownbooleanHour pillar becomes tentative
trueSolarTimebooleanDefault true
dayRule"zi23" | "midnight"Day boundary, default 23:00
yearRule"lichun" | "cny"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

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 執行:

bash
npx freebazi-mcp

Claude Desktop 及其他 MCP 客戶端(Cline、Continue、Cursor 等)的設定與上方英文段相同。

工具

  • compute_bazi_chart:排出完整命盤,參數見上方英文表格。
  • search_cities:以中文或英文搜尋約 490 個世界主要城市,回傳國家、經度與 IANA 時區,方便傳給 compute_bazi_chart。

連結

八字是一套用於反思性格、傾向與時機的傳統框架。本工具只描述命盤,不預測具體事件。

Source: README.md at commit a8ea1f7

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v1.0.1LatestSep 16, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts