XiaoLiuRen MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@XiaoLiuRen MCP Serveranalyze my fortune for tomorrow at 3pm"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
小六壬 MCP (XiaoLiuRen Model Context Protocol)
一个基于 Model Context Protocol (MCP) 的小六壬占卜分析服务器,提供传统的六神占卜功能。
小六壬出自《增补许真君万全玉匣记》,名为“李淳风六壬时课”,是一种古代靠“掐指”来占卜的方法,源于六曜历注和六轮兀法(《居家必用事类全集·六轮经兀法》)。
占时将“大安、留连、速喜、赤口、小吉、空亡”分置食指、中指、无名指上,以“月、日、时”轮指数出,得大安、速喜、小吉为吉,其余为凶。明清时期的白话小说有其踪迹,如《醒世姻缘传》:“街上一个打路庄板的瞎子走过。相大舅叫他进来,与狄希陈起课,说是速喜,时下就到”,《隋唐演义》:“叔宝便说个申时。妇人捻指一算,便道:卦名速喜”。
其“大安、留连、速喜、赤口、小吉、空亡”和六壬式十二天将的六神“青龙、玄武、朱雀、白虎、六合、勾陈”对应,可能是称为六壬时课或小六壬的原因。
—— 维基百科
功能介绍
🗓️ 精准农历转换:支持阳历转农历,提供准确的干支纪年信息
🕐 时辰计算:自动识别传统十二时辰
🔮 小六壬占卜:基于传统算法的六神推算
� 智能解读:提供详细的占卜解释和行动建议
Related MCP server: Chinese Fortune Analysis System (BaZi)
使用方法
安装依赖
npm install启动服务
node index.js工具调用
服务器提供 analyze_xiaoliuren 工具:
参数:
date: 日期(格式:YYYY-MM-DD)time: 时间(格式:HH:MM)calendar_type: 历法类型("solar" = 阳历,"lunar" = 农历)
调用示例:
{
"name": "analyze_xiaoliuren",
"arguments": {
"date": "2025-09-25",
"time": "14:30",
"calendar_type": "solar"
}
}输出示例
小六壬占卜结果:
🗓️ 输入信息:
- 原始日期:2025-09-25(阳历)
- 时辰:14:30 (未时)
📅 农历信息:
- 农历日期:2025年八月初四
- 年干支:乙巳
- 月干支:乙酉
- 日干支:丁酉
- 时辰:未时
🧮 小六壬推算过程:
- 农历8月 → 留连
- 从留连数4日 → 小吉
- 从小吉数8(时辰序号) → 空亡
🔮 占卜结果:【空亡】
- 五行属性:土
- 吉凶性质:凶
- 基本含义:空、亡,事情落空不成,但也有无事之意。性质特殊,倾向虚无。
- 详细解释:空亡有两种可能:一是大凶结果很差,二是什么都不会发生。问失物为未丢,问寻找为找不到。常代表弃考、放弃等情况。
💡 建议指导:
🌫️ 情况比较特殊,可能有两种截然不同的结果。
• 可能性一:事情完全落空,什么都不会发生
• 可能性二:结果很差,遭遇较大失败
• 特殊含义:在某些情况下反而表示"没有问题"
• 心理状态:可能已经有放弃的念头
• 总体建议:重新审视目标,或许应该转换思路和方向六神体系
小六壬包含六个神煞,各有特定含义和象意:
六神 | 五行 | 性质 | 基本含义 | 详细象意 |
大安 | 木 | 吉 | 安稳安逸美事,但也有静止之意 | 事情平稳发展,宜守不宜动。感情平稳但可能平淡,财运稳定。适合问成功类问题。 |
留连 | 土 | 凶 | 反复、犹豫、拖延、纠缠、暧昧 | 纯阴卦,主不光明、秘密。事情未定仍有变化,夜晚测得尤为不稳定。 |
速喜 | 火 | 吉 | 火热、快速、好事,不长久 | 短期事情大吉,长期后劲不足。为朱雀,有口舌争辩之象。需快速行动。 |
赤口 | 金 | 凶 | 口舌官非、凶险意外 | 为白虎,代表挫败。落此宫必定失败,也主精神紧张。有交谈合作等正面象意。 |
小吉 | 水 | 平 | 驿马宫,向好发展但需努力 | 纯阳卦,变化可能性最大。成功取决于个人努力,积极则吉,消极则平。 |
空亡 | 土 | 凶 | 空亡,落空不成,虚无 | 两种可能:大凶或无事发生。问失物为未丢,问寻找为找不到。常代表放弃。 |
算法说明
小六壬推算采用传统三步法:
月将推算:根据农历月份确定起始位置
日期推算:从月将位置按农历日期继续数算
时辰推算:从日期位置按时辰序号最终定位
开发指南
技术栈
Node.js - 运行时环境
@modelcontextprotocol/sdk - MCP 框架
js-calendar-converter - 农历转换库
VS Code 开发
项目已配置好 VS Code 开发环境:
快速启动
按 F5 启动调试模式
或选择
启动小六壬MCP服务器配置启动
可用的启动配置
启动小六壬MCP服务器- 普通启动模式调试小六壬MCP服务器- 调试模式(可设置断点)
可用的任务
Ctrl+Shift+P→Tasks: Run Task选择:启动MCP服务器- 普通启动watch模式启动MCP服务器- 文件变化自动重启(后台运行)测试MCP服务器- 快速连接测试
开发脚本
npm run dev # watch模式启动
npm run debug # 调试模式启动
npm run vscode-test # VS Code集成测试项目结构
├── .vscode/ # VS Code配置文件
│ ├── launch.json # F5启动配置
│ ├── tasks.json # 任务配置
│ └── settings.json # 工作区设置
├── index.js # 主服务器文件
├── mcp-config.json # MCP客户端配置示例
├── vscode-test.js # VS Code测试脚本
├── package.json # 项目配置
└── README.md # 说明文档MCP 客户端集成
使用 mcp-config.json 配置文件可以将此服务器集成到支持MCP的客户端(如Claude Desktop)中:
{
"mcpServers": {
"小六壬": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"xiaoliuren-mcp"
]
}
}
}核心模块
calculateXiaoLiuRen()- 小六壬核心算法getShichen()- 时辰计算getAdvice()- 建议生成
扩展开发
如需扩展功能,可以:
修改六神定义和解释内容
添加更多占卜方法
增强输出格式
集成其他传统算法
许可证
MIT License
Available Tools
1 toolanalyze_xiaoliurenC
分析指定日期时辰的小六壬指导意见
| Name | Required | Description | Default |
|---|---|---|---|
| date | Yes | 日期,格式:YYYY-MM-DD | |
| time | Yes | 时辰,格式:HH:MM 或者传统时辰名称(如:子时、丑时等) | |
| calendar_type | Yes | 日历类型:solar=阳历,lunar=农历 | solar |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions '指导意见' (guidance), implying a read-only, advisory function, but lacks details on output format, accuracy, cultural context, or any side effects. This is insufficient for a tool with no annotation coverage, leaving behavioral traits unclear.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence in Chinese that directly states the tool's function without unnecessary words. It is front-loaded with the core purpose, making it highly concise and well-structured for quick understanding.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (involving cultural divination analysis) and lack of annotations and output schema, the description is incomplete. It does not explain what the guidance entails, how results are presented, or any limitations, leaving significant gaps for an AI agent to understand the tool's full context and usage.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% description coverage, clearly documenting all three parameters (date, time, calendar_type) with formats and enums. The description adds no additional semantic context beyond implying these inputs are used for analysis, so it meets the baseline score without compensating for gaps.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: '分析指定日期时辰的小六壬指导意见' translates to 'Analyze Xiaoliuren guidance for a specified date and time.' This specifies the verb (analyze) and resource (Xiaoliuren guidance) with clear input constraints (date and time). However, with no sibling tools mentioned, there's no explicit differentiation from alternatives, preventing a perfect score.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives, prerequisites, or exclusions. It merely restates the purpose without context for application, such as scenarios where Xiaoliuren analysis is appropriate or limitations like cultural or accuracy considerations.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
1 tool update
- First observed
analyze_xiaoliuren
TDQS
Scored across 1 tool
With only one tool, there is no possibility of ambiguity or overlap between tools. The tool's purpose is clearly defined as analyzing XiaoLiuRen guidance for a specified date and time.
A single tool inherently has perfect naming consistency, as there are no other tools to compare it against. The name 'analyze_xiaoliuren' follows a clear verb_noun pattern.
A single tool is too few for most practical server purposes, as it severely limits functionality and flexibility. While it might suffice for a very narrow scope, it feels incomplete and thin for typical MCP server use cases.
The server is severely incomplete, offering only analysis without any supporting operations like listing available dates, saving results, or managing historical analyses. This creates significant gaps that will hinder agent workflows.
Maintenance
Related MCP Connectors
BaZi four pillars, Chinese zodiac, lunisolar calendar and almanac days for AI agents.
Chinese almanac: lunar calendar, BaZi 八字, daily 宜忌, lucky-day picker, public holidays.
Read-only Bazi, True Solar Time, and Chinese almanac tools in English and Traditional Chinese.
Generate BaZi charts from birth details. Explore Four Pillars, solar terms, and Luck Pillars for d…
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables 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.-
- AlicenseNot gradedqualityDmaintenanceEnables 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.34 npmMIT
- AlicenseNot gradedqualityDmaintenanceProvides 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.108 npmISC
- AlicenseBqualityDmaintenanceProvides traditional Chinese metaphysics analysis capabilities including I Ching divination (hexagram generation and interpretation) and Bazi (Four Pillars) fortune-telling with comprehensive life analysis covering career, wealth, relationships, and health predictions.1020 npm29MIT