
Mingli MCP is a deterministic Chinese astrology server for AI agents and MCP clients. It generates Zi Wei Dou Shu (紫微斗数 / Purple Star Astrology) and Bazi (八字 / Four Pillars of Destiny) charts from...
概览
Mingli MCP is a deterministic Chinese astrology server for AI agents and MCP clients. It generates Zi Wei Dou Shu (紫微斗数 / Purple Star Astrology) and Bazi (八字 / Four Pillars of Destiny) charts from structured birth data, including the 12 palaces, stars, Four Pillars, Ten Gods, five elements, fortune periods, and date-based analysis. 一个面向 AI 工具的开源命理 MCP 服务,支持紫微斗数排盘、八字排盘、 宫位与五行分析,以及大限、流年、流月、流日和流时查询。 - “Generate my Zi Wei Dou Shu birth chart for 1990-01-01, 午时, male.” - “排一个 1992-08-16 辰时出生的女命八字,并分析五行强弱。” - “分析这个紫微命盘的财帛宫,并说明主要星曜配置。” - “Compare the five-element balance of these two Bazi charts.” This project provides deterministic calendar and chart calculations for cultural, educational, and entertainment use. It is not medical, legal, financial, or other professional advice. Unlike a generic LLM response, the tools first calculate a structured chart from calendar inputs and then return consistent JSON or Markdown.
README
以下为原文 README 节选,完整内容请查看原文。
Chinese Astrology MCP Server — Zi Wei Dou Shu & BaZi
Mingli MCP is a deterministic Chinese astrology server for AI agents and MCP clients. It generates Zi Wei Dou Shu (紫微斗数 / Purple Star Astrology) and Bazi (八字 / Four Pillars of Destiny) charts from structured birth data, including the 12 palaces, stars, Four Pillars, Ten Gods, five elements, fortune periods, and date-based analysis.
中文简介: 一个面向 AI 工具的开源命理 MCP 服务,支持紫微斗数排盘、八字排盘、 宫位与五行分析,以及大限、流年、流月、流日和流时查询。
Example questions for an AI client:
- “Generate my Zi Wei Dou Shu birth chart for 1990-01-01, 午时, male.”
- “排一个 1992-08-16 辰时出生的女命八字,并分析五行强弱。”
- “分析这个紫微命盘的财帛宫,并说明主要星曜配置。”
- “Compare the five-element balance of these two Bazi charts.”
This project provides deterministic calendar and chart calculations for cultural, educational, and entertainment use. It is not medical, legal, financial, or other professional advice.
What this Chinese astrology MCP can do
| MCP tool | Result |
|---|---|
get_ziwei_chart |
Zi Wei Dou Shu birth chart with 12 palaces and stars |
get_ziwei_fortune |
Decadal, yearly, monthly, daily, and hourly fortune periods |
analyze_ziwei_palace |
Focused analysis of one Zi Wei palace |
get_bazi_chart |
Bazi Four Pillars, Ten Gods, hidden stems, and five elements |
get_bazi_fortune |
Simplified 10-year age period plus annual stem/branch |
analyze_bazi_element |
Five-element strength, balance, and missing elements |
list_fortune_systems |
Machine-readable discovery of supported systems |
Unlike a generic LLM response, the tools first calculate a structured chart from calendar inputs and then return consistent JSON or Markdown. The same schemas can be used in chat, an automated workflow, or a custom Chinese astrology application.
✨ 特性
🎯 核心特性
- ✅ 多命理系统支持: 采用插件化架构,轻松扩展新的命理系统
- ✅ 紫微斗数(已实现)
- ✅ 八字(已实现)⭐ 新增
- 🔄 西方占星(预留接口)
- ✅ 多语言支持: 紫微斗数宫位与星曜术语支持6种语言;八字核心标签目前以中文为主
- 🇨🇳 简体中文 (zh-CN)
- 🇹🇼 繁体中文 (zh-TW)
- 🇺🇸 English (en-US)
- 🇯🇵 日本語 (ja-JP)
- 🇰🇷 한국어 (ko-KR)
- 🇻🇳 Tiếng Việt (vi-VN)
- ✅ 多传输方式: 支持stdio、HTTP、WebSocket等多种传输协议
- ✅ MCP标准兼容: 完全兼容 MCP 协议规范
- ✅ 易于扩展: 清晰的抽象层设计,添加新系统只需3步
🔮 紫微斗数功能
- ✅ 完整排盘: 十二宫、主星、辅星、杂耀、四化等
- ✅ 运势查询: 大限、流年、流月、流日、流时
- ✅ 宫位分析: 深度分析特定宫位的星曜配置
- ✅ 多种历法: 支持阳历和农历输入
- ✅ 格式化输出: JSON和Markdown两种输出格式
- ⭐ 真太阳时: 支持按出生地经度和精确时间修正 新功能
🎴 八字功能 ⭐ 新增
- ✅ 四柱排盘: 年月日时四柱、天干地支详细信息
- ✅ 十神分析: 比肩、劫财、食神、伤官、偏财、正财、七杀、正官、偏印、正印
- ✅ 五行分析: 金木水火土分数、百分比、平衡度
- ✅ 地支藏干: 详细的地支藏干信息
- ✅ 运势查询: 简化十年年龄段标记、流年干支分析
- ✅ 缺失分析: 自动识别五行缺失并给出建议
- ✅ 多种历法: 支持阳历和农历输入
- ⭐ 真太阳时: 支持按出生地经度和精确时间修正 新功能
📚 文档导航
新用户推荐阅读路径:
安装
uvx mingli-mcp配置
{
"mcpServers": {
"mingli": {
"command": "uvx",
"args": ["mingli-mcp"],
"env": {
"LOG_LEVEL": "INFO"
}
}
}
}