Unlock precise Bazi insights with the Bazi MCP, the first AI-powered Bazi calculator. Built to address inaccuracies in existing AI fortune-telling tools like GPT and DeepSeek, our MCP delivers reliable Bazi data for personality analysis, destiny forecasting, and more. - Accurate Bazi Calculations: Provide insightful Bazi information. - AI Agent Integration: Empowers AI agents with precise Bazi dat
Add this skill
npx mdskills install cantian-ai/bazi-mcpWell-documented MCP server providing accurate Bazi fortune-telling calculations with three useful tools
1# Bazi MCP (八字 MCP) by Cantian AI23[](https://smithery.ai/server/@cantian-ai/bazi-mcp)4[](https://mseep.ai/app/453ac410-d93a-45fb-8563-7d3cccfbe956)56Unlock precise Bazi insights with the **Bazi MCP**, the first AI-powered Bazi calculator. Built to address inaccuracies in existing AI fortune-telling tools like GPT and DeepSeek, our MCP delivers reliable Bazi data for personality analysis, destiny forecasting, and more.78### Why Bazi MCP?910- **Accurate Bazi Calculations**: Provide insightful Bazi information.11- **AI Agent Integration**: Empowers AI agents with precise Bazi data.12- **Community-Driven**: Join enthusiasts to advance Chinese metaphysics.1314Originating from the popular [_Chinese Bazi Fortune Teller_](https://chatgpt.com/g/g-67c3f7b74d148191a2167f44fd13412d-chinese-bazi-fortune-teller-can-tian-ba-zi-suan-ming-jing-zhun-pai-pan-jie-du) GPTs in the GPT Store, this project is now integrated with **Cantian AI** ([cantian.ai](https://cantian.ai)). We invite Bazi practitioners and AI enthusiasts to collaborate, share insights, and contribute to our open-source community.1516### Get Involved1718- **Contact**: [support@cantian.ai](mailto:support@cantian.ai)1920## 中文2122**八字 MCP**是参天 AI 推出的首个面向玄学领域的 MCP,针对 GPT 和 DeepSeek 等算命工具常出现的排盘错误,提供精准的八字数据,助力性格分析、命运预测等应用。2324### 八字 MCP 亮点2526- **精准排盘**:提供全面的八字排盘信息。27- **AI 赋能**:为 AI 智能体提供可靠八字服务。28- **社区共建**:欢迎命理爱好者参与交流与开发。2930项目源于 GPT Store 热门应用[_Chinese Bazi Fortune Teller_](https://chatgpt.com/g/g-67c3f7b74d148191a2167f44fd13412d-chinese-bazi-fortune-teller-can-tian-ba-zi-suan-ming-jing-zhun-pai-pan-jie-du),现已融入**参天 AI**平台 ([cantian.ai](https://cantian.ai))。我们诚邀命理研究者与 AI 开发者加入,共同推动中国传统文化的传承与创新。3132### 联系我们3334- **邮箱**:[support@cantian.ai](mailto:support@cantian.ai)35- **微信**:3637 <img src="https://github.com/user-attachments/assets/7790b64e-e03f-47e2-b824-38459549a6d8" alt="WeChat QR Code" width="200"/>3839## 前置需求 | Prerequisite4041Node.js 22 版本或以上。4243Node.js 22 or above.4445## 开始使用 | Start4647### 使用 Streamable HTTP 启动 | Start by Streamable HTTP transport4849```shell50npm start51```5253### 使用 Stdio 启动 | Start by Stdio transport5455配置 AI 应用(例如 Claude Descktop)。5657Configure AI application (e.g. Claude Desktop).5859```json60{61 "mcpServers": {62 "Bazi": {63 "command": "npx",64 "args": ["bazi-mcp"]65 }66 }67}68```6970### Installing via Smithery7172To install bazi-mcp for Claude Desktop automatically via [Smithery](https://smithery.ai/server/@cantian-ai/bazi-mcp):7374```bash75npx -y @smithery/cli install @cantian-ai/bazi-mcp --client claude76```7778## 工具列表 | Tools7980### getBaziDetail8182> 根据给定的公历或农历时间计算八字信息。83> Calculate the Bazi results based on the solar/lunar datetime.8485#### 参数 | Arguments8687- solarDatetime: `String`8889 > ISO 格式的阳历时间。例如:`2000-05-15T12:00:00+08:00`。90 > Solar datetime in ISO format. Example: `2000-05-15T12:00:00+08:00`.9192- lunarDatetime: `String`9394 > 农历时间。例如:`2000-05-15 12:00:00`。95 > Lunar datetime. Example: `2000-05-15 12:00:00`.9697- gender: `Number`9899 > 性别。可选。0 - 女,1-男。默认 1。100 > Gender. Optional. 0 for female, 1 for male. 1 by default.101102- eightCharProviderSect: `Number`103104 > 早晚子时配置。可选。1 - 表示 23:00-23:59 日干支为明天,2 - 表示 23:00-23:59 日干支为当天。默认 2。105 > Configuration for eight char provider. Optional. 1 for meaning the day stem of 23:00-23:59 is for tomorrow, 2 for meaning the day stem of 23:00-23:59 is for today. 2 by default.106107#### 结果示例 | Result example108109```json110{111 "性别": "男",112 "阳历": "1998年7月31日 14:10:00",113 "农历": "农历戊寅年六月初九辛未时",114 "八字": "戊寅 己未 己卯 辛未",115 "生肖": "虎",116 "日主": "己",117 "年柱": {118 "天干": {119 "天干": "戊",120 "五行": "土",121 "阴阳": "阳",122 "十神": "劫财"123 },124 "地支": {125 "地支": "寅",126 "五行": "木",127 "阴阳": "阳",128 "藏干": {129 "主气": {130 "天干": "甲",131 "十神": "正官"132 },133 "中气": {134 "天干": "丙",135 "十神": "正印"136 },137 "余气": {138 "天干": "戊",139 "十神": "劫财"140 }141 }142 },143 "纳音": "城头土",144 "旬": "甲戌",145 "空亡": "申酉",146 "星运": "死",147 "自坐": "长生"148 },149 "月柱": {150 "天干": {151 "天干": "己",152 "五行": "土",153 "阴阳": "阴",154 "十神": "比肩"155 },156 "地支": {157 "地支": "未",158 "五行": "土",159 "阴阳": "阴",160 "藏干": {161 "主气": {162 "天干": "己",163 "十神": "比肩"164 },165 "中气": {166 "天干": "丁",167 "十神": "偏印"168 },169 "余气": {170 "天干": "乙",171 "十神": "七杀"172 }173 }174 },175 "纳音": "天上火",176 "旬": "甲寅",177 "空亡": "子丑",178 "星运": "冠带",179 "自坐": "冠带"180 },181 "日柱": {182 "天干": {183 "天干": "己",184 "五行": "土",185 "阴阳": "阴"186 },187 "地支": {188 "地支": "卯",189 "五行": "木",190 "阴阳": "阴",191 "藏干": {192 "主气": {193 "天干": "乙",194 "十神": "七杀"195 }196 }197 },198 "纳音": "城头土",199 "旬": "甲戌",200 "空亡": "申酉",201 "星运": "病",202 "自坐": "病"203 },204 "时柱": {205 "天干": {206 "天干": "辛",207 "五行": "金",208 "阴阳": "阴",209 "十神": "食神"210 },211 "地支": {212 "地支": "未",213 "五行": "土",214 "阴阳": "阴",215 "藏干": {216 "主气": {217 "天干": "己",218 "十神": "比肩"219 },220 "中气": {221 "天干": "丁",222 "十神": "偏印"223 },224 "余气": {225 "天干": "乙",226 "十神": "七杀"227 }228 }229 },230 "纳音": "路旁土",231 "旬": "甲子",232 "空亡": "戌亥",233 "星运": "冠带",234 "自坐": "衰"235 },236 "胎元": "庚戌",237 "胎息": "甲戌",238 "命宫": "乙卯",239 "身宫": "乙卯",240 "神煞": {241 "年柱": ["国印", "亡神"],242 "月柱": ["天德合", "月德合", "天乙贵人", "太极贵人", "福星贵人", "金舆", "血刃", "华盖", "天喜", "元辰"],243 "日柱": ["天德合", "月德合", "桃花", "九丑", "童子煞"],244 "时柱": ["天乙贵人", "太极贵人", "福星贵人", "金舆", "血刃", "华盖", "天喜", "元辰", "童子煞"]245 },246 "大运": {247 "起运年龄": 4,248 "起运日期": "2001-1-26",249 "大运": [250 {251 "干支": "庚申",252 "开始年份": 2001,253 "结束": 2010,254 "天干十神": "伤官",255 "地支十神": ["伤官", "正财", "劫财"],256 "地支藏干": ["庚", "壬", "戊"],257 "开始年龄": 4,258 "结束年龄": 13259 },260 {261 "干支": "辛酉",262 "开始年份": 2011,263 "结束": 2020,264 "天干十神": "食神",265 "地支十神": ["食神"],266 "地支藏干": ["辛"],267 "开始年龄": 14,268 "结束年龄": 23269 },270 {271 "干支": "壬戌",272 "开始年份": 2021,273 "结束": 2030,274 "天干十神": "正财",275 "地支十神": ["劫财", "食神", "偏印"],276 "地支藏干": ["戊", "辛", "丁"],277 "开始年龄": 24,278 "结束年龄": 33279 },280 {281 "干支": "癸亥",282 "开始年份": 2031,283 "结束": 2040,284 "天干十神": "偏财",285 "地支十神": ["正财", "正官"],286 "地支藏干": ["壬", "甲"],287 "开始年龄": 34,288 "结束年龄": 43289 },290 {291 "干支": "甲子",292 "开始年份": 2041,293 "结束": 2050,294 "天干十神": "正官",295 "地支十神": ["偏财"],296 "地支藏干": ["癸"],297 "开始年龄": 44,298 "结束年龄": 53299 },300 {301 "干支": "乙丑",302 "开始年份": 2051,303 "结束": 2060,304 "天干十神": "七杀",305 "地支十神": ["比肩", "偏财", "食神"],306 "地支藏干": ["己", "癸", "辛"],307 "开始年龄": 54,308 "结束年龄": 63309 },310 {311 "干支": "丙寅",312 "开始年份": 2061,313 "结束": 2070,314 "天干十神": "正印",315 "地支十神": ["正官", "正印", "劫财"],316 "地支藏干": ["甲", "丙", "戊"],317 "开始年龄": 64,318 "结束年龄": 73319 },320 {321 "干支": "丁卯",322 "开始年份": 2071,323 "结束": 2080,324 "天干十神": "偏印",325 "地支十神": ["七杀"],326 "地支藏干": ["乙"],327 "开始年龄": 74,328 "结束年龄": 83329 },330 {331 "干支": "戊辰",332 "开始年份": 2081,333 "结束": 2090,334 "天干十神": "劫财",335 "地支十神": ["劫财", "七杀", "偏财"],336 "地支藏干": ["戊", "乙", "癸"],337 "开始年龄": 84,338 "结束年龄": 93339 },340 {341 "干支": "己巳",342 "开始年份": 2091,343 "结束": 2100,344 "天干十神": "比肩",345 "地支十神": ["正印", "伤官", "劫财"],346 "地支藏干": ["丙", "庚", "戊"],347 "开始年龄": 94,348 "结束年龄": 103349 }350 ]351 },352 "刑冲合会": {353 "年": {354 "天干": {},355 "地支": {}356 },357 "月": {358 "天干": {},359 "地支": {360 "半合": [361 {362 "柱": "日",363 "知识点": "未卯半合木",364 "元素": "木"365 }366 ]367 }368 },369 "日": {370 "天干": {},371 "地支": {372 "半合": [373 {374 "柱": "月",375 "知识点": "卯未半合木",376 "元素": "木"377 },378 {379 "柱": "时",380 "知识点": "卯未半合木",381 "元素": "木"382 }383 ]384 }385 },386 "时": {387 "天干": {},388 "地支": {389 "半合": [390 {391 "柱": "日",392 "知识点": "未卯半合木",393 "元素": "木"394 }395 ]396 }397 }398 }399}400```401402### getSolarTimes403404> 根据给定的八字返回可能的公历时间列表。405> Return a list of possible solar calendar datetime based on the given Bazi.406407#### 参数 | Arguments408409- bazi: `String`410411 > 八字,各柱用空格隔开。412 > Bazi, with each pillar separated by a space.413414#### 结果示例 | Result example415416```json417["1758-07-29 14:00:00", "1818-07-15 14:00:00", "1998-07-31 14:00:00"]418```419420### getChineseCalendar421422> 获取指定公历时间(默认今天)的黄历信息。423> Get chinese calendar information for the specified solar calendar date (default is today).424425#### 参数 | Arguments426427- solarDatetime428429 > ISO 格式的阳历时间。例如:`2000-05-15T12:00:00+08:00`。430 > Solar datetime in ISO format. Example: `2000-05-15T12:00:00+08:00`.431432#### 结果示例 | Result example433434```json435{436 "公历": "2025年5月7日 星期三",437 "农历": "农历乙巳年四月初十",438 "干支": "乙巳 辛巳 丙子",439 "生肖": "蛇",440 "纳音": "涧下水",441 "节气": "立夏",442 "二十八宿": "箕水豹吉",443 "彭祖百忌": "丙不修灶必见灾殃 子不问卜自惹祸殃",444 "喜神方位": "西南",445 "阳贵神方位": "西",446 "阴贵神方位": "西北",447 "福神方位": "东",448 "财神方位": "西南",449 "冲煞": "冲马(午)煞南",450 "宜": "嫁娶,祭祀,祈福,求嗣,开光,出行,拆卸,动土,上梁,出火,进人口,入宅,移徙,安床,栽种,纳畜,牧养,竖柱,安门,修造,解除,会亲友",451 "忌": ""452}453```454455**Keywords**: Bazi MCP, Bazi AI Agent, Fengshui AI Agent, Bazi Calculator MCP, Bazi Calculator AI, Cantian AI456
Full transparency — inspect the skill content before installing.