MCP.so
登录

紫微斗数

@xavieryang007

关于 紫微斗数

紫微斗数排盘

基本信息

分类

其他

传输方式

stdio

发布者

xavieryang007

提交者

xavieryang007

配置

使用下面的配置,将此服务器添加到你的 MCP 客户端。

{
  "mcpServers": {
    "5fOJpz2QWYjL4-ho3rYxj": {
      "name": "紫微斗数",
      "type": "sse",
      "description": "紫微斗数",
      "isActive": true,
      "baseUrl": "http://127.0.0.1:8080/sse",
      "disabledTools": []
    }
  }
}

工具

未检测到工具

工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。

概览

What is 紫微斗数?

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 applications.

How to use 紫微斗数?

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.

Key features of 紫微斗数

  • 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

Use cases of 紫微斗数

  • Generating a personal Zi Wei Dou Shu birth chart for analysis or display
  • Integrating astrology calculation into a backend system via API
  • Building educational tools or apps related to Chinese metaphysics

FAQ from 紫微斗数

How do I configure the host and port?

Use the --host and --port command-line flags when running the server, for example go run main.go --host 127.0.0.1 --port 3000.

What are the required API parameters?

The endpoints require six parameters: year, month, day, hour, minute (all numbers) and sex (string: "男" or "女").

Does the service automatically convert hour values to traditional Chinese two-hour periods?

Yes, the hour value (0–23) is mapped to the corresponding two-hour period (e.g., 0 is 子时 23:00–01:00, 1 is 丑时 01:00–03:00, etc.) before calculation.

What is the difference between the two endpoints?

/ziwei_yangli treats the input date as solar calendar, while /ziwei_nongli treats it as lunar calendar. Both return a chart in the same JSON format.

What runtime environment is required?

Go version 1.23 or higher is needed to compile and run the service.

评论

其他 分类下的更多 MCP 服务器