Freebazi logo

Freebazi

Computes offline Bazi charts with True Solar Time, historical DST, luck pillars, Ten Gods, and city lookup.

Install Freebazi

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "freebazi": {
      "command": "npx",
      "args": [
        "-y",
        "freebazi-mcp"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Automated check passed— started and listed 2 tools correctly (15d ago).

Overview

The freebazi MCP server computes Chinese Bazi (Four Pillars) charts locally from a birth date, time, gender, and place. It applies True Solar Time, historical daylight-saving rules, and configurable day and year boundaries without API keys or network calls. Use `search_cities` to resolve a city, then pass the result to `compute_bazi_chart` for a detailed chart. Reach for it when an MCP client needs reproducible offline Bazi calculations rather than event prediction.

Use cases

  • Compute a Four Pillars chart from a birth date, time, and city
  • Resolve a city to longitude and IANA time-zone data
  • Compare charts using True Solar Time and different day boundaries
  • Inspect Ten Gods, Five Elements, Shen Sha, and luck pillars locally

Key features

  • Offline Bazi chart calculation
  • True Solar Time correction
  • Historical daylight-saving adjustment
  • Ten Gods, hidden stems, and Five Elements
  • Luck pillars and current-year pillar
  • English and Chinese city search

Tools2

What Freebazi lets your agent do. Expand a tool for its parameters.

Verified live~675 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked 2d ago

Recent health check succeeded.

4/4 checks healthy over the last 42d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 17h ago via OSV.dev · freebazi-mcp (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

Last commit1mo agoMost recent push to the default branch.
Availability100%Our rolling endpoint + install checks that succeeded.
Install checkPassedOur sandbox started it and listed its tools.
Tools exposed2Callable tools this server registers over MCP.
Directory activity3 viewsConfig copies, upvotes, and views on AllMCPs.

How Freebazi works

What the freebazi MCP server does

The freebazi MCP server calculates a complete Chinese Bazi chart from a recorded birth moment and location. Its output covers the Year, Month, Day, and Hour pillars, with each pillar represented by a Heavenly Stem and Earthly Branch. It also identifies the Day Master and assigns the Ten Gods across the chart.

The result includes hidden stems, Na Yin, the Twelve Growth Stages, and Five Elements distributions both with and without hidden stems. Additional sections report Shen Sha, branch relationships such as combinations, clashes, punishments, and harms, plus the luck-pillar sequence, the currently active period, and the current year's pillar. The response also contains a link to a corresponding interactive chart on freebazi.com.

How it works

The calculation engine runs on the local machine and does not require an API key or network access. It adjusts the supplied local clock time using the location's longitude and time-zone data to calculate True Solar Time. Historical daylight-saving rules are also considered through IANA time-zone data.

Solar-term boundaries use the Sun's apparent longitude. The project states that its Four Pillars have been compared character by character with established Bazi libraries across thousands of test charts. These calculations describe a traditional chart for reflection on temperament, tendencies, and timing; they are not presented as predictions of specific events.

Setup and configuration

Node.js 18 or newer is required. Start the server directly with:

Terminal
npx freebazi-mcp

For Claude Desktop, add an MCP entry whose command is npx and whose argument list contains -y and freebazi-mcp. The README gives the same command-and-arguments pattern for Cline, Continue, Cursor, and other MCP clients that support stdio servers.

compute_bazi_chart accepts numeric year, month, day, hour, and minute values, plus a required gender of male or female for determining luck-pillar direction. Supply either a city or explicit longitude and utcOffset. Set timeUnknown when the birth hour is unavailable; in that case, the Hour pillar is tentative. trueSolarTime defaults to enabled. The dayRule can use a 23:00 or midnight boundary, while yearRule can use Li Chun or Chinese New Year.

Tools and capabilities

  • compute_bazi_chart: Produces the full chart from birth and location inputs.
  • search_cities: Searches roughly 490 major cities by English or Chinese name and returns the country, longitude, and IANA time zone for each match.

A typical workflow is to search for the exact city first, then use its location information when requesting the chart. Alternatively, callers can provide longitude and UTC offset directly. The city lookup is useful when a place name could match more than one location.

Limitations and notes

The city index covers about 490 major world cities rather than every locality. An unknown birth time makes the Hour pillar tentative. Gender is required for luck-pillar direction. The server calculates and describes charts; it does not claim to forecast events. The package is licensed under MIT, and its city data is credited to GeoNames under CC BY 4.0.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Freebazi

freebazi is an MCP server that connects an AI client to a local Chinese Bazi calculation engine. Its main tools are `compute_bazi_chart`, which generates Four Pillars charts with True Solar Time, Ten Gods, elements, Shen Sha, and luck pillars, and `search_cities`, which resolves supported cities.

Install and run it with Node.js 18 or newer by executing `npx freebazi-mcp`. For Claude Desktop and compatible MCP clients, configure `npx` as the command and pass `-y freebazi-mcp` as the arguments.

Yes, freebazi works with Cursor through the standard `command` and `args` MCP configuration. Set the command to `npx` and pass `-y` and `freebazi-mcp` as arguments.

Use `search_cities` with an English or Chinese city name. It returns matching countries, longitudes, and IANA time zones, which you can use to choose an exact city for `compute_bazi_chart`.

Yes, set `timeUnknown` when the birth hour is unavailable. The chart can still be calculated, but the Hour pillar is marked tentative.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewFreebazi AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/freebazi?style=directory)](https://allmcps.com/mcp/freebazi)
HTML Embed
<a href="https://allmcps.com/mcp/freebazi"><img src="https://allmcps.com/api/badge/freebazi?style=directory" alt="Freebazi on AllMCPs" /></a>