Skip to main content
Glama
meifanchi99

易经八字算命

by meifanchi99

易经八字算命 MCP 服务器

基于 FastAPI + SSE 的小智 AI 生辰八字算命服务。

功能

工具

说明

触发词

八字排盘

输入出生时间,返回完整八字分析

排八字、八字

运势分析

分析指定年份的综合运势

运势、今年运气

相钥分析

命局特点、性格分析、人生建议

相钥分析、命局

命理测算

一次性输出完整命理分析报告

算命、命理

Related MCP server: Chinese Fortune Analysis System (BaZi)

快速开始

1. 安装依赖

pip install -r requirements.txt

2. 启动 MCP 服务

python yijing_mcp.py

服务启动后会运行在 http://0.0.0.0:8000

3. 配置小智 AI

下载小智 MCP 启动器,配置:

MCP 接入点: wss://api.xiaozhi.me/mcp/?token=eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjEwNjgxNjgsImFnZW5...
SSE URL: http://你的服务器IP:8000/mcp/execute
元数据 URL: http://你的服务器IP:8000/mcp/meta

4. 一键启动脚本

# Windows
start_mcp.bat

# Linux/Mac
chmod +x start_mcp.sh && ./start_mcp.sh

服务器部署

本地测试

# 启动服务
python yijing_mcp.py

# 测试元数据接口
curl http://localhost:8000/mcp/meta

# 测试执行接口
curl -X POST http://localhost:8000/mcp/execute \
  -H "Content-Type: application/json" \
  -d '{"year":1990,"month":6,"day":15,"hour":10,"gender":"男","action":"paipan"}'

Docker 部署

# 构建
docker build -t yijing-mcp .

# 运行
docker run -d -p 8000:8000 --name yijing-mcp yijing-mcp

服务器 + 小智接入

如果部署在服务器上,用 mcp_pipe.py 桥接:

python mcp_pipe.py yijing_mcp.py "wss://api.xiaozhi.me/mcp/?token=你的token"

接口说明

GET /mcp/meta

返回 MCP 元数据

{
  "name": "易经八字算命",
  "description": "基于生辰八字的命理分析服务",
  "triggers": ["算命", "八字", "运势", ...],
  "parameters": [...]
}

POST /mcp/execute

执行命理分析

请求参数:

{
  "year": 1990,
  "month": 6,
  "day": 15,
  "hour": 10,
  "gender": "男",
  "action": "mingli",
  "target_year": 2025
}

action 可选值:

  • paipan - 八字排盘

  • yunshi - 运势分析

  • xiangyao - 相钥分析

  • mingli - 命理测算(默认)

GET /mcp/health

健康检查,返回 {"status": "ok"}

示例对话

用户:帮我算命,1990年6月15日10点出生,男
助手:使用命理测算工具
返回:完整的八字排盘 + 运势分析报告

项目结构

易经八字算命MCP/
├── yijing_mcp.py      # FastAPI 主程序
├── bazi.py            # 八字排盘算法
├── fortune.py         # 运势分析
├── mcp_pipe.py        # WebSocket 桥接
├── requirements.txt   # 依赖
├── Dockerfile         # Docker
└── README.md          # 说明文档

注意事项

  1. 八字计算为简化版本,精确排盘需使用专业万年历

  2. 运势分析仅供参考,命运仍需自身努力

  3. 确保服务地址外网可访问

  4. 小智启动器需保持运行状态

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

No tool schema history has been recorded yet.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    Not graded
    maintenance
    Calculates Chinese BaZi (Four Pillars of Destiny) charts based on birth date, time, and location, including solar term information, decade luck cycles, and true solar time corrections.
    2
    -
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables traditional Chinese fortune-telling through BaZi (Four Pillars) analysis, including solar/lunar date conversion, Five Element balance calculations, Ten Gods deduction, and destiny interpretation for metaphysics applications.
    21
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Provides accurate Chinese Bazi (八字) fortune-telling calculations including birth chart analysis, destiny forecasting, and Chinese calendar information. Addresses inaccuracies in existing AI fortune-telling tools by delivering precise Bazi data for personality analysis and metaphysical insights.
    286
    ISC
  • 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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/meifanchi99/yijing-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server