ClipMCP

ClipMCP

A standalone clipboard history MCP server for macOS that monitors clipboard in real-time, stores history locally in SQLite, and exposes it to any MCP-compatible AI assistant.

Category
访问服务器

README

ClipMCP

A standalone clipboard history MCP server for macOS. Monitors your system clipboard in real-time, stores history locally in SQLite, and exposes it to any MCP-compatible AI assistant — no third-party clipboard app required. All data stays on your machine.


What it does

  • Captures text, HTML, and images from your clipboard automatically in the background
  • Categorises each clip: error, code, url, email, path, sensitive, text
  • Detects sensitive content (API keys, tokens, passwords) and flags it before your AI assistant sees it
  • Semantic search — find clips by meaning, not just keywords (optional, local embeddings)
  • Debug context bundling — say "fix this error" and your AI assistant automatically pulls recent error clips, code snippets, and logs together into one context block
  • Exposes 9 MCP tools your AI assistant calls automatically based on conversation context

Requirements

  • macOS (Linux/Windows support planned)
  • Python 3.11+
  • Any MCP-compatible client (Cursor, VS Code, Claude Desktop, or others)

Installation

1. Clone the repo

git clone https://github.com/susmetaa01/clipmcp.git
cd clipmcp

2. Install the package

pip install -e .

3. (Optional) Semantic search

Adds meaning-based search using a local all-MiniLM-L6-v2 model (~80 MB, runs fully offline):

pip install -e ".[semantic]"

4. Verify it starts

python -m clipmcp

You should see:

ClipMCP monitor starting (poll interval: 500ms, max clip size: 50000 bytes)
ClipMCP server started.

Press Ctrl+C to stop.


Connecting to your AI client

ClipMCP works with any MCP-compatible client over stdio transport. Pick yours below.

MCP Inspector (browser UI — great for testing before connecting to a client)

npx @modelcontextprotocol/inspector python -m clipmcp

Opens http://localhost:5173 — call any of the 9 tools directly, inspect inputs and outputs, no client setup required.


Cursor

Create or edit ~/.cursor/mcp.json:

{
  "mcpServers": {
    "clipmcp": {
      "command": "python3",
      "args": ["-m", "clipmcp"],
      "cwd": "/path/to/clipmcp/src"
    }
  }
}

Restart Cursor. Open AI chat in Agent mode — ClipMCP tools are available automatically.


VS Code (v1.99+ with GitHub Copilot)

Create .vscode/mcp.json in your workspace, or Cmd+Shift+P → "MCP: Add Server":

{
  "servers": {
    "clipmcp": {
      "type": "stdio",
      "command": "python3",
      "args": ["-m", "clipmcp"],
      "cwd": "/path/to/clipmcp/src"
    }
  }
}

Open Copilot Chat → switch to Agent mode → ClipMCP tools appear in the tool list.

Note: VS Code uses "servers" (not "mcpServers") and requires "type": "stdio" explicitly.


Claude Desktop

Open ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "clipmcp": {
      "command": "python3",
      "args": ["-m", "clipmcp"],
      "cwd": "/path/to/clipmcp/src"
    }
  }
}

Fully quit and restart (Cmd+Q, not just close the window).


Other clients

To find your Python path: which python3


Verifying it works

  1. Copy any text to your clipboard
  2. Open your AI client's chat
  3. Ask: "What did I just copy?"

The assistant will call get_recent_clips and show your clipboard history.

For debug workflows:

  1. Copy an error or stack trace from your terminal or IDE
  2. Ask: "Fix this error" or "What's wrong?"

The assistant will call get_debug_context, which surfaces error clips first, then code, then everything else — no pasting required.


Available MCP Tools

Your AI assistant calls these automatically based on context. You never need to mention them by name.

Tool Triggered when you say…
get_recent_clips "what did I copy", "analyse this", "I just copied…"
search_clips "find the AWS case", "look up the error from earlier"
semantic_search "what was that Slack thread about Grafana"
get_debug_context "fix this error", "what's wrong", "debug this"
pin_clip "keep this clip", "pin that"
unpin_clip "unpin clip 5"
delete_clip "delete clip 3"
get_clip_stats "how many things have I copied today"
clear_history "clear my clipboard history"

Configuration

Settings are created automatically at ~/.clipmcp/config.json on first run.

{
  "poll_interval_ms": 500,
  "max_history_size": 10000,
  "auto_prune": true,
  "prune_after_days": 30,
  "detect_sensitive": true,
  "categories_enabled": true,
  "max_clip_size_bytes": 50000,
  "db_path": "~/.clipmcp/history.db"
}
Setting Default Description
poll_interval_ms 500 How often to check the clipboard (ms)
max_history_size 10000 Max clips before pruning oldest
auto_prune true Automatically delete old clips
prune_after_days 30 Delete clips older than N days
detect_sensitive true Flag API keys, tokens, passwords
categories_enabled true Auto-categorise each clip
max_clip_size_bytes 50000 Truncate clips larger than 50 KB
db_path ~/.clipmcp/history.db SQLite database location

Project structure

clipmcp/
├── pyproject.toml
├── README.md
├── CONTRIBUTING.md
├── src/
│   └── clipmcp/
│       ├── models.py
│       ├── config.py
│       ├── sensitive.py
│       ├── categorizer.py
│       ├── html_handler.py
│       ├── image_handler.py
│       ├── embeddings.py
│       ├── storage.py
│       ├── monitor.py
│       └── server.py
└── tests/

Known limitations

  • Gaps when your client is closed — the monitor only runs while your AI client is open
  • 500 ms polling — copying two things in very fast succession may miss the first
  • Source app is best-effort — reflects the frontmost app at poll time, not the app that triggered the copy
  • Screenshot errors not yet categorised — a screenshot of a stack trace is stored as image, not error. OCR support is on the roadmap

Roadmap

Version Feature Status
v1.0 Text clipboard capture, SQLite storage, MCP tools ✅ Done
v1.1 Image clipboard capture (PNG/TIFF) ✅ Done
v1.2 HTML/rich text capture (web pages, Notion, Slack) ✅ Done
v1.3 Error-aware tagging (error category) ✅ Done
v2.5 Semantic search (local embeddings) ✅ Done
v2.6 Debug context bundling ✅ Done
v2.7 Selective encryption for sensitive clips Planned
v2.8 Menu bar UI Planned
v2.9 OCR on screenshot clips Planned
v3.0 MCP Resources Planned
v3.1 Windows / Linux support Planned

Data privacy

  • All data is stored locally in ~/.clipmcp/ — nothing leaves your machine
  • Embeddings are computed locally using a bundled model
  • Sensitive content is flagged and never shown to your AI assistant in full unless you explicitly request it

Contributing

See CONTRIBUTING.md for architecture, design patterns, database schema, and how to add new features.


License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选