# Ba-Zi.ai Chinese Astrology

> Ba-Zi.ai Chinese Astrology is a free MCP server for astrology. MCP server for BaZi charts, bone weight fortune and the Chinese almanac. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Free
- **Platforms:** CLI, self-hosted
- **Website:** https://www.ba-zi.ai
- **Repository:** https://github.com/xlw-pro/chinese-astrology-skill
- **MCP Registry name:** io.github.xlw-pro/chinese-astrology-skill
- **Categories:** [astrology](https://ai-powered.com/categories/astrology)
- **Listing updated:** 2026-11-15

## About

Built by Ba-Zi.ai, this npm package packages four calculation tools drawn from traditional Chinese astrology. The README says it uses the tyme4ts calendar library, and the bone weight tool follows the Yuan Tiangang method with 52 destiny poems and a modern interpretation. Tool descriptions are bilingual in English and Chinese.

getBaziChart takes a solar datetime and gender and returns the four pillars with ten gods, hidden stems, nayin, decade fortune and branch relations. findBirthDates works backwards from a BaZi string to matching dates since 1700. getAlmanac returns lunar date, solar terms, 28 mansions, directional gods and auspicious or inauspicious activities for a day.

It runs over stdio with npx, or as a local HTTP server after cloning the repository. The related Ba-Zi.ai website offers a free chart and AI readings, with paid reports; that is separate from this package.

## Features

- **Four Pillars chart:** getBaziChart computes pillars, ten gods, hidden stems and decade fortune.
- **Reverse lookup:** findBirthDates finds dates matching a BaZi string.
- **Chinese almanac:** getAlmanac returns lunar date, solar terms and daily guidance.
- **Bone weight fortune:** calculateBoneWeight returns a weight, breakdown and poem.
- **Bilingual descriptions:** Tool descriptions appear in English and Chinese.
- **Stdio or HTTP:** Run through npx or a local HTTP server.

## Good for

- Give a chatbot BaZi chart calculation
- Look up the almanac for a date
- Add bone weight readings to a fortune app
- Find possible birth dates from a BaZi string

## Install

### Claude Code (Terminal)

```sh
claude mcp add chinese-astrology-skill -- npx -y chinese-astrology-skill
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "chinese-astrology-skill": {
      "command": "npx",
      "args": [
        "-y",
        "chinese-astrology-skill"
      ]
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "chinese-astrology-skill": {
      "command": "npx",
      "args": [
        "-y",
        "chinese-astrology-skill"
      ]
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "chinese-astrology-skill": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "chinese-astrology-skill"
      ]
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "chinese-astrology-skill": {
      "command": "npx",
      "args": [
        "-y",
        "chinese-astrology-skill"
      ]
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "chinese-astrology-skill": {
      "command": "npx",
      "args": [
        "-y",
        "chinese-astrology-skill"
      ]
    }
  }
}
```

## Tools

- `getBaziChart`: Calculate a full Four Pillars chart from a birth datetime.
- `findBirthDates`: Find birth dates matching a BaZi string.
- `getAlmanac`: Return Chinese almanac information for a date.
- `calculateBoneWeight`: Calculate bone weight fortune with its poem.

## FAQ

### How do I run it?

Add npx -y chinese-astrology-skill to your MCP config, or run npx chinese-astrology-skill.

### Does it need an API key?

No environment variables are listed for the package.

### What does it use for calendar maths?

The README names the tyme4ts library.

### Can it run over HTTP?

Yes, after cloning and npm start it serves at localhost port 3000 under /mcp.

### Is Ba-Zi.ai Chinese Astrology free?

Yes. Ba-Zi.ai Chinese Astrology is free to use.

### How do I add Ba-Zi.ai Chinese Astrology to Claude Code?

Run this command in your terminal: claude mcp add chinese-astrology-skill -- npx -y chinese-astrology-skill

### What are the best alternatives to Ba-Zi.ai Chinese Astrology?

The closest alternatives to Ba-Zi.ai Chinese Astrology are BaziTools — True Solar Time BaZi Four Pillars & Classical Chinese Name Engine, BaziChart, Get Chinese Astrology, Wenbu · 问卜 and Ancient Echoes.

## Where this comes from

- Description: written from the project's README and the project's website.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [BaziTools — True Solar Time BaZi Four Pillars & Classical Chinese Name Engine](https://ai-powered.com/mcp/bazitools-true-solar-time-bazi-four-pillars-and-classical-ch): BaziTools — True Solar Time BaZi Four Pillars & Classical Chinese Name Engine is a free MCP server for astrology.
- [BaziChart](https://ai-powered.com/mcp/bazichart): BaziChart is a free MCP server for astrology.
- [Get Chinese Astrology](https://ai-powered.com/mcp/get-chinese-astrology): Get Chinese Astrology is a free MCP server for astrology.
- [Wenbu · 问卜](https://ai-powered.com/mcp/wenbu): Wenbu · 问卜 is an open-source MCP server for astrology.
- [Ancient Echoes](https://ai-powered.com/mcp/ancient-echoes): Ancient Echoes is a freemium MCP server for astrology.
- [InsightBaZi](https://ai-powered.com/mcp/insightbazi): InsightBaZi is a freemium MCP server for astrology.
- [Qimen Dunjia & BaZi Charts](https://ai-powered.com/mcp/qimen-dunjia-and-bazi-charts): Qimen Dunjia & BaZi Charts is a free MCP server for astrology.
- [小道 Xiaodao](https://ai-powered.com/mcp/xiaodao): 小道 Xiaodao is a free MCP server for astrology.

---
Source: https://ai-powered.com/mcp/ba-zi-ai-chinese-astrology
