六壬MCP服务器
基于kentang2017/kinliuren项目实现的六壬排盘MCP服务器。
参考MCPQimenJson项目重构,采用简洁的架构和标准的MCP协议。
功能特点
- ✅ 标准的MCP (Model Context Protocol) 服务器
- ✅ 支持JSON-RPC 2.0协议通信
- ✅ 提供六壬排盘计算工具
- ✅ 提供当前时间获取工具
- ✅ 直接调用kinliuren库,输出原始结果
- ✅ 简洁的架构,无复杂封装层
安装依赖
MCP工具说明
1. get_current_time
获取当前系统时间,返回详细的时间信息。
输入参数: 无
输出: 当前时间的详细JSON信息
2. calculate_liuren
计算指定时间的六壬排盘,返回完整的六壬数据。
输入参数:
datetime_str
: 时间字符串,格式YYYY-MM-DD HH:MM:SS
输出: 包含六壬排盘完整数据的JSON结果
作为MCP服务器使用
该工具设计为MCP服务器,通过标准输入输出进行JSON-RPC通信:
输出格式
六壬排盘结果
工具返回完整的六壬排盘JSON数据:
时间获取结果
项目结构
依赖库
- kinliuren: 六壬排盘计算库
- sxtwl: 中国传统天文历法计算库
技术实现
- MCP协议支持: 实现完整的JSON-RPC 2.0协议
- 简洁架构: 直接调用kinliuren库,无复杂封装
- 配置分离: 使用独立的config.py处理配置逻辑
- 错误处理: 完善的异常处理和错误响应
- 标准化输出: 返回结构化的JSON结果
MCP协议特性
- initialize: 服务器初始化
- tools/list: 获取可用工具列表
- tools/call: 调用具体工具
- 错误处理: 标准JSON-RPC错误响应
注意事项
- 确保Python版本>=3.6
- 需要网络连接来安装依赖包
- 时间计算基于中国传统历法
- 作为MCP服务器使用时,通过标准输入输出进行通信
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Enables traditional Chinese divination calculations through Liu Ren (六壬) chart generation. Provides tools for calculating Liu Ren divination charts based on specified dates and times, along with current time retrieval functionality.
Related MCP Servers
- AsecurityAlicenseAqualityA Model Context Protocol plugin for Chinese Tung Shing (黄历/通勝/通胜) almanac calculationsLast updated -11630MIT License
- AsecurityAlicenseAqualityAn AI-powered metaphysical Bazi calculator that provides accurate Chinese astrological chart calculations for personality analysis and destiny forecasting, addressing inaccuracies in existing AI fortune-telling tools.Last updated -5117163ISC License
- -securityAlicense-qualityIntegrates I Ching divination with AI responses, allowing users to receive guidance through traditional Chinese philosophy using the bibliomantic approach described in Philip K. Dick's work.Last updated -1MIT License
- AsecurityAlicenseAqualityA Model Context Protocol server that provides accurate Chinese Ziwei Doushu astrology chart calculations and horoscope analysis, enabling AI assistants to generate personalized astrological readings through natural language queries.Last updated -3MIT License