Skip to main content

字鉴·书法识字 MCP Server(zijian-mcp)

上传单字图片,调用“字鉴·书法识别”(shufashibie.com,济南诗书传家教育科技有限公司)智能识别接口,识别古籍、碑帖、书法作品与古文字材料中难以辨认的单个汉字,返回候选字头、繁体字形、拼音、置信度与释义全文。

项目背景

“字鉴·书法识别”是“教育部、国家语委甲骨文等古文字研究与应用项目”重大项目(批准号:YWZ-J014)成果,将人工智能技术引入非标准字体的识读,识读范围覆盖甲骨文、金文、战国文字等古文字及楷、行、草、隶、篆等书法字形,旨在推动古文字研究与人工智能的结合。本工具为该识别能力的非官方 MCP 封装。

解决什么问题

传统 OCR 面向规整印刷文本,对碑帖、手迹、篆隶行草及异体字、生僻字常常束手无策。“字鉴”基于“书法字典”字库做字形图像匹配,恰好补上这一环:看到拓片中一个不认识的字,拍照框选,即可得到候选字与释义。本工具将该能力封装为 MCP,供古籍整理、数字人文研究中的智能体直接调用。

工具

recognize_character

参数 类型 说明
image_path string(可选) 本地图片文件路径,与 image_base64 二选一
image_base64 string(可选) base64 编码图片(可含 data: 前缀),与 image_path 二选一
crop_left / crop_top / crop_right / crop_bottom integer(可选,四项须同时提供) 裁剪框像素坐标,用于从整页图/整幅照片中框出单个汉字
top_n integer(可选,默认 5) 返回候选数量上限

返回 JSON:candidates[](含 char、traditional、pinyin、score、definition,按置信度降序)、result_image_url(上传后的单字图)、必要时附 warning(Top1 置信度低于 10% 时提示人工复核)。

能力边界(重要)

  • 识别基于“书法字典”字库的图像匹配:规整楷书、印刷体、碑刻形态可靠性较高;
  • 变形较大的行草字形、字库未收录的超生僻字可能无法命中,此时各候选置信度普遍低于 3%,返回体中会带 warning 提示人工复核;
  • 每次只识别一个汉字,多字图片请用裁剪框参数框出目标字。

安装(公共 PyPI)

uvx zijian-mcp

MCP 客户端配置(stdio):

{
  "mcpServers": {
    "zijian-mcp": {
      "command": "uvx",
      "args": ["zijian-mcp"]
    }
  }
}

说明

  • 本项目为非官方封装,数据源为“字鉴”网页版公开免费接口(无需 API 密钥),仅作学术查字辅助;识别结果数据依据“书法字典”字库,仅供核对参考。
  • 已在数字人文智慧平台(dh.cckb.cn)登记分发。

许可

MIT

Metadata

Release files for zijian-mcp 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for zijian-mcp 0.1.1
File Size Uploaded Provenance Actions
zijian_mcp-0.1.1.tar.gz 8.7 kB Without provenance Details for zijian_mcp-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for zijian-mcp 0.1.1
File Interpreter ABI Platform Actions
zijian_mcp-0.1.1-py3-none-any.whl Python 3 none any Details for zijian_mcp-0.1.1-py3-none-any.whl

Total release size: 18.3 kB

Release files / zijian_mcp-0.1.1.tar.gz

Download URL zijian_mcp-0.1.1.tar.gz
Size 8.7 kB
Tags Source
SHA-256 checksum
How to use checksums
f065ec1a033f6da17161b12c3f6382b4d35d6abf3801a51b1769acf760c1e206
BLAKE2b-256 checksum
How to use checksums
e8f4356b366480f3104cef1de4c7c615d51cc005ed5da2b857ae3af7e43b1692
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / zijian_mcp-0.1.1-py3-none-any.whl

Download URL zijian_mcp-0.1.1-py3-none-any.whl
Size 9.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3b6d7a43fba2d5064ab785adcfc11ac083e57ff0b6073a812b0f0a487870400c
BLAKE2b-256 checksum
How to use checksums
ac81c405194bcd06c23dbe847b95dedce8035f392e3bb77ba75028cf264d027f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Security for zijian-mcp 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page