Qimena Qi Men Dun Jia & BaZi

io.github.David-riderPublished by GitHub account David-riderv1.0.0Updated Nov 2, 2026

Qi Men Dun Jia charts, BaZi Four Pillars, best-time ranking and solar terms. Free, no key.

VerifiedStreamable HTTPWeb executableLocation & LifestyleKnowledge & Memory

Overview

AI-generated overview

Free hosted MCP server that computes Qi Men Dun Jia charts, BaZi Four Pillars, best-time rankings and solar terms for an assistant to interpret.

What you can do
  • Cast an hour-based Qi Men Dun Jia chart for a moment and place, with four pillars, ju, nine-palace details, patterns, palace scores and lucky directions
  • Build BaZi Four Pillars from a birth time, converting clock time to true solar time and returning Day Master and five-element counts
  • Rank the coming double-hours (1 to 7 days) for a goal such as career, wealth or love, with scores and lucky directions
  • List the 24 solar terms for any year from 1900 to 2100 with UTC and Beijing-time instants
When to use it
Useful when you want an assistant to produce Chinese metaphysics charts and calendar data on demand — for example a Qi Men chart for a meeting, your BaZi pillars, or the best hours for an activity — without doing the calendar maths itself. The server only calculates; interpretation is left to the assistant.
Requirements
Remote Streamable HTTP endpoint at qimena.com/mcp; no account, API key or environment variables. Some clients need a bridge such as mcp-remote to connect. Network access required; roughly 60 requests per minute per IP address.
Before you install
Birth dates, times and locations you send are personal data; the README states nothing is stored, but they do go to a third-party server. Results are deterministic calculations for cultural and reference use, not professional advice, and the assistant supplies any interpretation.

Installation

In SourceWeft

  1. Open Qimena Qi Men Dun Jia & BaZi in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Web executable via Streamable HTTP. Remote servers run from the web runtime once configured in a workspace.

Use with an agent

Paste this prompt into Claude Code, Codex, Cursor or another agent — or into SourceWeft chat. The agent reads this server's install guide, shows you its publisher, endpoint and sign-in, and adds it to your client once you agree. Keys never go into a command.

Read https://sourceweft.com/mcp/io.github.David-rider%2Fqimena-mcp/install.md and connect the MCP server it describes to my client. Before changing any config, show me its publisher, endpoint and sign-in method and wait for my OK. Never put an API key in a command or in a file I would commit; ask me where it should come from.

Read the install guide the agent follows

Other MCP clients

Add this to your client's mcpServers config.

{
  "mcpServers": {
    "qimena-qi-men-dun-jia-bazi": {
      "type": "http",
      "url": "https://qimena.com/mcp"
    }
  }
}

README

Qimena MCP Server · 天衍奇门 MCP 服务

Free, hosted Model Context Protocol server for Qi Men Dun Jia (奇门遁甲) and BaZi Four Pillars (八字) calculations, from Qimena.

  • Endpoint: https://qimena.com/mcp
  • Transport: Streamable HTTP (stateless)
  • Auth: none, no API key
  • Data: nothing you send is stored
  • Cost: free

The tools are deterministic: the same engine as the qimena.com website, with no AI model behind them. Your assistant does the interpreting; the server does the calendar and chart maths.

This repository holds documentation only. The server runs at qimena.com.

中文说明


Tools

ToolWhat it returns
qimen_chartAn hour-based Qi Men Dun Jia chart for a moment and place: four pillars, ju, Chief Star and Door, and for each of the nine palaces the deity, star, door, heaven/earth/hidden stems, void, horse star, punishment and door pressure, plus patterns, palace scores and lucky directions.
bazi_pillarsFour Pillars for a birth moment. Converts clock time to true solar time using that date's zone rules (daylight saving included) and the longitude. The year follows Li Chun; the day changes at 23:00 true solar time. Returns the pillars, Day Master and five-element counts.
best_timesCasts a chart for every double-hour of the next 1 to 7 days and ranks them for a goal (general, career, wealth, love), using the person's Day Master. Returns the top windows with time range, score and lucky direction.
solar_termsThe 24 solar terms of any year from 1900 to 2100, with UTC and Beijing-time instants (within about a minute of the Hong Kong Observatory).

Parameters

qimen_chart

  • datetime: local time "YYYY-MM-DDTHH:mm" in timezone. Omit for now.
  • timezone: IANA zone such as "Asia/Shanghai" or "America/New_York". Default Asia/Shanghai.
  • longitude: degrees, east positive. Default: the zone's standard meridian.
  • focus: general, career, wealth or love. Default general.

bazi_pillars

  • birth_datetime (required): "YYYY-MM-DDTHH:mm", as on the birth certificate.
  • timezone (required): IANA zone of the birthplace.
  • longitude: birthplace longitude, east positive.

best_times

  • birth_date (required): "YYYY-MM-DD".
  • focus: general, career, wealth or love.
  • longitude: where the person is now. Default 120.
  • days: 1 to 7. Default 7.
  • top: 1 to 10. Default 5.

