Snipaya

io.github.krzysztofsurdy由 GitHub 账号 krzysztofsurdy 发布v1.2.2更新于 Nov 6, 2026

Annotate screenshots in the Snipaya macOS app: arrows, text, redaction, crop, export

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

概览

AI 生成的概览

让助手在 macOS 版 Snipaya 中标注截图的桥接服务:添加箭头、文字、形状、打码、裁剪并导出。

可以做什么
  • 查看画布:描述打开的标签页、图片、标注与选区,并渲染 PNG 预览
  • 添加图片与标注:箭头、直线、形状、模糊或噪点、文字、步骤编号、表情、手绘笔迹、放大镜、气泡标注、聚光灯和测量线
  • 分析像素:取色、用本地 OCR 识别文字,并自动遮盖邮箱、电话、卡号、令牌、IP、密码和人脸
  • 编辑已有内容:移动、缩放、旋转、改样式或删除元素,选中元素,排列图片,设置裁剪,撤销与重做
  • 管理标签页与输出:新建、切换或关闭标签页,导出 PNG 或 JPG 到路径或已配置的目标,并保存项目文件
适用场景
适合在 Mac 上使用 Snipaya、并希望由助手把截图做成成品标注图的场景:缺陷报告、分步操作说明、前后对比,或需要打码后才能分享的截图。
运行要求
需安装并运行 macOS 版 Snipaya,并在“设置 > AI 助手”中开启“允许 AI 助手”(含 14 天试用)。使用 npx 桥接需 Node.js 20 或更高版本。可选 SNIPAYA_MCP_TOKEN 与 SNIPAYA_MCP_URL 覆盖 Snipaya 保存的设置;SNIPAYA_MCP_NO_LAUNCH=1 可禁止桥接自动打开应用。
安装前请注意
桥接持有访问 Snipaya 本地服务器的令牌;请优先使用 SNIPAYA_MCP_TOKEN 环境变量而非 --token 参数,后者对其他进程可见。它可修改和删除画布元素,导出时在允许的情况下会覆盖文件,并会把图片发送到已配置的目标(如上传服务、Jira、Confluence),不过网络上传前总会请求用户确认。打码为自动识别,分享前请自行核对。

安装

在 SourceWeft 中

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

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

其他 MCP 客户端

参照 仓库 中的启动说明。

README

[Snipaya app icon]

snipaya-mcp

[CI] [npm version] [npm downloads] [MIT license] [snipaya-mcp on Glama]

Connect any MCP client that speaks stdio to Snipaya, the image and screenshot annotator for macOS. Your assistant can read the canvas, add arrows, text, shapes and callouts, redact sensitive data, crop, and export, while you watch the result in Snipaya.

Snipaya has an MCP server built in, served over Streamable HTTP on 127.0.0.1. snipaya-mcp is a thin bridge for clients that only start local stdio servers: it forwards every MCP message between the client and Snipaya, unchanged.

Tools and prompts are listed even before Snipaya is open. Until Snipaya answers, the bridge lists them from a built-in catalog, and a tool call returns a message that says what to do.

[An assistant documenting a ticket in Snipaya: four screenshots on one canvas with numbered steps, arrows and callouts]

Listed on the MCP Registry as io.github.krzysztofsurdy/snipaya-mcp, on Glama and in TensorBlock awesome-mcp-servers.

Requirements

  • Snipaya for macOS. It comes with a 14-day free trial.
  • Node.js 20 or newer (for the npx setup).

Turn on the MCP server in Snipaya

The server is off by default.

  1. Open Snipaya, then Settings > AI Assistants.
  2. Turn on Allow AI assistants. The status changes to Running.

That is all the bridge needs. It reads the access token and port from the settings Snipaya saves on this Mac, so you do not have to copy them.

Setup

npx

sh
npx -y snipaya-mcp

If Snipaya is not running but Allow AI assistants is on, the bridge opens Snipaya in the background and waits up to 10 seconds for its server.

