divination-chart-mcp CLAUDE.md

divination-chart-mcp CLAUDE.md is an instructions file for coding agents from wangsquirrel/divination-chart-mcp. It costs 734 tokens per session, scanned A, original, MIT.

Project instructions for a Python MCP server that generates Chinese divination charts, including six-line readings and BaZi birth-chart readings. They document setup, commands, transports, testing, and deployment.

In plain words
What is it for?
Use them to install dependencies, start the server over supported connection methods, test its tools, run example clients, or deploy it with Uvicorn or Vercel.
Why use it?
They give a coding agent the project-specific commands and structure needed to work on or run the server correctly.

Instructions file

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/wangsquirrel/divination-chart-mcp/claude-md
Clone the repo
git clone --depth 1 https://github.com/wangsquirrel/divination-chart-mcp

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for divination-chart-mcp CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/wangsquirrel/divination-chart-mcp/claude-md.svg)](https://agentmods.dev/instructions/wangsquirrel/divination-chart-mcp/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/wangsquirrel/divination-chart-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/wangsquirrel/divination-chart-mcp/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 734 This file is loaded in full into every session.
When invoked 734 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00734 $0.00734
Opus 5 $0.00367 $0.00367
Sonnet 5 $0.00147 $0.00147
Haiku 4.5 $0.00073 $0.00073

Measured 3d ago against content hash 0405546e900f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

divination-chart-mcp CLAUDE.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

CLAUDE.md · 65 lines

What it actually says

本文件为 Claude Code (claude.ai/code) 提供在此代码库中工作的指导。

项目概述

这是一个用于生成占卜排盘的 MCP (Model Context Protocol) 服务器。目前实现六爻排盘和八字排盘。

常用命令

# 安装依赖
uv sync

# 运行 stdio 传输的 MCP 服务器(默认)
uv run --with . divination-chart-mcp

# 指定传输方式运行
uv run --with . divination-chart-mcp --transport stdio
uv run --with . divination-chart-mcp --transport sse
uv run --with . divination-chart-mcp --transport streamable-http

# 测试 MCP 服务器
uvx fastmcp list --command 'uv run --with . divination-chart-mcp' --json

# 运行客户端示例
uv run python examples/mcp_client.py

# 使用 uvicorn 部署
uvicorn api.index:app --host 0.0.0.0 --port 3000

架构

divination-chart-mcp/
├── src/divination_chart_mcp/          # 主包
│   ├── server.py                      # FastMCP 服务器 + @fast_mcp.tool() 定义
│   ├── models.py                      # Pydantic 输入模型
│   ├── cli.py                         # CLI 入口点 (sixline, all)
│   └── asgi.py                        # ASGI 应用导出(用于部署)
├── api/index.py                       # Vercel 部署入口
└── examples/
    ├── mcp_client.py                  # 演示如何调用工具
    └── start_server.py                # 简单的服务器启动脚本

核心模式server.py 定义 @fast_mcp.tool() 函数,使用外部 divicast 库进行占卜逻辑。工具接收 models.py 中的 Pydantic 模型作为输入,返回类型化输出。

Divicast 库 (divicast @ git+https://github.com/wangsquirrel/[email protected]) 提供:

  • divicast.sixline.DivinatorySymbol - 六爻占卜
  • divicast.sixline.to_standard_format() - 输出格式化
  • 计划中:divicast.bazi.BaziSymbol - 八字排盘

关键文件

  • server.py:23-37 - divination_liu_yao 工具定义(当前唯一的 MCP 工具)
  • models.py:5-18 - DivinationInput 模型,包含 year/month/day/hour/yaogua
  • pyproject.toml:11-16 - 依赖配置,包括 divicast git 包

开发注意事项

  • 包使用 uv_build 构建,目标是 wheel
  • CLI 脚本定义在 pyproject.toml [project.scripts]
    • sixlinecli:sixline(stdio 传输)
    • divination-chart-mcpcli:all(交互式选择传输方式)
  • FastMCP 使用 dereference_schemas=True 以获得更扁平的 schema 输出
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 65 lines · 734 tokens per session scan A 0405546e900f

Subscribe to this mod's changes

divination-chart-mcp CLAUDE.md is an instructions file published in the GitHub repository wangsquirrel/divination-chart-mcp (1 stars, last pushed 4mo ago), licensed MIT. It adds 734 tokens to every session, about $0.0037 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.