AgentClip MCP Server
Enables AI agents to store, search (keyword and semantic), retrieve, update, and delete personal browser clips from a Cloudflare-backed store, authenticated via per-user token.
README
AgentClip
Clip selected browser text — with a confirm/edit step — into a personal store on Cloudflare, then retrieve it from AI agents (MCP) and tools over a per-user-token-authenticated REST API.
- agent — AI clients reach your clips over MCP / REST with a per-user token.
- clip — a Chrome extension (Manifest V3) adds a "Save to AgentClip" context menu; you edit the text before it's saved.
Production runs as a single Cloudflare Worker at https://agentclip.0xkaz.com serving
the API, the MCP server, Google OAuth, and the dashboard from one origin.
- Live app: https://agentclip.0xkaz.com
- Source: https://github.com/0xkaz/agentclip
- 日本語版 README: README.ja.md
Features
- Clip & edit — right-click any selection → edit content/title/tags/source → save.
- Keyword search — substring match over content/title/tags (works for Japanese too).
- Semantic search — meaning-based search via Workers AI embeddings + Vectorize.
- Per-clip encryption — mark a clip to encrypt it at rest; encrypted clips are excluded from search (and shown masked, with a reveal toggle).
- Share links — publish a single clip at a public read-only
/s/<slug>URL; revoke anytime (encrypted clips can't be shared). - MCP + REST — AI agents and tools read/write your clips with a per-user token.
- Google sign-in for the dashboard; opaque per-user Bearer tokens for machines.
Use the hosted app
The fastest path — no local setup:
- Open https://agentclip.0xkaz.com and Sign in with Google.
- Go to API Tokens → create a token (
ac_live_…, shown once — copy it). - Open Setup & Usage in the app — it shows your exact MCP config and
curlexamples, plus the Chrome-extension steps below.
The dashboard has three pages:
| Page | What it does |
|---|---|
| Snippets | Browse, add/edit/delete, keyword & semantic search your clips |
| API Tokens | Create / revoke per-user Bearer tokens |
| Setup & Usage | Copy-paste MCP config, REST curl, and extension setup |
Monorepo layout
apps/api Cloudflare Worker — REST + MCP + Google OAuth, D1, serves dashboard
apps/web React + Vite dashboard — landing page + Snippets / Tokens / Setup
apps/extension Chrome MV3 extension — capture + confirm/edit
packages/shared shared TypeScript types
The rest of this README covers running and deploying it yourself.
Requirements: Node 20+, pnpm 9+ (npm i -g pnpm), a Cloudflare account, and a
Google OAuth client.
1. Clone & install
git clone https://github.com/0xkaz/agentclip.git
cd agentclip
pnpm install # or: make install
2. Configure Cloudflare D1
pnpm --filter @agentclip/api exec wrangler d1 create agentclip
Paste the returned database_id into both [[d1_databases]] blocks in
apps/api/wrangler.toml (the top-level one and the [env.production] one).
make db-init # apply schema.sql to the LOCAL D1
# later, for production:
pnpm --filter @agentclip/api db:init:remote
3. Configure Google OAuth
In Google Cloud Console → Credentials → create an OAuth client ID (Web application). Add authorized redirect URIs:
- Local:
http://localhost:8787/auth/google/callback - Production:
https://agentclip.0xkaz.com/auth/google/callback
Then create local secrets:
cp apps/api/.dev.vars.example apps/api/.dev.vars
# edit apps/api/.dev.vars:
# GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET, SESSION_SECRET (any random 32+ byte string)
4. Run locally
make dev # API + MCP on http://localhost:8787
pnpm --filter @agentclip/web dev # dashboard on http://localhost:5173
Open http://localhost:5173, sign in with Google, and create an API token.
5. Install the Chrome extension
pnpm --filter @agentclip/extension build # outputs apps/extension/dist
- Open
chrome://extensions→ enable Developer mode. - Load unpacked → select
apps/extension/dist. - Click the AgentClip icon → set API base URL and paste the token from the dashboard.
- Local:
http://localhost:8787 - Production:
https://agentclip.0xkaz.com
- Local:
- Select text on any page → right-click → Save to AgentClip → edit → Save.
6. Deploy to production (agentclip.0xkaz.com)
# one-time: set production secrets
pnpm --filter @agentclip/api exec wrangler secret put GOOGLE_CLIENT_ID --env production
pnpm --filter @agentclip/api exec wrangler secret put GOOGLE_CLIENT_SECRET --env production
pnpm --filter @agentclip/api exec wrangler secret put SESSION_SECRET --env production
pnpm --filter @agentclip/api db:init:remote # schema on remote D1
make deploy # builds the dashboard, then deploys the Worker (--env production)
The custom domain route (
agentclip.0xkaz.com) requires the Cloudflare API token to have Zone:Edit on0xkaz.comin addition to Workers/D1 edit. Without it, deploy the Worker and bind the domain from the dashboard, or use the*.workers.devURL.
Using the REST API
# save (add "encrypted": true to encrypt at rest + exclude from search)
curl -X POST https://agentclip.0xkaz.com/api/snippets \
-H "Authorization: Bearer ac_live_..." \
-H "Content-Type: application/json" \
-d '{"content":"hello","tags":"demo"}'
# keyword search (substring; works for Japanese)
curl "https://agentclip.0xkaz.com/api/snippets?q=hello" -H "Authorization: Bearer ac_live_..."
# semantic search (meaning-based)
curl "https://agentclip.0xkaz.com/api/snippets?q=greeting&mode=semantic" -H "Authorization: Bearer ac_live_..."
# update / delete
curl -X PATCH https://agentclip.0xkaz.com/api/snippets/1 -H "Authorization: Bearer ac_live_..." -H "Content-Type: application/json" -d '{"content":"updated"}'
curl -X DELETE https://agentclip.0xkaz.com/api/snippets/1 -H "Authorization: Bearer ac_live_..."
Using MCP
Point an MCP client at https://agentclip.0xkaz.com/mcp with header
Authorization: Bearer ac_live_.... Tools: store_snippet, search_snippets,
semantic_search, get_snippet, list_recent, update_snippet, delete_snippet.
Semantic search indexes new clips automatically; to index clips made earlier, open the Snippets page, switch to Semantic, and click Rebuild index (or
POST /api/my/reindex). Vectorize is eventually consistent (new clips become searchable within ~1 minute).
See docs/architecture.md and docs/agent-workflow.md for details.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。
mcp-server-qdrant
这个仓库展示了如何为向量搜索引擎 Qdrant 创建一个 MCP (Managed Control Plane) 服务器的示例。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。