BaZi Four Pillars MCP logo

BaZi Four Pillars MCP

Calculates deterministic BaZi Four Pillars charts from local time, timezone, longitude, and astronomical solar-term boundaries.

Install BaZi Four Pillars MCP

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": {
    "bazi-four-pillars-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "bazi-four-pillars-mcp"
      ]
    }
  }
}

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

We couldn’t confirm it starts correctly

The install command started, but didn't respond the way we expected when we tried to talk to it.

npx -y bazi-four-pillars-mcp

initialize succeeded but no response to tools/list.

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked .

Overview

BaZi Four Pillars MCP calculates deterministic year, month, day, and hour pillars from a local date, time, IANA timezone, longitude, and optional latitude. Its single MCP tool applies true solar time for day and hour calculations, astronomical solar terms for year and month boundaries, and a 23:00 Zi-hour day transition. Results include chart facts, correction details, nearby solar terms, warnings, provenance, and engine and rules versions. Use it for reproducible calendrical or software workflows rather than automated interpretation or fortune-telling.

Use cases

  • Normalize birth-chart inputs for a calendrical application
  • Generate reproducible year, month, day, and hour pillars
  • Inspect true-solar-time corrections in software workflows
  • Compare chart boundaries around astronomical solar terms

Key features

  • Deterministic Four Pillars calculation
  • True solar time for day and hour
  • Astronomical solar-term boundaries
  • Explicit 23:00 Zi-hour day transition
  • Versioned results with warnings and provenance
  • Local coordinate-based processing

Tools1

What BaZi Four Pillars MCP lets your agent do. Expand a tool for its parameters.

Self-reported~7 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

Recent health check succeeded.

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 2h ago via OSV.dev · bazi-four-pillars-mcp (npm)

Adoption & maintenance

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

Last commitTodayMost recent push to the default branch.
Install checkInconclusiveStarted but did not complete the MCP handshake in our test.
Tools exposed1Callable tools this server registers over MCP.

How BaZi Four Pillars MCP works

What BaZi Four Pillars MCP does

BaZi Four Pillars MCP exposes a local MCP calculation service for normalizing birth-chart inputs into the four traditional pillars: year, month, day, and hour. It is designed for software and calendrical workflows that need repeatable calculation facts rather than generated readings or predictions.

The calculation accepts a local civil date and time, an IANA timezone identifier, and a longitude. Latitude is optional and is retained for traceability. Locations are supplied directly as coordinates; the server does not look up an address or geocode a place name.

How it works

The server calculates day and hour values using local apparent true solar time. Its output also exposes the time-correction details used in that process, making the normalization steps available to downstream applications.

Year and month boundaries use astronomical solar terms rather than a simple calendar-date rule. The calculation treats 23:00 as the Zi-hour transition into the next day. Each result includes explicit engine and rules versions, nearby solar-term information, warnings, provenance, and the chart’s stem-and-branch details.

Setup and configuration

The package can be launched directly through npm:

Terminal
npx -y bazi-four-pillars-mcp

To build it from source, clone the repository, install dependencies with pnpm, build the project, and start the generated server:

bash
git clone https://github.com/cdaily1995-create/four-pillars-mcp.git
cd four-pillars-mcp
pnpm install
pnpm build
node dist/server.js

A stdio MCP client can register the npm command with this configuration:

config.json
{
  "mcpServers": {
    "four-pillars": {
      "command": "npx",
      "args": ["-y", "bazi-four-pillars-mcp"]
    }
  }
}

The process calculates results locally and does not require an account, database, analytics service, payment setup, address search, or remote API.

Tools and capabilities

calculate_four_pillars

The tool requires these fields:

  • date: local civil date in YYYY-MM-DD format.
  • time: local civil time in HH:mm format.
  • timezone: an IANA timezone such as Asia/Shanghai or America/Los_Angeles.
  • longitude: decimal degrees from -180 to 180, with east as positive.

latitude is optional and accepts decimal degrees from -90 to 90. A typical request supplies a date, time, timezone, longitude, and latitude in one JSON object.

Responses contain the four pillar names, stem and branch elements, yin-yang labels, the Day Master, solar-time correction information, nearby solar-term data, warnings, provenance, and version identifiers for the calculation engine and rules.

Limitations and notes

The server reports calculation facts and does not automatically interpret them as personality profiles, life outcomes, or guaranteed predictions. Traditional BaZi meanings are culturally interpretive and are not presented as scientific proof, diagnosis, or certainty.

Because the caller supplies the timezone and longitude, input quality affects the result. The service does not perform address-based location discovery, and it does not provide gender-dependent luck cycles or store birth data.

Reviews

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

Frequently Asked Questions about BaZi Four Pillars MCP

BaZi Four Pillars MCP is an MCP server that connects local date, time, IANA timezone, and longitude inputs to the calculate_four_pillars tool. It uses true solar time and astronomical solar terms to return year, month, day, and hour pillars plus calculation details and warnings.

Run `npx -y bazi-four-pillars-mcp` to start the package directly. You can also clone the repository, install dependencies with pnpm, build it, and run `node dist/server.js`, then register the command in an MCP client using stdio configuration.

The calculator requires a local date in `YYYY-MM-DD`, a local time in `HH:mm`, an IANA timezone, and longitude in decimal degrees from -180 to 180. Latitude is optional, accepts -90 to 90, and is retained for traceability.

Yes, day and hour calculations use local apparent true solar time. The response includes the related correction details, along with nearby solar-term information, warnings, provenance, and the engine and rules versions.

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 PreviewBaZi Four Pillars MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/bazi-four-pillars-mcp?style=directory)](https://allmcps.com/mcp/bazi-four-pillars-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/bazi-four-pillars-mcp"><img src="https://allmcps.com/api/badge/bazi-four-pillars-mcp?style=directory" alt="BaZi Four Pillars MCP on AllMCPs" /></a>