紫微斗数
About
A microservice developed in Go for Zi Wei Dou Shu (Purple Star Astrology) chart calculation. It supports both solar and lunar calendar date inputs and provides two REST API endpoints. This service is intended for developers integrating Chinese astrology calculations into their…
Details
- Author
- xavieryang007
- Downloads
- 260
- Categories
- Other
Jump to
- Supports both solar and lunar calendar calculations
- Automatic conversion of clock hours to traditional Chinese two-hour periods
- Returns structured JSON data for easy integration
- Built with Go for fast performance and simple deployment
- Runnable as a standalone microservice via command line
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
紫微斗数Command (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
Clone the repository, run go mod tidy and go run main.go to start the server (Go 1.23+ required). The service listens on 127.0.0.1:3000 by default; use --host and --port flags to customize. Send GET requests to /ziwei_yangli (solar calendar) or /ziwei_nongli (lunar calendar) with the required query parameters (year, month, day, hour, minute, sex). The response is a standard JSON object containing the calculated chart.
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"\u7d2b\u5fae\u6597\u6570": {
"5fOJpz2QWYjL4-ho3rYxj": {
"name": "\u7d2b\u5fae\u6597\u6570",
"type": "sse",
"description": "\u7d2b\u5fae\u6597\u6570",
"isActive": true,
"baseUrl": "http://127.0.0.1:8080/sse",
"disabledTools": []
}
}
}
}
McpServers
{
"5fOJpz2QWYjL4-ho3rYxj": {
"name": "\u7d2b\u5fae\u6597\u6570",
"type": "sse",
"description": "\u7d2b\u5fae\u6597\u6570",
"isActive": true,
"baseUrl": "http://127.0.0.1:8080/sse",
"disabledTools": []
}
}
紫微斗数排盘服务
项目简介
基于Go语言开发的紫微斗数排盘微服务,提供阳历/农历两种排盘方式。功能特性
- 阳历排盘接口/ziwei_yangli
- 农历排盘接口 /ziwei_nongli
- 支持时辰自动换算
- 返回标准JSON格式数据
快速开始
环境要求
- Go 1.23+编译运行
go mod tidy
go run main.go
API文档
请求参数
| 参数名 | 类型 | 必填 | 说明 | |--------|------|-----|-----| | year | 数字 | 是 | 年份(如2024) | | month | 数字 | 是 | 月份(1-12) | | day | 数字 | 是 | 日期(1-31) | | hour | 数字 | 是 | 小时(0-23) | | minute | 数字 | 是 | 分钟(0-59) | | sex | 字符串 | 是 | 性别(男/女) |时辰对照表
服务自动将小时转换为传统时辰:0: 子时 (23:00-01:00)
1: 丑时 (01:00-03:00)
...
11: 亥时 (21:00-23:00)
服务配置
通过命令行参数配置: ```bashSign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.



