XiaoLiuRen MCP (Model Context Protocol for XiaoLiuRen) logo

XiaoLiuRen MCP (Model Context Protocol for XiaoLiuRen)

Community
Sneezry

一个基于 Model Context Protocol (MCP) 的小六壬占卜分析服务器,提供传统的六神占卜功能。

PublisherSneezry
RepositoryXiaoLiuRen-MCP
LanguageJavaScript
Forks
1
Stars
10
Available tools
1
Transport typestdio
Categories
Links
  • Connect tools to AI workflows

    XiaoLiuRen MCP (Model Context Protocol for XiaoLiuRen) exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 1 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    10 stars and 1 forks from the linked repository.

小六壬 MCP (XiaoLiuRen Model Context Protocol)

Install with NPX in VS Code

一个基于 Model Context Protocol (MCP) 的小六壬占卜分析服务器,提供传统的六神占卜功能。

小六壬出自《增补许真君万全玉匣记》,名为“李淳风六壬时课”,是一种古代靠“掐指”来占卜的方法,源于六曜历注和六轮兀法(《居家必用事类全集·六轮经兀法》)。

占时将“大安、留连、速喜、赤口、小吉、空亡”分置食指、中指、无名指上,以“月、日、时”轮指数出,得大安、速喜、小吉为吉,其余为凶。明清时期的白话小说有其踪迹,如《醒世姻缘传》:“街上一个打路庄板的瞎子走过。相大舅叫他进来,与狄希陈起课,说是速喜,时下就到”,《隋唐演义》:“叔宝便说个申时。妇人捻指一算,便道:卦名速喜”。

其“大安、留连、速喜、赤口、小吉、空亡”和六壬式十二天将的六神“青龙、玄武、朱雀、白虎、六合、勾陈”对应,可能是称为六壬时课或小六壬的原因。

—— 维基百科

功能介绍

  • 🗓️ 精准农历转换:支持阳历转农历,提供准确的干支纪年信息
  • 🕐 时辰计算:自动识别传统十二时辰
  • 🔮 小六壬占卜:基于传统算法的六神推算
  • � 智能解读:提供详细的占卜解释和行动建议

使用方法

安装依赖

bash
npm install

启动服务

bash
node index.js

工具调用

服务器提供 analyze_xiaoliuren 工具:

参数:

  • date: 日期(格式:YYYY-MM-DD)
  • time: 时间(格式:HH:MM)
  • calendar_type: 历法类型("solar" = 阳历,"lunar" = 农历)

调用示例:

json
{
  "name": "analyze_xiaoliuren",
  "arguments": {
    "date": "2025-09-25",
    "time": "14:30", 
    "calendar_type": "solar"
  }
}

输出示例

小六壬占卜结果:

🗓️ 输入信息:
- 原始日期:2025-09-25(阳历)
- 时辰:14:30 (未时)

📅 农历信息:
- 农历日期:2025年八月初四
- 年干支:乙巳
- 月干支:乙酉
- 日干支:丁酉
- 时辰:未时

🧮 小六壬推算过程:
- 农历8月 → 留连
- 从留连数4日 → 小吉
- 从小吉数8(时辰序号) → 空亡

🔮 占卜结果:【空亡】
- 五行属性:土
- 吉凶性质:凶
- 基本含义:空、亡,事情落空不成,但也有无事之意。性质特殊,倾向虚无。
- 详细解释:空亡有两种可能:一是大凶结果很差,二是什么都不会发生。问失物为未丢,问寻找为找不到。常代表弃考、放弃等情况。

💡 建议指导:
🌫️ 情况比较特殊,可能有两种截然不同的结果。
• 可能性一:事情完全落空,什么都不会发生
• 可能性二:结果很差,遭遇较大失败  
• 特殊含义:在某些情况下反而表示"没有问题"
• 心理状态:可能已经有放弃的念头
• 总体建议:重新审视目标,或许应该转换思路和方向

六神体系

小六壬包含六个神煞,各有特定含义和象意:

