# Ziwei & Bazi Astrology

The Ziwei & Bazi Astrology MCP server builds Ziwei Dou Shu and Bazi charts, then inspects palaces and the five elements. Use it for date and fortune-period queries.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · 976 installs · ★ 6 repo stars
- Author: spyfree
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/spyfree/mingli-mcp
- Updated: 2026-10-08
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/mcp/ziwei-bazi-astrology

## What it does

The server turns birth details into structured Ziwei Dou Shu or Bazi results. Ziwei Dou Shu covers the 12 palaces, stars, and focused palace analysis. Bazi returns the Four Pillars, Ten Gods, hidden stems, and five-element scores. Results can be formatted as JSON or Markdown.

Its tools cover fortune periods by decade, year, month, day, and hour, along with elemental strength, balance, and missing elements. Solar and lunar calendar inputs are supported. Ziwei Dou Shu output has language options, while the Bazi fortune tool uses a simplified ten-year age-period view rather than a full major-cycle calculation.

Claude Code connects to the HTTP server at `https://mingli-mcp--spyfree.run.tools`; Codex, Cursor, GitHub Copilot, and other listed clients can use it too. The calculations are intended for cultural, educational, and entertainment use, so they should not guide medical, legal, or financial decisions.

## Requirements
- Remote server: `https://mingli-mcp--spyfree.run.tools`

## Install

### Claude Code (native platform)

**Platform CLI: remote server**
```bash
claude mcp add --transport http mingli-mcp https://mingli-mcp--spyfree.run.tools
```

### Codex

**Platform CLI: remote server**
```bash
codex mcp add ziwei-bazi-astrology --url https://mingli-mcp--spyfree.run.tools
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "ziwei-bazi-astrology": {
            "url": "https://mingli-mcp--spyfree.run.tools"
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "ziwei-bazi-astrology": {
            "type": "http",
            "url": "https://mingli-mcp--spyfree.run.tools"
        }
    }
}
```

### Gemini CLI

**Platform CLI: remote server**
```bash
gemini mcp add -t http ziwei-bazi-astrology https://mingli-mcp--spyfree.run.tools
```

## When to use it
- generate a Ziwei Dou Shu birth chart
- build a Bazi chart with the Four Pillars and Ten Gods
- inspect one Ziwei palace and its stars
- compare five-element balance across Bazi charts
- retrieve fortune periods for a date or age

## Example prompts
- Generate a Ziwei Dou Shu chart for birth date `1990-01-01`, the `午时` time slot, and a male subject.
- Create a Bazi chart for `2000-08-16` at `辰时` and assess the five-element balance.
- Analyze the finance palace in this Ziwei Dou Shu chart and list its main stars.

## Similar
- [bazi-skill-chinese-astrology](https://affpapa.org/en/nevibecode/skills/bazi-skill-chinese-astrology.md) — skill · 953 installs
- [bazi-reader-mcp](https://affpapa.org/en/nevibecode/mcp/bazi-reader-mcp.md) — MCP server · 587 installs
- [OpenFate Bazi MCP](https://affpapa.org/en/nevibecode/mcp/openfate-bazi-mcp.md) — MCP server · ★ 162 repo stars
- [Wenbu · 问卜](https://affpapa.org/en/nevibecode/mcp/wenbu.md) — MCP server
- [PanchangaAPI — Vedic Astrology](https://affpapa.org/en/nevibecode/mcp/panchangaapi-vedic-astrology.md) — MCP server · 310 installs
- [mythsensus](https://affpapa.org/en/nevibecode/mcp/mythsensus.md) — MCP server · 385 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
