Wellknown found it in public sources; nobody has proven control of it yet. Claiming takes one click if the repository is under your GitHub account, or a small file on your domain otherwise. Verified owners get the badge, 15-minute checks, status alerts, edits that outrank crawled data, and a ranking boost.
Agents can do it too: POST https://wellknown.network/api/v1/claims with {"agent":"quhua-mcp","method":"well_known_file"} — machine-readable steps at claim.json, guide at /docs/claim.
Everything here was measured by our prober or read from a registry. Nothing is self-reported.
Attributed to the source that supplied each field. Treated as claims, not facts.
# MCP Server —— 让 AI Agent 直接查中国行政区划 > 本仓库附带一个 [MCP](https://modelcontextprotocol.io) 服务,把区划解析能力交给 > Claude Desktop / Claude Code / Cursor 等支持 MCP 的 AI 客户端。 > > **为什么需要它**:语言模型擅长理解和改写文字,但它分不清「一个行政区划是否真实存在」—— > 那是一次**查找**,不是一次**生成**。模型遇到不确定的地址会顺着语感编一个,而且不会告诉你 > 它在编。本服务提供那次查找,**查不到时诚实返回失败**。 --- ## 一、安装与运行 三种方式,按省事程度排。**先看方式一**——不需要克隆仓库、不需要虚拟环境、不需要手动装依赖。 ### 方式一:`uvx`(已发布到 PyPI 后) 配置里直接写: ```json { "mcpServers": { "quhua": { "command": "uvx", "args": ["quhua-mcp"] } } } ``` 需要机器上有 [`uv`](https://docs.astral.sh/uv/)(`pip install uv` 或官方安装脚本,单文件、无依赖)。 ### 方式二:`uv run` 直接跑仓库里的脚本(已克隆仓库) `mcp/mcp_server.py` 顶部带 [PEP 723](https://peps.python.org/pep-0723/) 内联依赖声明, 所以 uv 会**自己把依赖准备好**——不用建虚拟环境,也不用 `pip install`: ```bash uv run --no-project mcp/mcp_server.py # 先本地试跑,Ctrl-C 退出 ``` 配置里: ```json { "mcpServers": { "quhua": { "command": "uv", "args": ["run", "--no-project", "/absolute/path/to/real-china-division/mcp/mcp_server.py"] } } } ``` ### 方式三:手动(用已有的 Python 环境) ```bash pip install "mcp>=1.9" pypinyin ``` 配置里 `command` 指向**装了依赖的** Python 解释器,`args` 指向 `mcp/mcp_server.py`。 ### 依赖说明 - **`mcp`** —— 官方 MCP Python SDK,必需。 - **`pypinyin`** —— 错字纠错依赖它。未安装服务**不会出错**,只是「山冬省 → 山东省」这类错字不会被纠正 (查不到时仍然诚实拒绝,不会编造,详见 §四)。本项目的 PyPI 包已把它列为硬依赖, 目的就是让不同用户拿到一致的结果。 ### MCP SDK 版本 本服务**同时兼容 MCP Python SDK 1.x 与 2.x**——2.x 把 `FastMCP` 改名为 `MCPServer` 且导入路径也变了, 官方不提供兼容垫片。你不需要关心自己装到的是哪一版。 ## 二、配置 ⚠️ **各客户端的配置格式并不统一**——多数用 `mcpServers`,但 opencode 是另一套 schema。 下面按客户端给,**路径请换成本机绝对路径**。 ### Claude Desktop / Cursor / Trae / WorkBuddy(共用 `mcpServers` 格式) ```json { "mcpServers": { "quhua": { "command": "/absolute/path/to/python", "args": ["/absolute/path/to/real-china-division/mcp/mcp_server.py"] } } } ``` | 客户端 | 配置位置 | |---|---| | Claude Desktop | `claude_desktop_config.json` | | Cursor | `~/.cursor/mcp.json` | | Trae | 设置 → MCP → 添加 → 手动添加(粘贴上面的 JSON);或项目级 `.trae/mcp.json` | | WorkBuddy | `~/.workbuddy/mcp.json`;写入后还…
Mapped onto the structured taxonomy from declared text and observed tool names. Confidence shown for derived entries.
Every source is kept verbatim. Field changes are logged as events.