{"$schema":"https://wellknown.network/schemas/agent-record-v1.json","schemaVersion":"1","id":"ag_6c57t5cxnp3d","handle":"chinese-char-counter-mcp","url":"https://wellknown.network/agents/chinese-char-counter-mcp","links":{"self":"https://wellknown.network/agents/chinese-char-counter-mcp/record.json","html":"https://wellknown.network/agents/chinese-char-counter-mcp","markdown":"https://wellknown.network/agents/chinese-char-counter-mcp/record.md","api":"https://wellknown.network/api/v1/agents/chinese-char-counter-mcp","status":"https://wellknown.network/api/v1/agents/chinese-char-counter-mcp/status","claim":"https://wellknown.network/agents/chinese-char-counter-mcp/claim","claimApi":"https://wellknown.network/api/v1/claims","claimDescriptor":"https://wellknown.network/agents/chinese-char-counter-mcp/claim.json","badge":"https://wellknown.network/agents/chinese-char-counter-mcp/badge.svg","openapi":"https://wellknown.network/openapi.json","history":"https://wellknown.network/api/v1/agents/chinese-char-counter-mcp/history","tools":"https://wellknown.network/api/v1/agents/chinese-char-counter-mcp/tools"},"ard":{"identifier":"urn:air::server:chinese-char-counter-mcp","type":"application/mcp-server-card+json"},"kind":"mcp_server","declared":{"name":"chinese-char-counter-mcp","summary":"MCP server (stdio) that counts Chinese characters in a text, excluding punctuation, whitespace, Latin letters and digits.","description":"# chinese-char-counter-mcp\n\n一个用 Python 实现的 MCP 服务（Model Context Protocol Server，STDIO 传输），\n用于统计**一段文本里的中文字数**——标点、空格、英文字母、数字、emoji 等一律不计入。\n\n- 传输方式：STDIO（本地进程，无网络、无 API Key、无环境变量）\n- 运行时依赖：Python >= 3.10、`mcp>=1.0.0,<2`\n- 已通过 ModelScope MCP 广场托管部署所需的配置形态（`command` 为 `uvx`，包发布到 PyPI）\n\n## 这个服务解决什么问题\n\n大模型写中文文案时，\"字数\"常常对不上：把标点、空格、英文单词都算进去，或者把\nemoji 也算成字。本服务给出一个确定的答案：只数中文字符，并把标点/字母/数字/空白\n等分项一并返回，方便直接用于文案校验、作业字数检查、标题长度限制等场景。\n\n## 客户端配置\n\n把下面这段配置加入任意支持 MCP 的客户端（Claude Desktop、Cursor、Cherry Studio、\n通义灵码、ModelScope MCP 实验场等）：\n\n```json\n{\n  \"mcpServers\": {\n    \"chinese-char-counter\": {\n      \"command\": \"uvx\",\n      \"args\": [\"chinese-char-counter-mcp@latest\"]\n    }\n  }\n}\n```\n\n说明：\n\n- `uvx`（来自 [uv](https://docs.astral.sh/uv/)）会自动从 PyPI 下载并运行本包，无需手动安装。\n- 未装 uv 时，可先 `pip install uv`，或改用已安装方式：`\"command\": \"python\", \"args\": [\"-m\", \"chinese_char_counter_mcp\"]`。\n- 本服务不需要任何环境变量，因此配置里没有 `env` 字段。\n\n## 源码仓库\n\n```bash\ngit clone https://github.com/YeTor53/chinese_char_counter_mcp_yetor.git\n```\n\n## 安装\n\n```bash\n# 方式一：pip 安装后直接启动（控制台命令）\npip install chinese-char-counter-mcp\nchinese-char-counter-mcp\n\n# 方式二：模块方式启动\npython -m chinese_char_counter_mcp\n\n# 方式三：不安装，临时运行（需要 uv）\nuvx chinese-char-counter-mcp@latest\n```\n\nSTDIO 服务启动后不打印任何内容、等待客户端的 JSON-RPC 请求，这是正常现象。\n\n## 工具\n\n### 1. `count_chinese_characters`\n\n统计单条文本的中文字数。\n\n| 参数 | 类型 | 必填 | 说明 |\n| --- | --- | --- | --- |\n| `text` | string | 是 | 待统计文本，长度上限 200000 个字符 |\n\n返回字段：\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `chinese_count` | integer | 中文字数（唯一需要关心的结果） |\n| `total_characters` | integer | 文本总字符数（含标点、空格等全部字符） |\n| `chinese_ratio` | number | 中文占全部字符的比例，保留 4 位小数 |\n| `breakdown` | object | 分项计数：`chinese` / `letters` / `digits` / `punctuation` / `spaces` / `other` |\n| `error` | string | 失败原因；成功时为空字符串 |\n\n调用 `count_chinese_characters(text=\"你好，World 2026！\")` 的返回：\n\n```text\n{\n  \"chinese_count\": 2,\n  \"total_characters\": 14,\n  \"chinese_ratio\": 0.1429,\n  \"breakdown\": {\n    \"chinese\": 2,\n    \"letters\": 5,\n    \"digits\": 4,\n    \"punctuation\": 2,\n    \"spaces\": 1,\n    \"other\": 0\n …","publisher":null,"homepage":"https://github.com/YeTor53/chinese_char_counter_mcp_yetor","repository":"https://github.com/YeTor53/chinese_char_counter_mcp_yetor","version":"0.1.1","license":"MIT","protocols":["mcp"],"tags":["character-count","chinese","cjk","mcp","model-context-protocol","modelscope","word-count"],"pricing":null,"endpoints":[{"url":"pypi:chinese-char-counter-mcp","type":"package_pypi","auth":null,"probeable":false}],"skills":null,"tools":null,"extra":null,"attribution":{"kind":"pypi","name":"pypi","license":"pypi","repoUrl":"pypi","summary":"pypi","version":"pypi","description":"pypi","homepageUrl":"pypi"}},"derived":{"capabilities":[{"slug":"dev.version-control","name":"Version Control","confidence":0.745,"provenance":"derived"}],"categories":["dev"],"language":"en"},"observed":{"status":"unknown","statusReason":"Distributed as a package to run locally; no network endpoint to check.","lastOkAt":null,"lastProbedAt":null,"statusComputedAt":null,"reliability30d":null,"latestObservations":[],"tools":null,"package":{"name":"chinese-char-counter-mcp","registry":"pypi","observedAt":"2026-09-12T08:20:41.721Z","publishedAt":"2026-09-11T09:32:13.819432Z","latestVersion":"0.1.1"},"toolSurface":null,"endpointFacts":[]},"verification":{"claimed":false,"claimedAt":null,"proofs":[]},"provenance":{"sources":[{"source":"pypi","key":"chinese-char-counter-mcp","url":"https://pypi.org/project/chinese-char-counter-mcp/","firstSeenAt":"2026-09-12T08:20:23.040Z","fetchedAt":"2026-09-12T08:20:23.040Z","normalizedAt":"2026-09-12T08:20:23.040Z"}]},"firstSeenAt":"2026-09-12T08:20:23.040Z","updatedAt":"2026-09-12T08:20:41.721Z"}