六神五行性质基本含义详细象意
大安木吉安稳安逸美事,但也有静止之意事情平稳发展,宜守不宜动。感情平稳但可能平淡,财运稳定。适合问成功类问题。
留连土凶反复、犹豫、拖延、纠缠、暧昧纯阴卦,主不光明、秘密。事情未定仍有变化,夜晚测得尤为不稳定。
速喜火吉火热、快速、好事,不长久短期事情大吉,长期后劲不足。为朱雀,有口舌争辩之象。需快速行动。
赤口金凶口舌官非、凶险意外为白虎,代表挫败。落此宫必定失败,也主精神紧张。有交谈合作等正面象意。
小吉水平驿马宫,向好发展但需努力纯阳卦,变化可能性最大。成功取决于个人努力,积极则吉,消极则平。
空亡土凶空亡,落空不成,虚无两种可能:大凶或无事发生。问失物为未丢,问寻找为找不到。常代表放弃。

算法说明

小六壬推算采用传统三步法:

  1. 月将推算:根据农历月份确定起始位置
  2. 日期推算:从月将位置按农历日期继续数算
  3. 时辰推算:从日期位置按时辰序号最终定位

开发指南

技术栈

  • 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服务器 - 快速连接测试

开发脚本

bash
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)中:

json
{
  "mcpServers": {
    "小六壬": {
			"type": "stdio",
			"command": "npx",
			"args": [
				"-y",
				"xiaoliuren-mcp"
			]
		}
  }
}

核心模块

  • calculateXiaoLiuRen() - 小六壬核心算法
  • getShichen() - 时辰计算
  • getAdvice() - 建议生成

扩展开发

如需扩展功能,可以:

  • 修改六神定义和解释内容
  • 添加更多占卜方法
  • 增强输出格式
  • 集成其他传统算法

许可证

MIT License

Installation

TypingMind
Prerequisites:

Node.js 18+

{
  "mcpServers": {
    "sneezry-xiaoliuren-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "xiaoliuren-mcp"
      ]
    }
  }
}

Available Tools

  • analyze_xiaoliuren

    分析指定日期时辰的小六壬指导意见

Use XiaoLiuRen MCP (Model Context Protocol for XiaoLiuRen) MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once XiaoLiuRen MCP (Model Context Protocol for XiaoLiuRen) is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add XiaoLiuRen MCP (Model Context Protocol for XiaoLiuRen) as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the XiaoLiuRen MCP (Model Context Protocol for XiaoLiuRen) MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "sneezry-xiaoliuren-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "xiaoliuren-mcp"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the XiaoLiuRen MCP (Model Context Protocol for XiaoLiuRen) MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the XiaoLiuRen MCP (Model Context Protocol for XiaoLiuRen) MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use XiaoLiuRen MCP (Model Context Protocol for XiaoLiuRen) to help me with this task?
XiaoLiuRen MCP (Model Context Protocol for XiaoLiuRen)
Sure. I read it.
Here is what I found using XiaoLiuRen MCP (Model Context Protocol for XiaoLiuRen).

Frequently asked questions

What is the XiaoLiuRen MCP (Model Context Protocol for XiaoLiuRen) MCP server used for?

XiaoLiuRen MCP (Model Context Protocol for XiaoLiuRen) is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use XiaoLiuRen MCP (Model Context Protocol for XiaoLiuRen) MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use XiaoLiuRen MCP (Model Context Protocol for XiaoLiuRen) with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use XiaoLiuRen MCP (Model Context Protocol for XiaoLiuRen) MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With XiaoLiuRen MCP (Model Context Protocol for XiaoLiuRen) connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect XiaoLiuRen MCP (Model Context Protocol for XiaoLiuRen) MCP to TypingMind?

XiaoLiuRen MCP (Model Context Protocol for XiaoLiuRen) runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does XiaoLiuRen MCP (Model Context Protocol for XiaoLiuRen) MCP provide in TypingMind?

XiaoLiuRen MCP (Model Context Protocol for XiaoLiuRen) exposes 1 MCP tools that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use XiaoLiuRen MCP (Model Context Protocol for XiaoLiuRen) MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If XiaoLiuRen MCP (Model Context Protocol for XiaoLiuRen) requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