To override what Snipaya saved, set these variables or flags. Flags win over variables, and variables win over the saved settings.

VariableFlagDefault
SNIPAYA_MCP_TOKEN--tokenToken Snipaya savedAccess token from Settings > AI Assistants.
SNIPAYA_MCP_URL--urlhttp://127.0.0.1:<saved port>/mcp, else http://127.0.0.1:47321/mcpServer URL from Snipaya. Only 127.0.0.1 and localhost are accepted.
SNIPAYA_MCP_NO_LAUNCHSet to 1 to never open Snipaya. While Snipaya is closed, tool calls then return Cannot reach Snipaya.

Prefer the environment variable over --token: command-line flags are visible to other processes on the Mac.

JSON config

For clients configured with an mcpServers JSON file:

json
{  "mcpServers": {    "snipaya": {      "command": "npx",      "args": ["-y", "snipaya-mcp"],      "env": {        "npm_config_registry": "https://registry.npmjs.org/"      }    }  }}

For a custom setup, pass the values in env instead:

json
{  "mcpServers": {    "snipaya": {      "command": "npx",      "args": ["-y", "snipaya-mcp"],      "env": {        "npm_config_registry": "https://registry.npmjs.org/",        "SNIPAYA_MCP_TOKEN": "<access token>",        "SNIPAYA_MCP_URL": "<server url>"      }    }  }}

If your client supports Streamable HTTP servers directly, you do not need this bridge: use Copy MCP config in Snipaya instead.

MCP Bundle (.mcpb)

  1. Download snipaya-mcp-<version>.mcpb from the latest release.
  2. Open it with an MCP client that supports MCP Bundles, or drag it into the client's extensions settings.
  3. Leave the token and URL empty to use what Snipaya saved, or paste the values from Settings > AI Assistants for a custom setup.

Security model

  • Local only. Snipaya's server listens on 127.0.0.1 and accepts only loopback Host headers and requests without an Origin header, so websites in your browser cannot reach it. The bridge refuses any URL whose host is not 127.0.0.1 or localhost, and never sends an Origin header.
  • Off by default. Nothing listens until you turn on Allow AI assistants.
  • Token. Every request carries Authorization: Bearer <token>. Snipaya generates the token, and Regenerate in Settings revokes the old one. The bridge never writes the token to its logs.
  • Saved settings. Without SNIPAYA_MCP_TOKEN, the bridge reads the token and port from ~/Library/Application Support/Snipaya/mcp.json, which Snipaya writes readable only by your macOS user. The bridge never writes to it.
  • Opening Snipaya. Only on macOS and only when Allow AI assistants is on, the bridge first sends one request without the token to see whether Snipaya answers. If the connection is refused, it runs open -g -b dev.snipaya.app (no shell) and retries. It does this at start, and again for a tool call while Snipaya is not reachable. Any other failure, such as a rejected token, never opens the app. SNIPAYA_MCP_NO_LAUNCH=1 turns this off.
  • The bridge only forwards. It runs no tools itself, stores nothing, and connects only to Snipaya. While Snipaya is not reachable, it answers the tool and prompt lists from a catalog shipped in the package. All actions run inside Snipaya, which shows connected assistants and recent activity in Settings > AI Assistants.

Tools

The tools come from the Snipaya version you have installed. Until Snipaya answers, the bridge lists the tools of Snipaya 1.3.3 from its catalog, and once Snipaya answers, the list of your installed version applies. Snipaya 1.3 provides:

