Tung Shing Calendar MCP server

Provides cross-calendar date parsing, formatting, and manipulation for Gregorian and lunar calendars.
Back to servers
Provider
Baran Wang
Release date
Jan 22, 2025
Language
TypeScript
Stats
28 stars

通胜 MCP 服务是一个基于 Model Context Protocol (MCP) 的中国传统黄历计算服务,提供公历农历转换、每日宜忌、时辰信息以及传统命理学的详细数据。

安装

要使用通胜 MCP 服务,您需要在 MCP 配置文件中添加以下内容:

{
  "mcpServers": {
    "tung-shing": {
      "command": "npx",
      "args": ["-y", "mcp-tung-shing@latest"]
    }
  }
}

这将通过 npx 安装并运行最新版本的 MCP 通胜服务。

使用方法

获取黄历信息

您可以使用 get-tung-shing 工具获取指定日期的黄历信息。

参数说明

参数名 类型 必填 默认值 描述
startDate string 当天 开始日期,格式:"YYYY-MM-DD"
days number 1 获取天数
includeHours boolean false 是否包含时辰信息
tabooFilters array - 筛选宜忌事项类型,条件之间为或关系
tabooFilters[].type 1 | 2 - 过滤类型:宜(1)、忌(2)
tabooFilters[].value string - 要筛选的宜忌事项

示例用法

获取当天黄历信息

{
  "toolInput": {
    "startDate": "2023-05-01"
  }
}

获取多天黄历信息

{
  "toolInput": {
    "startDate": "2023-05-01",
    "days": 3
  }
}

获取包含时辰信息的黄历

{
  "toolInput": {
    "startDate": "2023-05-01",
    "includeHours": true
  }
}

筛选特定宜忌事项

{
  "toolInput": {
    "startDate": "2023-05-01",
    "tabooFilters": [
      {
        "type": 1,
        "value": "结婚"
      },
      {
        "type": 2,
        "value": "出行"
      }
    ]
  }
}

这个示例将返回2023年5月1日的黄历信息,并筛选出"宜结婚"或"忌出行"的数据。

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later