PbScope MCP Server
Monitors macOS pasteboard activity, recording clipboard generations and exposing event history, declared UTIs, and flavor fetch/paste-test tools via an MCP server. Enables AI agents to diagnose clipboard-transfer issues across machines by comparing what each side saw.
README
PbScope
macOS pasteboard diagnostics. PbScope watches NSPasteboard.general, records
every clipboard generation as an event (who wrote it, which flavor UTIs were
declared, what they weigh once materialized), and exposes the whole history to
AI agents over an HTTP MCP server — so you can run one instance on the machine
that copies and another on the machine that pastes, and let an agent compare
what each side saw.
Built by PwrDrvr to diagnose clipboard-transfer problems in PwrSnap (uncompressed-TIFF size bloat over Universal Clipboard / Splashtop, flavors dying between copy and paste), but it is PwrSnap-agnostic: it observes the system pasteboard.
Why observing the clipboard is tricky (and how PbScope handles it)
Many pasteboard flavors are promised, not rendered — the source app only produces the bytes when a paste target asks. Reading a flavor is therefore a side-effectful act: it resolves promises and can trigger Universal Clipboard network transfers, changing the very behavior you're debugging.
PbScope is passive by default: it polls changeCount (~150ms) and
enumerates each item's declared UTIs, which does not materialize data. Sizes,
hashes, and previews appear only when you:
- click a flavor chip (fetch that one flavor),
- enable Auto-fetch contents (materialize every flavor of each new event),
- run Paste test (read every flavor the way a real paste target would), or
- call the side-effect-marked MCP tools.
Every fetch is recorded on the event, so you can tell afterward whether observation perturbed the experiment.
Attribution
NSPasteboard does not record which app wrote it. PbScope badges events using
presence-only markers in the declared flavor set:
- PwrSnap — any
com.pwrdrvr.*UTI present - Universal Clipboard —
com.apple.is-remote-clipboard - concealed / transient — the
org.nspasteboard.*conventions
Install / run
Requires macOS, Node ≥ 24 (.nvmrc), pnpm, and Xcode command line tools
(swiftc).
pnpm install # also compiles the Swift helper (build/native/pasteboard-monitor)
pnpm dev # run the app
Package a distributable zip (ad-hoc signed; right-click → Open on the target
machine, or xattr -dr com.apple.quarantine PbScope.app):
pnpm package
Closing the window quits the app (and its MCP server) — the server only runs while PbScope is visibly running in the Dock.
MCP server
Streamable HTTP, stateless, no auth — intended for localhost and trusted private networks only.
- Default:
http://127.0.0.1:4577/mcp - Health check:
GET /healthz - LAN mode (for the remote-machine workflow): launch with
--lanorPBSCOPE_HOST=0.0.0.0; change the port withPBSCOPE_PORT.
Connect from Claude Code:
claude mcp add --transport http pbscope-local http://127.0.0.1:4577/mcp
claude mcp add --transport http pbscope-remote http://192.168.1.50:4577/mcp
Tools
| Tool | Side effects | What it does |
|---|---|---|
pb_status |
none | Helper liveness, current changeCount, event count, auto-fetch state |
pb_list_events |
none | Event history: declared UTIs per item, markers, superseded flag, recorded fetches (sinceSeq, limit, pwrsnapOnly) |
pb_get_event |
none | Full detail for one event by seq |
pb_fetch_flavor |
materializes | data(forType:) for one flavor of the current pasteboard → byteLength, sha256, duration (optional inline base64) |
pb_paste_test |
materializes | Read every declared flavor like a paste target; per-flavor size/duration plus NSImage(pasteboard:) decodability |
A typical two-machine session
- Run PbScope on the source Mac (
pnpm dev) and on the paste-target Mac (--lan). - Point your agent at both MCP endpoints.
- Copy an image in the app under test on the source Mac.
- Ask the agent to
pb_list_eventson both sides and compare: did one copy produce one event or two? Which flavors were declared on each side? Thenpb_fetch_flavor/pb_paste_teston the target to see what the paste actually weighs (a 250 KB PNG arriving as an 8 MBpublic.tiffis your uncompressed-TIFF bloat) and whether any flavor returns nil.
Architecture
native/pasteboard-monitor/main.swift Swift CLI: polls changeCount, NDJSON
over stdio; fetch/pasteTest on demand
src/main/monitor.ts spawns + speaks to the helper
src/main/event-store.ts ring buffer of events (payloads never stored)
src/main/mcp-server.ts Streamable HTTP MCP (stateless, no auth)
src/main/index.ts Electron bootstrap + IPC
src/renderer/ event timeline UI
The Swift helper exists because Electron's clipboard API can't do any of the
load-bearing parts: it exposes no changeCount, can't enumerate declared UTIs
without reading them, and can't distinguish promised from rendered flavors.
License
MIT © PwrDrvr LLC
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。