Harie

io.github.hosshan由 GitHub 账号 hosshan 发布v0.5.0更新于 Oct 30, 2026

Annotate screenshots for user guides. Saved as plain JPEG/PNG whose annotations stay editable.

已验证STDIO仅桌面文件与存储媒体与设计

概览

AI 生成的概览

本地 MCP 服务器,用于给截图添加可再编辑的注记,并以普通 JPEG/PNG 保存,让助手为使用指南绘制框、编号和说明气泡。

可以做什么
  • 打开 Harie 文件并以 JSON 读取注记,可选择是否返回图像
  • 从普通 JPEG/PNG 创建 Harie 文件,并列出目录中的 Harie 文件
  • 新增、更新或删除注记并重新渲染保存,另有不修改文件的预览
  • 用替换、填充、马赛克或模糊遮盖图像中的个人信息,仅在明确确认后保存
  • 用新截图替换底图,同时保留注记并按比例缩放
适用场景
适合制作或维护 SaaS 使用指南截图:在界面元素周围画框、加编号和说明气泡,修改说明文字,或在界面改版后更新指南。也适合需要日后仍可编辑注记的图像编辑工作。
运行要求
需要 Node.js 22 或更高版本,通过 npx 从 npm 以 stdio 启动。必须用 --root 指定根目录(默认为当前目录),服务器只能访问该目录下的文件。未声明需要账号、API 密钥或环境变量。
安装前请注意
遮盖个人信息会改写底图,保存后无法撤销;可用 outPath 保留原文件。编辑会覆盖文件,替换底图时旧遮罩不会保留。服务器可读写所配置根目录下的任意文件,且工具说明目前以日文为主。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Harie,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

@harie/mcp

English | 日本語

A local MCP server (stdio) for reading and writing Harie files: screenshots saved as ordinary JPEG / PNG images whose annotations (boxes, arrows, callouts, text) stay editable after saving. It lets MCP clients such as Claude handle requests like "put a red box around the save button" or "fix the wording of this callout".

Harie is a tool for annotating screenshots in SaaS user guides. A Harie file opens in any image viewer as a normal picture, and Harie can reopen it to edit the annotations again and again.

The server never calls an LLM. The client's LLM looks at the image and decides what to annotate; the server only reads, writes and renders files.

Tools

ToolWhat it does
harie_openOpens a file and returns its annotations (as JSON, including callout text) and the image. A plain image returns status: plain
harie_createCreates a Harie file from a plain JPEG / PNG (default <name>.harie.<ext>; the original is kept). format (jpeg / png) picks the output format
harie_previewReturns the image with annotation changes (ops) applied. The file is not changed
harie_editApplies annotation changes, re-renders and overwrites the file. expectedRevision provides optimistic locking
harie_listLists Harie files in a directory
harie_maskHides personal information by burning it into the base image (irreversible). Saves only with confirm: true; without it, only the masked image is returned
harie_replace_baseReplaces the image with a new screenshot while keeping the annotations (for when the screen changed). If the size differs, annotations are scaled to fit. Masks from the old image are not carried over; their areas are returned as previousPii

harie_open, harie_edit and harie_replace_base accept image: false to skip the image and return only the JSON. Images take up much of the client's context, so use it when you only read or rewrite text.

The server can only access files under the directory given by --root (default: the current directory). harie_mask rewrites the base image, so the change cannot be undone once saved. To keep the original, save to another file with outPath.

Setup

Requires Node.js 22 or later. Launch @harie/mcp from npm with npx.

Claude Code

sh
claude mcp add harie -- npx -y @harie/mcp --root ~/Pictures/guides

Claude Desktop (claude_desktop_config.json)

json
{  "mcpServers": {    "harie": {      "command": "npx",      "args": ["-y", "@harie/mcp", "--root", "/Users/you/Pictures/guides"]    }  }}

Run from the repository (development)

sh
pnpm installpnpm build   # produces apps/mcp/dist/index.mjs and dist/fonts/claude mcp add harie -- node /path/to/harie/apps/mcp/dist/index.mjs --root ~/Pictures/guides

Guide prompt (harie_guide)

