Skip to main content
Glama
rs-mcp-lunar

rs-mcp-lunar

by Zayrick

rs-mcp-lunar

BaZi and Zi Wei Dou Shu MCP server for Cloudflare Workers, written in Rust and compiled to WebAssembly. It exposes a stateless Streamable HTTP endpoint at /lunar and returns Markdown-only tool results.

Tools

Domain

Tools

BaZi

bazi_chart, bazi_structure, bazi_timeline, bazi_period_detail, bazi_shensha

Zi Wei Dou Shu

ziwei_chart, ziwei_palace_detail, ziwei_horoscope_overview, ziwei_scope_detail, ziwei_topic_context

Calendar calculations use tyme4rs and iztro; public input schemas are validated by jsonschema.

Related MCP server: taibu

Local development

Install Rust 1.89+, Node.js 22+, the Wasm target, and the pinned Worker builder:

rustup target add wasm32-unknown-unknown
cargo install worker-build --version 0.8.5 --locked
npm ci
npm run dev

The local MCP URL is http://127.0.0.1:8787/lunar. npm run dev builds build/index.js and build/index_bg.wasm before starting Wrangler.

Deployment

Pushes to main run .github/workflows/deploy.yml. GitHub Actions compiles the complete Worker bundle first, then Wrangler uploads that prebuilt bundle without invoking any Cloudflare-side custom build.

Configure these GitHub Actions secrets in the production environment:

  • CLOUDFLARE_API_TOKEN: scoped to deploy Workers.

  • CLOUDFLARE_ACCOUNT_ID: the target Cloudflare account ID.

Manual deployment uses the same prebuilt-artifact boundary:

npm run build
npm run deploy:dry-run
npm run deploy

Browser clients that send an Origin header must be listed in the MCP_ALLOWED_ORIGINS Worker variable. See the deployment guide for setup and production notes.

Verify

cargo fmt --all -- --check
cargo clippy --all-targets --locked -- -D warnings
cargo clippy --target wasm32-unknown-unknown --lib --locked -- -D warnings
cargo test --all-targets --locked
npm run build
npm run deploy:dry-run

See architecture, contract notes, security notes, and third-party notices.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Provides professional Chinese astrology calculations including Four Pillars, Five Elements, zodiac signs, and lunar calendar details. It allows users to perform accurate Bazi analysis with global timezone support directly within MCP-compatible clients.
      18 npm
      10
      MIT
    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables traditional Chinese metaphysics tools like Bazi, Ziwei, and Qimen via MCP, integrating AI analysis for divination and fortune-telling.
      788
      AGPL 3.0
    • A
      license
      A
      quality
      B
      maintenance
      Provides traditional Chinese astrology (Bazi, Ziwei) and divination (Liuyao, Meihua, Qimen, etc.) calculations as MCP tools for AI assistants.
      18
      299 npm
      133
      Apache 2.0
    • A
      license
      Not graded
      quality
      C
      maintenance
      Provides free hosted Zi Wei Dou Shu (Purple Star Astrology) natal charts and six-level transits as MCP tools, enabling AI agents to compute charts and transits through natural language.
      MIT