shunshi-ai/bazi-reader-mcp

๐ŸŽจ Art & Culture
0 Views
0 Installs

๐Ÿ“‡ ๐Ÿ  ๐ŸŽ ๐ŸชŸ ๐Ÿง - Bazi (Four Pillars / ๅ››ๆŸฑๆŽจๅ‘ฝ / ์‚ฌ์ฃผํŒ”์ž) charting MCP server with true solar time correction and multilingual output (ไธญๆ–‡/EN/ๆ—ฅๆœฌ่ชž/ํ•œ๊ตญ์–ด). npx shunshi-bazi-mcp

Quick Install

One-Click IDE Configuration
claude_desktop_config.json
{
  "mcpServers": {
    "shunshi-ai-bazi-reader-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "shunshi-ai-bazi-reader-mcp"
      ]
    }
  }
}
Or

Using an AI coding agent (Claude Code, Cursor, etc.)? Copy a ready-made prompt that tells it to fetch the setup instructions and install this server for you.

Documentation Overview

bazi-reader-mcp

๐Ÿ‡จ๐Ÿ‡ณ ไธญๅ›ฝๅ…ซๅญ— (Four Pillars of Destiny) ใƒป ๐Ÿ‡ฏ๐Ÿ‡ต ๅ››ๆŸฑๆŽจๅ‘ฝ (ใ—ใกใ‚…ใ†ใ™ใ„ใ‚ใ„) ใƒป ๐Ÿ‡ฐ๐Ÿ‡ท ์‚ฌ์ฃผํŒ”์ž (ๅ››ๆŸฑๅ…ซๅญ—)

The calculation engine (and MCP server) behind Shunshi.AI / ้กบๆ—ถ, open-sourced.

License: MIT Powered by Shunshi.AI Node

๐Ÿ‡ฏ๐Ÿ‡ต ๆ—ฅๆœฌใฎ้–‹็™บ่€…ใฎๆ–นใธ: ใ“ใ‚Œใฏไธญๅ›ฝใฎใ€Œๅ…ซๅญ— (bฤzรฌ)ใ€โ€” ๆ—ฅๆœฌใง่จ€ใ† ๅ››ๆŸฑๆŽจๅ‘ฝ ใฎ่จˆ็ฎ—ใ‚จใƒณใ‚ธใƒณ + MCP ใ‚ตใƒผใƒใƒผใงใ™ใ€‚็”Ÿๅนดๆœˆๆ—ฅใƒปๅ‡บ็”Ÿๆ™‚ๅˆปใƒปๅ‡บ็”Ÿๅœฐใ‹ใ‚‰ๅ››ๆŸฑ / ๅ็ฅž / ๅคง้‹ / ไบ”่กŒใƒใƒฉใƒณใ‚นใ‚’่จˆ็ฎ—ใงใใพใ™ใ€‚็œŸๅคช้™ฝๆ™‚๏ผˆๅ‡ๆ™‚ๅทฎ๏ผ‰่ฃœๆญฃใซใ‚‚ๅฏพๅฟœใ—ใฆใŠใ‚Šใ€AI ใ‚จใƒผใ‚ธใ‚งใƒณใƒˆ (Claude / Cursor / Cline ใชใฉ) ใ‹ใ‚‰็›ดๆŽฅๅ‘ผใณๅ‡บใ›ใพใ™ใ€‚

๐Ÿ‡ฐ๐Ÿ‡ท ํ•œ๊ตญ ๊ฐœ๋ฐœ์ž๋ถ„๋“ค๊ป˜: ์ค‘๊ตญ์˜ "ๅ…ซๅญ— (bฤzรฌ)" โ€” ํ•œ๊ตญ์—์„œ๋Š” ์‚ฌ์ฃผํŒ”์ž๋ผ๊ณ  ๋ถ€๋ฅด๋Š” ๋ช…๋ฆฌํ•™์˜ ๊ณ„์‚ฐ ์—”์ง„ + MCP ์„œ๋ฒ„์ž…๋‹ˆ๋‹ค. ์ƒ๋…„์›”์ผยท์ถœ์ƒ์‹œ๊ฐยท์ถœ์ƒ์ง€๋กœ๋ถ€ํ„ฐ ์‚ฌ์ฃผ / ์‹ญ์„ฑ / ๋Œ€์šด / ์˜คํ–‰ ๊ท ํ˜•์„ ๊ณ„์‚ฐํ•ฉ๋‹ˆ๋‹ค. ์ง„ํƒœ์–‘์‹œ ๋ณด์ •๋„ ์ง€์›ํ•˜๋ฉฐ, AI ์—์ด์ „ํŠธ (Claude / Cursor / Cline ๋“ฑ) ์—์„œ ๋ฐ”๋กœ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.


This repository is a monorepo with two published npm packages:

PackageWhat it isInstall
shunshi-bazi-corePure TypeScript calculation library. Zero framework deps. Use it from any Node.js / browser app.npm install shunshi-bazi-core
shunshi-bazi-mcpThin Model Context Protocol server wrapping the core library. Drop-in tool for Claude Desktop / Cursor / Cline / any MCP client.npx -y shunshi-bazi-mcp