The server ships a prompt, harie_guide (arguments: path, optional intent), with the same rules the web editor's AI suggestions use: which UI elements to highlight (only what the explanation needs, at most 8, in the order of operation), how to write each callout (1–2 sentences saying what the reader does; never invent features or copy personal data), the layout rules (each step gets a box, a number badge and a callout whose arrow points at the box; badges always sit outside the top-left corner of their box and never cover UI elements; a badge with an anchor to its box is placed there automatically), and the steps with these tools (open → mask personal data → add box + number badge + anchored callout → preview → save). In Claude Code it appears as /mcp__harie__harie_guide. A short version of the same rules is also sent as the server's instructions, so clients that read them follow the rules even without the prompt.

Example prompts

  • "Turn settings.png into a Harie file, draw a red box around the save button, and add a callout saying 'Click here to save'."
  • "List the Harie files in guides/ and add a title to any that don't have one."

Tool descriptions are currently Japanese-first. Annotation text can be written in Japanese, English, Korean, Chinese (Simplified and Traditional) and other languages the bundled fonts cover.

Development

  • src/tools.ts: tool implementations. src/server.ts: MCP registration and input validation. src/paths.ts: prevents access outside the root.
  • Tests (pnpm test) connect a client through the SDK's InMemoryTransport and call the tools for real.
  • The package bundles the Regular / Bold weights of Noto Sans JP, plus subsets of Noto Sans KR (Hangul) and Noto Sans SC (characters missing from Noto Sans JP) that are loaded only when an annotation uses them (scripts/copy-assets.mjs; license in dist/fonts/OFL.txt).

License

MIT. The bundled fonts (Noto Sans JP / KR / SC, Regular / Bold) are licensed under the SIL Open Font License 1.1 (dist/fonts/OFL.txt).

来源:apps/mcp/README.md,提交 d53ba9e

工具

7

harie_open

Harie ファイルを開く

Harie ファイル(注釈を再編集できる JPEG/PNG)を開き、注釈の一覧と画像を返す。注釈の文言や位置は JSON で読めるので、画像が要らなければ image: false。普通の画像なら status: plain を返す

输入参数path必填image

harie_create

画像から Harie ファイルを作る

普通の JPEG/PNG から注釈のない Harie ファイルを作る。元の画像はそのまま残し、既定では <名前>.harie.<拡張子> に保存する。以後の保存もこの形式になる

输入参数titleformatoutPathimagePath必填

harie_edit

注釈を変更して保存する

注釈を追加・更新・削除し、画像を描き直して上書き保存する。保存後の画像を返す。先に harie_preview で確認するとよい

输入参数ops必填path必填imageexpectedRevision

harie_preview

注釈の変更を保存せずに確認する

ops を適用した結果の画像を返す。ファイルは変更しない

输入参数ops必填path必填

harie_mask

個人情報をマスクする(元に戻せない)

画像内の個人情報(氏名・メール・電話番号など)を、ベース画像を書き換えて隠す。保存すると元に戻せず、ファイルのどこにも元の情報は残らない。 まず confirm を付けずに呼ぶと、保存せずに加工後の画像を返す。範囲と方法を確かめてから、同じ masks に confirm: true を付けて保存する。 method: replace(ダミー文字列に置き換える。replacement に同じ種類のダミー値を渡す。例: 山田 花子 / [email protected])/ fill(塗りつぶし)/ mosaic / blur。文字は replace か fill を使う。 rect はベース画像のピクセル(左上原点)で、文字より少し広めに取る。注釈の blur とは別物で、個人情報にはこちらを使う。

输入参数path必填masks必填confirmoutPathexpectedRevision

harie_replace_base

注釈を残して画像を差し替える

Harie ファイルの注釈を残したまま、画像だけを新しいスクリーンショットに差し替えて保存する(画面が変わったときのガイドの更新)。大きさが違えば注釈を比率で拡大縮小する。位置がずれた注釈は保存後の画像を見て harie_edit で直す

输入参数path必填imageoutPathimagePath必填expectedRevision

harie_list

Harie ファイルを一覧する

ディレクトリ内の Harie ファイルを、タイトル・リビジョン・注釈数とともに一覧する

输入参数dirrecursive

版本历史

1
  1. v0.5.0最新Oct 30, 2026

评分

已满足适用检查项的 90%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分
  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分