ToolTitle
snipaya_get_canvasGet canvas
snipaya_renderRender canvas
snipaya_add_imageAdd image
snipaya_add_arrowAdd arrow or line
snipaya_add_shapeAdd shape
snipaya_add_textAdd text
snipaya_add_stepAdd step number
snipaya_add_emojiAdd emoji
snipaya_add_freehandAdd freehand stroke
snipaya_add_magnifierAdd magnifier
snipaya_add_calloutAdd callout
snipaya_add_spotlightAdd spotlight
snipaya_add_measureAdd measurement
snipaya_pick_colorPick color
snipaya_read_textRead text
snipaya_redactRedact sensitive data
snipaya_update_itemsUpdate elements
snipaya_delete_itemsDelete elements
snipaya_selectSelect elements
snipaya_arrangeArrange images
snipaya_set_cropSet crop
snipaya_undoUndo
snipaya_redoRedo
snipaya_tabsManage tabs
snipaya_exportExport image
snipaya_list_destinationsList export destinations
snipaya_export_toExport to destination
snipaya_save_projectSave project

Prompts

PromptTitleOptional argument
explain_bugExplain a bug in a screenshotissue
redact_before_sharingRedact secrets before sharingalso_hide
finish_screenshotMake a screenshot look finishedbackground
copy_textCopy text out of an imagearea
make_walkthroughTurn screenshots into a walkthroughtopic
compare_before_afterCompare before and afterchange

Troubleshooting

The bridge writes the problem to stderr (never stdout, which carries the protocol). While Snipaya is not reachable, it still lists the tools, and returns the same text as the result of each tool call. When Snipaya starts answering, for example after you open it or accept the license agreement, the next tool call reaches it without a restart.

MessageFix
Snipaya's settings were not foundInstall Snipaya, open it once and turn on Allow AI assistants. Or set SNIPAYA_MCP_TOKEN.
Snipaya is a macOS appThe bridge runs on another system. It lists the tools, but they work only with Snipaya on a Mac.
Snipaya's MCP server is offTurn on Allow AI assistants in Settings > AI Assistants.
Snipaya's settings ... cannot be read or hold no valid tokenOpen Snipaya, which rewrites its settings, then check Allow AI assistants. Or set SNIPAYA_MCP_TOKEN.
Cannot open SnipayaSnipaya is not installed in a place macOS can find. Install it from snipaya.app or open it yourself.
Opened Snipaya, but its MCP server starts only after you accept the license agreementSnipaya 1.1 and newer start the MCP server only after you accept the license agreement. Accept it in the Snipaya window, then call the tool again.
Opened Snipaya, but its MCP server did not answerOpen Settings > AI Assistants and fix the error shown under the status.
Cannot reach Snipaya at ...Open Snipaya and turn on Allow AI assistants. If the message mentions the license agreement, accept it in Snipaya first. If the status shows an error, fix that first. Check that the URL matches Server URL.
Snipaya rejected the tokenThe token changed, for example after Regenerate. Remove SNIPAYA_MCP_TOKEN to use the saved token, or copy the current one.
Snipaya ended the sessionSnipaya restarted or the token changed. Restart the snipaya server in your client.
Refusing <host>The URL must point to 127.0.0.1 or localhost. Copy Server URL from Snipaya.
CONNECTION_CLOSED or Failed to connect, with npm error 404 ... is not in this registry in the MCP logThe bridge never started: a project .npmrc points npm at a private registry, and MCP clients start the server in the project folder. Set npm_config_registry to https://registry.npmjs.org/ for the snipaya server, in env as in the JSON config above. In Claude Code, add the server once for every project with claude mcp add --scope user snipaya -e npm_config_registry=https://registry.npmjs.org/ -- npx -y snipaya-mcp. Claude Code keeps MCP server logs in ~/Library/Caches/claude-cli-nodejs/<project>/mcp-logs-snipaya/.

Run npx -y snipaya-mcp --help to see the options.

Development

sh
npm cinpm run lintnpm run typechecknpm test          # builds, then runs the bridge over stdio against a local test servernpm run pack:mcpb # builds snipaya-mcp-<version>.mcpb with the official mcpb CLI

Catalog

catalog.json holds the tools, prompts and instructions the bridge serves while Snipaya is not reachable, and manifest.json lists the same tools and prompts. Regenerate both from a checkout of the Snipaya app (default ../snipaya) with Node 22.6 or newer, and commit the result:

