Lunar MCP Server

1

Add it to Claude Code

Run this in a terminal.

Run in terminal
claude mcp add lunar-mcp -- docker run -d -p 8080:8080 ghcr.io/xiaoyijiang-c/lunar-mcp:latest
README.md

MCP server for Chinese traditional calendar, fortune telling, and divination.

lunar-mcp

MCP Server for Chinese Calendar

简介

基于 lunar-go 实现的 MCP 服务器,提供中国农历、八字、风水等传统日历能力给 AI Agent 使用。

功能

分类 工具
基础 lunar_date, zodiac_bazi, solar_terms, festivals
日历 solar_calendar, month_calendar, year_calendar
八字 eight_char_full, advanced_bazi, destiny_analysis, fortune_periods
命理 date_selector, marriage_compat, name_generator
高级 iching_divination, nine_star_flying
神煞 shen_sha, pengzu_baiji

快速开始

Docker

docker run -d -p 8080:8080 ghcr.io/xiaoyijiang-c/lunar-mcp:latest

本地运行

go build -o lunar-mcp .
./lunar-mcp

API

# 健康检查
curl http://localhost:8080/health

# 查询农历
curl -X POST http://localhost:8080/rpc \
  -d '{"method":"tools/call","params":{"name":"lunar_date","arguments":{"year":2026,"month":3,"day":5}}}'

技术栈

  • Go
  • MCP Protocol (JSON-RPC 2.0)
  • Docker

License

MIT

Tools (6)

lunar_dateGet the lunar date for a specific Gregorian date.
zodiac_baziCalculate zodiac and Bazi information.
solar_termsRetrieve solar terms for a given date.
festivalsGet traditional festivals for a given date.
eight_char_fullGet full eight-character (Bazi) analysis.
iching_divinationPerform I-Ching divination.

Configuration

claude_desktop_config.json
{"mcpServers": {"lunar-mcp": {"command": "lunar-mcp"}}}

Try it

What is the lunar date for March 5, 2026?
Can you provide a Bazi analysis for someone born on January 1st, 1990?
What are the upcoming traditional Chinese festivals for this month?
Perform an I-Ching divination for my current situation.

Frequently Asked Questions

What are the key features of Lunar MCP?

Provides Chinese lunar calendar conversions. Calculates Bazi (eight characters) and zodiac information. Retrieves traditional solar terms and festivals. Supports advanced divination tools like I-Ching and Nine Star Flying. Built with Go for high performance.

What can I use Lunar MCP for?

Integrating traditional Chinese calendar data into personal productivity apps. Automating cultural research for writers or historians. Building AI-powered fortune telling or astrology assistants. Planning events based on traditional Chinese auspicious dates.

How do I install Lunar MCP?

Install Lunar MCP by running: docker run -d -p 8080:8080 ghcr.io/xiaoyijiang-c/lunar-mcp:latest

What MCP clients work with Lunar MCP?

Lunar MCP works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Lunar MCP docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare