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
io.github.krzysztofsurdy由 GitHub 帳號 krzysztofsurdy 發布v1.2.2更新於 Nov 6, 2026
Annotate screenshots in the Snipaya macOS app: arrows, text, redaction, crop, export
讓助理在 macOS 版 Snipaya 中標註截圖的橋接服務:加入箭頭、文字、形狀、遮蔽、裁切並匯出。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
參照 儲存庫 中的啟動說明。
[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.
Listed on the MCP Registry as io.github.krzysztofsurdy/snipaya-mcp, on Glama and in TensorBlock awesome-mcp-servers.
npx setup).The server is off by default.
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.
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.
Prefer the environment variable over --token: command-line flags are visible to other processes on the Mac.
For clients configured with an mcpServers JSON file:
For a custom setup, pass the values in env instead:
If your client supports Streamable HTTP servers directly, you do not need this bridge: use Copy MCP config in Snipaya instead.
snipaya-mcp-<version>.mcpb from the latest release.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.Authorization: Bearer <token>. Snipaya generates the token, and Regenerate in Settings revokes the old one. The bridge never writes the token to its logs.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.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 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:
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.
Run npx -y snipaya-mcp --help to see the options.
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:
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.
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.
On npmjs.com, open snipaya-mcp > Settings > Trusted publishing, choose GitHub Actions and enter:
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.
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.
來源:README.md,提交 5200cf5
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.
tabIdRender 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.
idstabIdmaxSizebeautifyAdd 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.
pathdataUrlplacementAdd 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必填headstyletabIdcurvedrelativeToAdd 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必填styletabIdpixelSizerelativeToAdd text
Add a text label with its top-left corner at "at". Supports \n for new lines.
at必填text必填styletabIdrelativeToAdd 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必填sizestyletabIdrelativeToAdd emoji
Place an emoji sticker centered at "at".
at必填sizeemoji必填tabIdrelativeToAdd 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必填relativeToAdd 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必填relativeToAdd 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必填styletabIdrelativeToAdd 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必填tabIdrelativeToAdd measurement
Draw a measuring line from "from" to "to" labeled with its length in image pixels. Returns the label.
to必填from必填styletabIdrelativeToPick color
Read the color of the image pixel at "at" and return it as a #rrggbb hex. Changes nothing.
at必填tabIdrelativeToRead 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.
recttabIdimageIdrelativeToRedact 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.
styletabIdimageIdspixelSizecategoriesUpdate 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必填relativeToDelete elements
Delete elements (images or annotations) by id. One undo step.
ids必填tabIdSelect elements
Select elements by id so the user sees which ones you mean. An empty list clears the selection.
ids必填tabIdArrange images
Lay out all images of the tab in a row, column or grid with an optional gap.
gaptabIdlayout必填Set crop
Crop exports to a rectangle, or pass null to remove the crop.
rect必填tabIdrelativeToUndo
Undo the last change on the tab (yours or the user’s).
tabIdRedo
Redo the last undone change on the tab.
tabIdManage tabs
Open a new empty tab, switch to a tab, or close a tab (closing never discards unsaved work without asking the user).
tabIdaction必填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必填beautifyoverwriteList 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.
無需輸入參數。
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必填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已滿足適用檢查項的 90%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
npx -y snipaya-mcp{ "mcpServers": { "snipaya": { "command": "npx", "args": ["-y", "snipaya-mcp"], "env": { "npm_config_registry": "https://registry.npmjs.org/" } } }}{ "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>" } } }}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 CLInpm run sync:catalog -- ../snipayanpm version minor # or patch, major: bumps all four files, commits and tags v<version>git push --follow-tags