Both packages share the same calculation engine that powers Shunshi.AI's production backend. Both are parity-tested on every release.


Why this exists

Most existing open-source Bazi libraries (in any language) have at least one of these problems:

  1. No true solar time correction. Clock time gets used as-is, which gives wrong charts for births far from the timezone's standard meridian (ๆ–ฐ็–† / ้ป‘้พ™ๆฑŸ / the U.S. West Coast / ๅŒ—ๆตท้“). A 30-minute error shifts the whole hour pillar.
  2. Inconsistent ๅญๆ—ถ handling. Some libraries put 23:00-23:59 in "yesterday's" day pillar, others in "tomorrow's". If you don't pick, your charts disagree with professional reference tools.
  3. No parity baseline. You compute a chart locally, compare against a paid service, get different numbers, and have no way to tell who's right.
  4. Raw data only, no multilingual context. Output is Chinese-centric, hard to wire into JP/KR/EN AI assistants.

shunshi-bazi-core + shunshi-bazi-mcp fix all four:

  • โœ… True solar time built-in, default on (just pass city or longitude/latitude).
  • โœ… Default sect=1 (23:00 = tomorrow's day pillar), matching ้—ฎ็œŸๅ…ซๅญ—.
  • โœ… Parity-tested against Shunshi.AI's Python backend (5/5 golden cases) and cantian-tymext's calculateRelation() (5/5 on ๅˆ‘ๅ†ฒๅˆไผš pair-wise subset).
  • โœ… Multilingual discoverability via keywords (bazi / ๅ…ซๅญ— / ๅ››ๆŸฑๆŽจๅ‘ฝ / ์‚ฌ์ฃผํŒ”์ž / saju / shichu-suimei) so JP/KR/EN developers can find the package.

Quick start

If you're embedding Bazi calc in your own app

npm install shunshi-bazi-core
import { getBaziChart } from 'shunshi-bazi-core';

const chart = getBaziChart({
  year: 1990, month: 3, day: 24, hour: 10, minute: 28,
  gender: 1,           // 0 = ๅฅณ, 1 = ็”ท
  city: 'ๅนฟๅทž',         // triggers true solar time correction
});

console.log(chart.ๅ…ซๅญ—.ๅ››ๆŸฑ);          // "ๅบšๅˆ ๅทฑๅฏ ๆˆŠๅญ ไธๅทณ"
console.log(chart.็œŸๅคช้˜ณๆ—ถ?.ไฟฎๆญฃๅˆ†้’Ÿ); // -33.85 (minutes of correction applied)

โ†’ Full API and output reference: packages/bazi-core/README.md

If you want Claude / Cursor / Cline to compute Bazi charts

Add this to your MCP config (e.g. claude_desktop_config.json):

{
  "mcpServers": {
    "shunshi-bazi": {
      "command": "npx",
      "args": ["-y", "shunshi-bazi-mcp"]
    }
  }
}

Then restart the client and ask your AI agent in natural language:

"ๅธฎๆˆ‘็ฎ—ไธ€ไธ‹ 1990 ๅนด 3 ๆœˆ 24 ๆ—ฅ ไธŠๅˆ 10 ็‚น 28 ๅˆ†ๅ‡บ็”Ÿๅœจๅนฟๅทž็š„็”ท็”Ÿ็š„ๅ…ซๅญ—ใ€‚"

The server exposes two tools:

  • getBaziChart โ€” full Bazi (Four Pillars) chart with true-solar-time correction, ๅคง่ฟ, ๅˆ‘ๅ†ฒๅˆไผš, ็ฅž็…ž.
  • getHuangli โ€” ้ป„ๅކ (่€้ป„ๅކ / Chinese almanac) for any day: ๅฎœ/ๅฟŒ, ๅฝญ็ฅ–็™พๅฟŒ, ็ฅž็…ž, ๅปบ้™ค, ไบŒๅๅ…ซๅฎฟ, ๅ‰็ฅžๆ–นไฝ, 12 ๆ—ถ่พฐๅฎœๅฟŒ. Accepts ๅ…ฌๅކ or ๅ†œๅކ input; omit the date for today.

"ไปŠๅคฉ็š„้ป„ๅކๅฎœๅฟŒๆ˜ฏไป€ไนˆ๏ผŸ"

โ†’ Full MCP tool docs, alternate client configs, troubleshooting: packages/bazi-mcp/README.md


Repository layout

bazi-reader-mcp/
โ”œโ”€โ”€ package.json                 # npm workspace root (private)
โ”œโ”€โ”€ tsconfig.base.json           # shared TypeScript config
โ”œโ”€โ”€ LICENSE                      # MIT
โ”œโ”€โ”€ README.md                    # you are here
โ””โ”€โ”€ packages/
    โ”œโ”€โ”€ bazi-core/               # โ†’ publishes as "shunshi-bazi-core"
    โ”‚   โ”œโ”€โ”€ src/
    โ”‚   โ”‚   โ”œโ”€โ”€ index.ts
    โ”‚   โ”‚   โ””โ”€โ”€ lib/{bazi,relations,shensha,solarTime,cityCache}.ts
    โ”‚   โ”œโ”€โ”€ tests/{parity,relations-vs-cantian,smoke}.ts
    โ”‚   โ”œโ”€โ”€ package.json
    โ”‚   โ””โ”€โ”€ README.md
    โ””โ”€โ”€ bazi-mcp/                # โ†’ publishes as "shunshi-bazi-mcp"
        โ”œโ”€โ”€ src/{mcp,stdio}.ts
        โ”œโ”€โ”€ tests/smoke-stdio.ts
        โ”œโ”€โ”€ package.json
        โ””โ”€โ”€ README.md

Development

# install deps for both packages
npm install

# build both packages
npm run build

# run bazi-core tests (parity + relations-vs-cantian)
npm test

# run the MCP server locally via tsx (no build required)
npm run dev:mcp

# stdio smoke test for the MCP (spawns the built dist/stdio.js)
cd packages/bazi-mcp && npm run smoke

Test coverage

  • packages/bazi-core/tests/parity.test.ts โ€” 5 golden cases hand-labeled from screenshots of ้—ฎ็œŸๅ…ซๅญ—, cross-checked against Shunshi.AI's Python backend on ๅ››ๆŸฑ / ๅ็ฅž / ็ฉบไบก / ็บณ้Ÿณ / ่—ๅนฒ.
  • packages/bazi-core/tests/relations-vs-cantian.test.ts โ€” 5/5 match vs cantian-tymext's calculateRelation() on ๅˆ‘ๅ†ฒๅˆไผš (pair-wise subset: ๅˆ / ๅ†ฒ / ๅˆ‘ / ๅฎณ / ็ ด / ๅ…‹).
  • packages/bazi-mcp/tests/smoke-stdio.ts โ€” End-to-end stdio handshake + tools/list + tools/call, asserts the real ๅ››ๆŸฑ output and the ๆ•ฐๆฎๆฅๆบ attribution block. Uses the real MCP SDK client so it exercises the exact same code path as Claude Desktop.

Related projects

  • tyme4ts by 6tail โ€” the TypeScript lunar/solar calendar primitives this library builds on.
  • cantian-ai/bazi-mcp โ€” pioneering open-source Bazi MCP. We use their cantian-tymext as a dev dependency for relations parity testing. The two MCPs are complementary, not competing โ€” we made different defaults (sect=1, true solar time on by default) based on what matches professional practice in the Chinese-speaking world.

About Shunshi.AI

๐ŸŒ Website: https://shunshi.ai ๐Ÿฆ X / Twitter: @shunshiai2026 ๐Ÿš€ Product Hunt: Shunshi.AI

Shunshi.AI (้กบๆ—ถ) is an AI-powered Bazi reading platform supporting English, ไธญๆ–‡, ๆ—ฅๆœฌ่ชž, and ํ•œ๊ตญ์–ด. Free to try, no credit card required.

We open-sourced the calculation engine behind our production backend so:

  • Any developer can compute Bazi charts with the same accuracy as our paid product.
  • The ็œŸๅคช้˜ณๆ—ถ / ๅญๆ—ถ edge cases get solved once and for all, instead of each project getting them wrong in a slightly different way.
  • JP/KR/EN developers finally have a TypeScript library that speaks their terminology (ๅ››ๆŸฑๆŽจๅ‘ฝ / ์‚ฌ์ฃผํŒ”์ž).

License

MIT ยฉ 2026 Shunshi.AI

Related MCP Servers

8enSmith/mcp-open-library

๐Ÿ“‡ โ˜๏ธ - A MCP server for the Open Library API that enables AI assistants to search for book information.

๐ŸŽจ Art & Culture0 views
abhiemj/manim-mcp-server

๐Ÿ ๐Ÿ  ๐ŸชŸ ๐Ÿง - A local MCP server that generates animations using Manim.

๐ŸŽจ Art & Culture0 views
AceDataCloud/MCPFlux

๐Ÿ โ˜๏ธ - Flux AI image generation and editing (Black Forest Labs) via Ace Data Cloud API.

๐ŸŽจ Art & Culture0 views
AceDataCloud/MCPNanoBanana

๐Ÿ โ˜๏ธ - NanoBanana AI image generation and editing with virtual try-on and product placement in realistic scenes.

๐ŸŽจ Art & Culture0 views

Engagement

Views
0
Installs
0
Upvotes
0

Views and upvotes are unique per visitor network (hashed IP). Installs count copy actions.

Status

Health: Not checked yet

We have not completed a health check for this listing yet.

No check timestamp yet.

Unclaimed listing (imported or pending owner verification). Claim it โ†’
โ˜… Spotlight Slot

Feature Your MCP Server

Get maximum visibility for your server across our directory, search results, and detail pages.

Spotlight Your Server

Own this project?

This directory is pre-filled from public sources. Claim via GitHub README, site badge, or DNS TXT to get the verified badge and attach your website.

Claim this listing

Promote this listing

Optional paid placement. Free listings stay free forever.

Share & Embed

Add our SVG badge (dark/light directory styles) or embeddable widget to your site.