About 紫微斗数
紫微斗数 is a Go microservice for generating Zi Wei Dou Shu charts from Gregorian or lunar dates. It converts the supplied hour into a traditional time period and returns the chart data as JSON.
Key features
- 01Gregorian-date chart generation
- 02Lunar-date chart generation
- 03Automatic traditional-hour conversion
- 04Standard JSON responses
Use cases
- 01Generate a chart from a Gregorian birth date
- 02Generate a chart from a lunar birth date
MCP support
The project uses mcp-go, but the README does not describe its MCP interface or the capabilities it exposes to MCP clients.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project README紫微斗数排盘服务
项目简介
基于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)
服务配置
通过命令行参数配置:
# 指定监听地址和端口
go run main.go --host 127.0.0.1 --port 3000
依赖库
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.