solar_terms

  • year (required): 1900 to 2100.

Connect

Claude Code

bash
claude mcp add --transport http qimena https://qimena.com/mcp

Claude Desktop (claude_desktop_config.json, through mcp-remote)

json
{  "mcpServers": {    "qimena": {      "command": "npx",      "args": ["-y", "mcp-remote", "https://qimena.com/mcp"]    }  }}

Cursor (~/.cursor/mcp.json)

json
{  "mcpServers": {    "qimena": { "url": "https://qimena.com/mcp" }  }}

VS Code (.vscode/mcp.json)

json
{  "servers": {    "qimena": { "type": "http", "url": "https://qimena.com/mcp" }  }}

Any other client that speaks Streamable HTTP can use the URL directly.

Try it

Ask your assistant things like:

  • "Cast a Qi Men chart for now in New York and tell me the best direction for a business meeting."
  • "What are my BaZi pillars? I was born 1990-05-17 08:30 in Shanghai."
  • "Born 1985-11-02. Which double-hours in the next three days are best for signing a contract?"
  • "When is Li Chun in 2027?"

Or call it directly:

bash
curl -s https://qimena.com/mcp \  -H "Content-Type: application/json" \  -H "Accept: application/json, text/event-stream" \  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"solar_terms","arguments":{"year":2027}}}'

Limits and notes

  • About 60 requests a minute per IP address.
  • Calculation rules and how they were checked: Qi Men calculation rules.
  • More about the server: Qimena MCP Server.
  • Results are for cultural and reference use, not professional advice.

Contact

[email protected] · qimena.com


中文说明

天衍奇门(qimena.com)提供的免费 MCP 服务,让 AI 助手可以直接调用奇门遁甲和八字排盘。

  • 地址: https://qimena.com/mcp
  • 连接方式: Streamable HTTP(无状态)
  • 不需要密钥,免费使用,不保存您发送的任何内容。

工具都是确定性计算,和 qimena.com 网站用的是同一套排盘引擎,背后没有 AI 模型:排盘和历法由服务器算,解读由您的 AI 助手完成。本仓库只放说明文档,服务运行在 qimena.com。

四个工具

工具作用
qimen_chart按时间和地点起时家奇门盘:四柱、局数、值符值使,九宫的八神、九星、八门、天盘地盘暗干、空亡、驿马、击刑、门迫,以及格局、宫位评分和吉方。
bazi_pillars按出生时间排八字:用出生当天的时区规则(含夏令时)和经度换算真太阳时;年柱以立春为界,23:00(真太阳时)换日。返回四柱、日主和五行数量。
best_times把未来 1–7 天的每个时辰都起一盘,按目标(综合、事业、财运、感情)和本人日主排序,返回最好的几个时段、评分和当时的吉方。
solar_terms1900–2100 年任一年的二十四节气时刻(UTC 和北京时间,与香港天文台相差约一分钟以内)。

连接

Claude Code:

bash
claude mcp add --transport http qimena https://qimena.com/mcp

其他客户端的配置见上面英文部分的 Connect(Claude Desktop、Cursor、VS Code)。

可以这样问

  • “用纽约现在的时间起一盘奇门,看看商务见面往哪个方向好。”
  • “我 1990-05-17 08:30 生于上海,八字是什么?”
  • “我生于 1985-11-02,未来三天哪个时辰适合签合同?”
  • “2027 年立春是哪天几点?”

说明

联系:[email protected]

Source: README.md at commit 361ec71

Tools

4

qimen_chart

Qi Men Dun Jia chart

Cast an hour-based Qi Men Dun Jia (奇门遁甲) chart for a moment and place: four pillars, ju, Chief Star and Door, and for each of the nine palaces the deity, star, door, heaven/earth/hidden stems, void, horse star, punishment and door pressure, plus detected patterns, palace scores for the chosen focus and the lucky directions.

Parametersfocusdatetimetimezonelongitude

bazi_pillars

BaZi Four Pillars

Four Pillars (八字) for a birth moment: converts the clock time with the zone rules for that date (daylight saving included) and the longitude to true solar time; the year follows Li Chun and the day changes at 23:00 true solar time. Returns the pillars, Day Master, five-element counts and the time conversion details.

Parameterstimezonerequiredlongitudebirth_datetimerequired

best_times

Best upcoming double-hours

Cast a Qi Men chart for every double-hour of the next few days and rank them for a goal, using the person's Day Master from the birth date. Returns the top windows with date, hour branch, true-solar-time range, score and the lucky direction at that time.

Parameterstopdaysfocuslongitudebirth_daterequired

solar_terms

Solar terms of a year

The 24 solar terms (节气) of a calendar year, 1900-2100, with UTC and Beijing-time instants from the same table the charts use (within about a minute of the Hong Kong Observatory).

Parametersyearrequired

Version history

1
  1. v1.0.0LatestOct 26, 2026

Score

90% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 daysRequired25 pts
  • Auth declaredRequired10 pts
  • Tools listedRequired15 pts
  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts

    Declare a license in the repository or the registry entry.