sh
npm run sync:catalog -- ../snipaya

Without a token or URL, the bridge reads the settings of the installed Snipaya in ~/Library/Application Support/Snipaya. Development builds of Snipaya keep their settings in their own Snipaya Dev profile folder, so to bridge to one, set SNIPAYA_MCP_TOKEN and SNIPAYA_MCP_URL to the values shown in its Settings > AI Assistants.

Releasing

Pushing a v* tag runs .github/workflows/release.yml. It runs the CI checks, checks that the tag matches the version in package.json, package-lock.json, server.json and manifest.json, stages the version on npm (with provenance), waits up to 60 minutes for a maintainer to approve it, then creates the GitHub release with the .mcpb attached, and publishes server.json to the MCP Registry.

One-time setup

On npmjs.com, open snipaya-mcp > Settings > Trusted publishing, choose GitHub Actions and enter:

FieldValue
Organization or userkrzysztofsurdy
Repositorysnipaya-mcp
Workflow filenamerelease.yml
Environment nameleave empty
Allowed actionsnpm stage publish only

npm expires a trusted publisher that has not published within 2 days, so add it shortly before the first release. The MCP Registry and the GitHub release need no setup: they use the workflow's own GitHub token.

Cut a release

sh
npm version minor        # or patch, major: bumps all four files, commits and tags v<version>git push --follow-tags

When the workflow reaches Publish to npm, approve the staged version with a 2FA prompt: npm stage approve snipaya-mcp@<version>, or on the package page on npmjs.com. The rest of the release continues on its own.

Re-running a failed release is safe: it skips the npm and MCP Registry publish when that version is already there, and replaces the bundle on an existing GitHub release.

License

MIT

来源:README.md,提交 5200cf5

工具

28

snipaya_get_canvas

Get canvas

Describe the open tabs and the active canvas: images (id, position, size, original pixel size), annotations (id, kind, geometry, style, text, anchors), selection and crop. Call this first.

输入参数tabId

snipaya_render

Render canvas

Return a PNG of the canvas (or only the given element ids) so you can see what the user sees. Downscaled to maxSize on the longest side.

输入参数idstabIdmaxSizebeautify

snipaya_add_image

Add image

Add a screenshot or image to the canvas from an absolute file path or a data URL. Related images (before and after, steps of a flow) go on one canvas with placement "add". Use "new-tab" only to start a new, unrelated image, never one tab per related image.

输入参数pathdataUrlplacement

snipaya_add_arrow

Add arrow or line

Draw a straight arrow (head at "to") or, with head false, a line. curved true draws a gentle curved arrow. Ends landing on an image are anchored to it.

输入参数to必填from必填headstyletabIdcurvedrelativeTo

snipaya_add_shape

Add shape

Add a rectangle frame, ellipse, highlighter box, blur (pixelate) or noise (opaque random colors from the area, the safest way to hide sensitive data) over a region. For blur and noise, pixelSize sets the block size; larger is coarser.

输入参数kind必填rect必填styletabIdpixelSizerelativeTo

snipaya_add_text

Add text

Add a text label with its top-left corner at "at". Supports \n for new lines.

输入参数at必填text必填styletabIdrelativeTo

snipaya_add_step

Add step number

Add an auto-numbered step badge (1, 2, 3...) centered at "at", for step-by-step guides. size is the badge diameter; make it larger on big screenshots.

输入参数at必填sizestyletabIdrelativeTo

snipaya_add_emoji

Add emoji

Place an emoji sticker centered at "at".

输入参数at必填sizeemoji必填tabIdrelativeTo

snipaya_add_freehand

Add freehand stroke

Draw a freehand pen line, highlighter stroke or curved arrow through the given points. The path is smoothed like a hand-drawn stroke.

输入参数kind必填styletabIdpoints必填relativeTo

snipaya_add_magnifier

Add magnifier

Add a round magnifying lens at "lens" that shows a zoomed view of the area around "source". radius defaults to about 8% of the short side of the image under the source.

