Skip to main content
Glama
bazi-true-solar-mcp

bazi-true-solar-mcp

bazi-true-solar-mcp

English | 简体中文 | 繁體中文

Zero-dependency True Solar Time (真太阳时), Chinese BaZi Four Pillars (八字排盘), Day Master Synastry, Annual Transit, and Guanyin 100 Oracle Lots library + MCP & A2A server.

Built and maintained by Wish by Wish (所愿) — a modern bilingual Eastern metaphysics platform.


Why True Solar Time & Deterministic BaZi Matter

Standard time zones use a single reference meridian (e.g. 120°E across all of China), and many regions observe historical Daylight Saving Time (including mainland China 1986–1991, US, Europe, and Australia). LLMs frequently hallucinate solar math and Chinese stem-branch calendars; this package provides 100% deterministic, zero-dependency calculations for AI agents and web apps.

Try the interactive web tools online:


Related MCP server: timemap-mcp

6 Built-In MCP Tools

  1. calculate_true_solar_time — Calibrates civil clock birth time to astronomical True Solar Time (dayOffset, Shichen branch, longitude offset, Equation of Time, historical DST).

  2. calculate_bazi_chart — Computes full Four Pillars (or Three Pillars when birth hour is unknown), Ten Gods, Five-Element counts, missing elements, and optional True Solar Time calibration.

  3. lookup_day_master_compatibility — Evaluates Heavenly Stem Five Combinations (天干五合) & Five-Element synastry between any two Day Masters.

  4. analyze_annual_transit — Computes annual BaZi transit (流年运势, e.g. 2026 Bing-Wu / 2027 Ding-Wei) and Ten God dynamics for any Day Master.

  5. lookup_birth_year_pillar — Resolves any birth year (1900–2100) into GanZhi, Five Element, Zodiac animal, NaYin, and 2027 Tai Sui status.

  6. draw_guanyin_lot — Draws a random Guanyin 100 Oracle Lot (观音灵签 / Kau Cim) or looks up lot 1–100 with authentic Chinese poem, grade, and bilingual meaning.


Option 1: Local Stdio MCP (Claude Desktop / Cursor / Windsurf)

Add to claude_desktop_config.json or .cursor/mcp.json:

{
  "mcpServers": {
    "bazi-true-solar": {
      "command": "npx",
      "args": ["-y", "github:buttonsprite/bazi-true-solar-mcp"]
    }
  }
}

Option 2: Zero-Install Remote MCP & A2A (Agent-to-Agent)

External AI agents and apps can call our hosted zero-LLM deterministic endpoints directly over HTTPS:

  • Remote Streamable HTTP MCP: https://mywishbywish.com/api/mcp

  • Google A2A Agent Card: https://mywishbywish.com/.well-known/agent.json

  • Google A2A JSON-RPC Endpoint: https://mywishbywish.com/api/a2a

Example Remote MCP call:

curl -X POST https://mywishbywish.com/api/mcp \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"calculate_bazi_chart","arguments":{"birthDate":"1963-02-17","birthTime":"12:00"}}}'

Programmatic JavaScript / Node.js Usage

npm install github:buttonsprite/bazi-true-solar-mcp
import {
  calculateTrueSolarTime,
  calculateBaziChart,
  lookupDayMasterCompatibility,
  analyzeAnnualTransit,
  lookupBirthYearPillar,
  drawGuanyinLot,
} from 'bazi-true-solar-mcp';

const chart = calculateBaziChart({
  birthDate: '1990-07-15',
  birthTime: '13:30',
  longitude: 104.0668,
  utcOffsetHours: 8,
  timezone: 'Asia/Shanghai',
});
console.log(chart.pillars.day.ganZhi, chart.pillars.hour.ganZhi);

const lot = drawGuanyinLot({ lotNumber: 1 });
console.log(lot.titleEn, lot.gradeEn);

Development & Tests

npm test

License

MIT © Wish by Wish

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Provides tools for Bazi (Chinese astrology) chart calculation and analysis, enabling LLMs to generate accurate birth charts, determine patterns, and answer follow-up questions based on actual calculations rather than model knowledge.
      2
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Enables AI agents to perform Chinese metaphysics calculations including BaZi charts, Tong Shu indicators, solar terms, and more, using a verified engine with 740+ tests.
      8
      8
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Enables AI agents to calculate deterministic Bazi (Four Pillars) charts with True Solar Time and Earthly Branch interactions, avoiding LLM hallucination of calendrical math.
      8
      655 npm
      163
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Enables AI agents to cast deterministic BaZi, Zi Wei Dou Shu, and Western astrology natal charts from birth details, with no setup or API key.
      1
      58 npm
      MIT