mcpField
M
mo

mo

github.com/mnhkahnCreative & media0124 installsUpdated 3d ago
Repository

About mo

mo is a command-line skill for looking up cursive calligraphy and recognizing text in calligraphy images. It prioritizes original historical glyph candidates and their sources, with composition available for missing characters.

Key features

  1. 01Look up cursive text and character candidates
  2. 02Inspect character components
  3. 03Compose calligraphy images
  4. 04Recognize text in calligraphy images
  5. 05AI completion for missing glyphs

Use cases

  1. 01Find an original glyph and its source
  2. 02Look up a passage in cursive script
  3. 03Complete missing glyphs in a passage
  4. 04Recognize text in a calligraphy image

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/mnhkahn/cyeam-cli --skill mo

After installing, type/moin Claude Code to confirm it loaded.

Details

From the project README

书法与 OCR

概述

查询行书书法数据:古文生成、单字候选、偏旁部首、单字合成图片。也可以 OCR 识别书法图片中的文字。

cyeam mo guwen "兰亭序"                # 行书古文
cyeam mo guwen "兰亭序" --ai-compose   # AI 补全缺失字
cyeam mo char detail "之"              # 单字行书写法候选
cyeam mo char composition "曦"         # 偏旁部首
cyeam mo char compose "曦" --out char.png  # 合成书法图
cyeam mo ocr image.png                 # 文字识别

取字规则(必须遵守)

用户要求“写一个字”“返回某字”“给出字图”“查看某字书法”时,默认查原字,绝不能直接调用 char compose。按下面顺序处理:

  1. 单个字先运行 cyeam mo char detail <char>,返回原帖字形候选及出处;有候选时使用原字。
  2. 一段文字运行 cyeam mo guwen <text>;默认只返回字库中的原字,缺字会为空。
  3. 只有在原字候选为空、文本中有缺字,或用户明确要求“拆字合成 / 合成字 / 拼字”时,才使用合成能力:文本用 guwen --ai-compose,单字用 char compose。

char compose 是强制拆字合成命令:即使字库已有完整原字,它也会合成,不能把它当作“获取字图”的默认命令。例如“无”有原帖字形,应先用 char detail "无";仅在明确想看拆字效果时才用 char compose "无"。

图片交付(必须遵守)

当用户需要查看字形、书法图片或“把字给我看”时,不能只回复候选的图片 URL。选定原字候选后,使用其 image 字段以 Markdown 图片直接展示,并同时写出 source;例如:

「无」— 王羲之《临锺繇千字文》

![无](https://res.cloudinary.com/.../word.webp)

char detail 的 URL 是原帖图片,可直接嵌入 Markdown;不要为了获得可展示图片而改用 char compose。只有当前客户端不能渲染 Markdown 图片时,才附上图片链接作为回退。

安装

# macOS Apple Silicon
curl -L https://github.com/mnhkahn/cyeam-cli/releases/latest/download/cyeam_Darwin_arm64.tar.gz | tar xz && chmod +x cyeam && sudo mv cyeam /usr/local/bin/

# macOS Intel
curl -L https://github.com/mnhkahn/cyeam-cli/releases/latest/download/cyeam_Darwin_x86_64.tar.gz | tar xz && chmod +x cyeam && sudo mv cyeam /usr/local/bin/

# Linux amd64
curl -L https://github.com/mnhkahn/cyeam-cli/releases/latest/download/cyeam_Linux_x86_64.tar.gz | tar xz && chmod +x cyeam && sudo mv cyeam /usr/local/bin/

检查安装:which cyeam && cyeam version

命令

cyeam mo guwen <text>                 行书古文生成(JSON)
cyeam mo guwen <text> --ai-compose    仅为缺失字形启用合成补全
cyeam mo char detail <char>           查询原帖单字候选(JSON,默认首选)
cyeam mo char composition <char>      偏旁部首(JSON)
cyeam mo char compose <char> --out png  强制拆字合成书法图片(需要 --out)
cyeam mo ocr <image>                  书法图片 OCR(JSON)

输出

  • guwen、char detail、char composition、ocr 输出 JSON 到 stdout
  • char detail 返回的每个候选包含原帖字形与出处;用户要单字时优先使用它
  • 需要展示字形时,调用方应将原字候选的 image URL 嵌为 Markdown 图片,并展示其 source,而不是只输出 URL
  • char compose 输出 PNG 文件(需 --out 指定路径),且始终是拆字合成,不代表原帖原字

注意事项

  • 仅支持行书,不支持楷书、隶书等其他字体
  • 不需要登录
  • --ai-compose 只会对库中没有的字启用合成补全;已有原字仍应保留原字
  • ocr 上传图片到 cyeam.com 识别,图片格式不限但建议 PNG/JPG

Comments

Markdown supported