输入参数lens必填zoomstyletabIdradiussource必填relativeTo

snipaya_add_callout

Add callout

Add a speech-bubble callout with text in "rect" and a tail pointing at "tail" (defaults to below the box). The box grows to fit the text.

输入参数rect必填tailtext必填styletabIdrelativeTo

snipaya_add_spotlight

Add spotlight

Dim everything except "rect" (form rect or ellipse) to draw attention to it. dim (0 to 1) changes the user’s spotlight darkness setting for all spotlights.

输入参数dimformrect必填tabIdrelativeTo

snipaya_add_measure

Add measurement

Draw a measuring line from "from" to "to" labeled with its length in image pixels. Returns the label.

输入参数to必填from必填styletabIdrelativeTo

snipaya_pick_color

Pick color

Read the color of the image pixel at "at" and return it as a #rrggbb hex. Changes nothing.

输入参数at必填tabIdrelativeTo

snipaya_read_text

Read text

Recognize text (on-device OCR) in the images and return the lines in reading order with their rects. Limit it with rect and/or imageId. Rects use the relativeTo space when set.

输入参数recttabIdimageIdrelativeTo

snipaya_redact

Redact sensitive data

Find emails, phone numbers, IBANs, card numbers, tokens, IP addresses, passwords and faces (on-device) and cover them in one undo step, in the user’s Redaction style (noise by default). style overrides it: noise fills the area with opaque random colors from it, blur pixelates with blocks sized to the text, solid covers it with a plain box. pixelSize sets the noise block size or a coarser minimum for blur. Defaults to every image and category. Returns the ids and counts.

输入参数styletabIdimageIdspixelSizecategories

snipaya_update_items

Update elements

Change existing elements by id: move (x, y), resize (width, height), rotate (degrees), change text, or restyle. For steps, width or style.fontSize resizes the badge. All updates are one undo step.

输入参数tabIdupdates必填relativeTo

snipaya_delete_items

Delete elements

Delete elements (images or annotations) by id. One undo step.

输入参数ids必填tabId

snipaya_select

Select elements

Select elements by id so the user sees which ones you mean. An empty list clears the selection.

输入参数ids必填tabId

snipaya_arrange

Arrange images

Lay out all images of the tab in a row, column or grid with an optional gap.

输入参数gaptabIdlayout必填

snipaya_set_crop

Set crop

Crop exports to a rectangle, or pass null to remove the crop.

输入参数rect必填tabIdrelativeTo

snipaya_undo

Undo

Undo the last change on the tab (yours or the user’s).

输入参数tabId

snipaya_redo

Redo

Redo the last undone change on the tab.

输入参数tabId

snipaya_tabs

Manage tabs

Open a new empty tab, switch to a tab, or close a tab (closing never discards unsaved work without asking the user).

输入参数tabIdaction必填

snipaya_export

Export image

Export the canvas (or given ids) as PNG or JPG. With path, writes the file (absolute path, matching extension, refuses to overwrite unless overwrite is true); without path, returns the image.

输入参数idspathtabIdformat必填beautifyoverwrite

snipaya_list_destinations

List export destinations

List the export destinations the user set up (share menu, open with an app, quick save folder, uploaders, Jira, Confluence) with their ids for snipaya_export_to.

无需输入参数。

snipaya_export_to

Export to destination

Render the canvas (or given ids) as PNG and send it to a destination from snipaya_list_destinations. Uploads to network destinations always ask the user to confirm first. Returns the link or file path.

输入参数idstabIdbeautifydestination必填

snipaya_save_project

Save project

Save the tab as a .snipaya project. Without path, saves to the tab’s existing file; a tab that was never saved needs an absolute path.

输入参数pathtabIdoverwrite

版本历史

3
  1. v1.2.2最新Oct 23, 2026
  2. v1.2.0Oct 23, 2026
  3. v1.1.2Oct 21, 2026

评分

已满足适用检查项的 90%

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

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

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

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