Markpin
dev.markpinv0.7.1更新于 Oct 4, 2026
Search and read the web pages and highlights you saved with the Markpin Chrome extension.
概览
让助手搜索并阅读你用 Markpin Chrome 扩展保存的网页和摘录,并可在确认后编辑它们。
- 功能
- 通过 stdio 在本地运行,读取 Markpin 文件夹中的 Markdown 页面文件。读取工具包括对标题、正文、摘录、笔记和标签的全文搜索、按 id 或 URL 获取单页的 get_page、list_recent 和 list_tags。加上 --allow-write 后会增加十个写入工具,例如 save_page、update_tags、add_clip、set_summary、delete_pages、restore_pages 以及书签和已读标记工具。它会监视该文件夹,新保存的页面在下一次查询时即可出现。
- 适用场景
- 适合你维护着一个 Markpin 保存页面与摘录库,并希望助手在 Claude Code、Claude Desktop 或 Cursor 中搜索、总结、打标签或整理它。只读使用除文件夹路径外无需额外配置。
- 运行要求
- 需要 Node.js 20.1 或更高版本,通过 npx @markpin/mcp 运行,并必须用 --dir 指定包含 pages/ 目录的 Markpin 文件夹。Markpin Chrome 扩展需将存储设为本地文件夹或 Google Drive;使用 Google Drive 时还需 Google Drive for Desktop 把文件夹同步到磁盘。未声明账号、API 密钥或环境变量。
安装
在 SourceWeft 中
- 打开 控制台中的 Markpin,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
@markpin/mcp
MCP server for a Markpin folder. Markpin is a Chrome extension that saves web pages and clips as Markdown files in a folder you own — this server lets an AI client (Claude Code, Claude Desktop, Cursor, …) search and read those files, and optionally edit them with your confirmation.
- Read-only by default. Writes need
--allow-writeand a confirmation dialog for every change. - Runs locally over stdio. Nothing leaves your computer.
- Watches the folder, so pages you save in the browser show up in the next query without a restart.
Requirements
- Node.js 20.1 or newer (
node -v). - The Markpin Chrome extension with storage set to Local folder or Google Drive. With Google Drive you also need Google Drive for Desktop so the folder exists on disk.
Run
Options:
On success the server logs serving N pages from <dir> to stderr. stdout carries the MCP protocol, so all logs go to stderr — that line is the quickest way to check the path.
Find your Markpin folder
The folder must contain a pages/ directory. If it doesn't, the extension hasn't uploaded anything there yet — save a page in Chrome first.
Local folder — the folder you picked in Markpin settings.
- macOS: in Finder, right-click the folder, hold ⌥ Option, choose Copy "…" as Pathname.
- Windows: Shift + right-click the folder, choose Copy as path (remove the surrounding quotes).
Google Drive — Drive for Desktop mirrors your Drive to disk. The Markpin folder sits at the top of My Drive, whose name follows your Google account language — My Drive (en), 내 드라이브 (ko), マイドライブ (ja), Mi unidad (es), Meu Drive (pt-BR), Meine Ablage (de), Mon Drive (fr):
- macOS:
~/Library/CloudStorage/GoogleDrive-<your email>/My Drive/Markpin - Windows:
G:\My Drive\Markpin(the drive letter can differ — check File Explorer)
The Markpin settings page in Chrome has an MCP setup guide button that fills these paths (and --lang) in for you.
Register the server
Replace <dir> with your folder path. Add --allow-write at the end of the arguments if you want the write tools.
Claude Code
-s user registers it for every project; drop the flag to keep it to the current directory only.
Then claude mcp list should show markpin: … - ✓ Connected.
Claude Desktop
Edit the config file (Claude → Settings → Developer → Edit Config):
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
macOS:
Windows (Claude Desktop spawns without a shell, so npx needs cmd /c; escape backslashes in the path):
Restart Claude Desktop. The hammer/plug icon in the chat box lists the Markpin tools.
Cursor
Add the same JSON to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (one project), then enable the server in Cursor Settings → MCP.
File format
Each page is one Markdown file. The frontmatter holds only the human-facing keys (title, url, savedAt, tags, summary, readAt, deletedAt) so note apps such as Obsidian show a clean Properties panel. Everything Markpin needs internally (id, rev, updatedAt, clips with their anchors, bookmark) lives in a one-line JSON block at the very end of the file:
Do not edit that block by hand. Files written before 0.7.0 (markpin: 1 in the frontmatter) are still read; they are rewritten in the new shape the next time anything changes them.
markpin.json (Markdown template)
The extension writes markpin.json at the folder root when you pick a Markdown template or turn on .trash/ in its options. This server reads it on start and on every rescan, and renders the files it writes with the same template (default or obsidian, or a custom template string), so pages saved through MCP look like the ones saved from the browser. Only the body below the frontmatter changes; the frontmatter is always Markpin's own. Moving deleted files to .trash/ is done by the extension, not by this server.
Read-only vs. --allow-write
Without --allow-write the server exposes four read tools and cannot change any file. With it, ten write tools are added. Every write passes three gates:
- The flag. You decided at registration time that writes are allowed at all.
- Client permission. The tools are marked non-read-only (
delete_pagesas destructive), so clients such as Claude Code ask before each call. - Your confirmation. If the client supports MCP elicitation (Claude Code does), the server shows a dialog describing the exact change — for example "Add tag frontend to 'React Docs'?" — and writes only when you accept. If the client cannot show that dialog, the result carries
"gate": "client"so the assistant can tell you that the client's own prompt was the only confirmation.
The confirmation waits up to 10 minutes. A save_page fetch happens only after you accept, so a declined URL is never requested.
Tools
Read (always):
Write (--allow-write):
Every write returns a note and a gate field ("elicitation" when you confirmed in the dialog, "client" when only the client's prompt stood between the assistant and the write). update_tags, set_clip_note and set_summary also return before/after; the others return the affected page(s).
Limits
- Google Drive + new pages. With Google Drive storage the extension can only read files it created itself (
drive.filescope), sosave_pagewrites new pages toinbox.jsonlin your Markpin folder and the extension turns them into page files on its next sync. The extension creates and manages that file — do not delete it. Edits to existing pages are written in place. With a local folder there is normally no inbox and everything is written directly; if aninbox.jsonlexists in the folder (for example a former Drive mirror), the server uses it the same way. - No region clips. Image/area clips need the page DOM; the server adds text clips only.
- Side panel delay. While the side panel is open it polls every 15 seconds, so changes show up within about 30 seconds; when it is closed they show up the moment you open it. A full sync also runs every 5 minutes. With Google Drive, add the time Drive for Desktop needs to upload.
- Concurrent edits. If the extension wrote the same page after the server read it, the write is refused with Page changed on disk since it was read; re-read it and try again. Ask again.
- Tombstones. Deleted pages are only purged by the extension. A folder used by this server alone keeps them.
Troubleshooting
Development
License MIT.
来源:mcp-server/README.md,提交 772b4b1
工具
0版本历史
1- v0.7.1最新Oct 4, 2026

