zotero-mcp-server
An MCP server for the Zotero Web API v3 that lets you search, read, and write items, collections, tags, and notes in a Zotero library, supporting literature-review workflows.
README
zotero-mcp-server
An MCP (Model Context Protocol) server for the Zotero Web API v3 — search, read, and write items, collections, tags, and notes in a Zotero library.
Built for use with Claude (or any MCP client), aimed at literature-review workflows: pulling existing references into a "registro maestro," filing newly-found sources back into Zotero, tagging items by theoretical line, and attaching notes.
Tools
| Tool | Read/Write | Description |
|---|---|---|
zotero_search_items |
Read | Quick-search items by text, type, tag, or collection |
zotero_get_item |
Read | Full metadata for one item, optionally with a formatted citation |
zotero_get_item_children |
Read | Notes/attachments of an item |
zotero_list_collections |
Read | List collections, optionally scoped to a parent |
zotero_list_tags |
Read | List tags in use, with item counts |
zotero_create_item |
Write | Create a new bibliographic item |
zotero_add_note |
Write | Attach a note to an existing item |
zotero_update_item_tags |
Write | Add/remove tags on an item (version-checked) |
zotero_create_collection |
Write | Create a new collection/subcollection |
This is a focused set covering the core research workflow, not full API coverage. Not included (would need to be added if you need them): saved searches, file/attachment uploads, full item updates beyond tags, deletion, group-membership management.
1. Get a Zotero API key
- Go to https://www.zotero.org/settings/keys and create a new private key.
- Grant it read/write access to the library you want to use (your personal library, and/or specific groups).
- Note your numeric user ID, shown on the same page — this is not your username.
- For a group library, the group ID is the number in the group's URL, or from
GET https://api.zotero.org/users/<userID>/groups.
- For a group library, the group ID is the number in the group's URL, or from
2. Configure environment variables
| Variable | Required | Description |
|---|---|---|
ZOTERO_API_KEY |
Yes | The key generated above |
ZOTERO_LIBRARY_TYPE |
Yes | user or group |
ZOTERO_LIBRARY_ID |
Yes | Numeric user ID or group ID |
ZOTERO_API_BASE_URL |
No | Override for the local Zotero desktop API (http://localhost:23119/api/) instead of https://api.zotero.org |
TRANSPORT |
No | stdio (default) or http |
PORT |
No | Port for TRANSPORT=http (default: 3000) |
Never commit these values or hardcode them in source — set them as environment variables or secrets in whatever you use to run the server.
3. Build
npm install
npm run build
4. Run
Locally, over stdio (for local MCP clients, e.g. Claude Desktop's local server config):
ZOTERO_API_KEY=... ZOTERO_LIBRARY_TYPE=user ZOTERO_LIBRARY_ID=... node dist/index.js
As a remote server, over Streamable HTTP (needed to add it as a custom connector in claude.ai):
TRANSPORT=http PORT=3000 \
ZOTERO_API_KEY=... ZOTERO_LIBRARY_TYPE=user ZOTERO_LIBRARY_ID=... \
node dist/index.js
This exposes POST /mcp (the MCP endpoint) and GET /health (a plain liveness check). Deploy it somewhere reachable over HTTPS (Render, Fly.io, Railway, a small VM behind a reverse proxy with TLS, etc.) — claude.ai's custom connector setup needs a public https:// URL, not localhost.
A Dockerfile is included, so any of the platforms below can build and run it with no extra configuration beyond setting environment variables.
Deploying to a public HTTPS endpoint
Pick one. Render is the easiest if you don't mind pushing to GitHub; Fly.io is the easiest if you'd rather stay in a terminal.
Option A — Render (dashboard, needs a GitHub repo)
- Push this project (this whole folder) to a new GitHub repository.
- In the Render dashboard, click New → Web Service and connect that repository.
- Render will detect the
Dockerfileautomatically — leave Environment as Docker. Leave build/start commands blank (the Dockerfile handles both). - Under Environment Variables, add:
ZOTERO_API_KEYZOTERO_LIBRARY_TYPE(userorgroup)ZOTERO_LIBRARY_ID- (
TRANSPORT=httpis already set inside the Dockerfile — no need to add it.)
- Click Create Web Service. Render builds the image and deploys it; this takes a few minutes the first time.
- Once live, Render shows a URL like
https://zotero-mcp-server.onrender.com. Your MCP endpoint ishttps://zotero-mcp-server.onrender.com/mcp. - Sanity check:
curl https://zotero-mcp-server.onrender.com/healthshould return{"status":"ok"}.
Free-tier note: Render's free web services sleep after inactivity and take a few seconds to wake on the next request — fine for testing, worth upgrading if you'll use this daily.
Option B — Fly.io (CLI, no GitHub needed)
- Install the CLI:
curl -L https://fly.io/install.sh | sh(or see fly.io/docs/flyctl). fly auth login- From inside the
zotero-mcp-serverfolder:fly launch- It detects the
Dockerfileand proposes an app name and region — accept or edit. - Say no to adding a Postgres/Redis database (not needed).
- Say no to deploying immediately if it asks — set secrets first (next step).
- It detects the
- Set your credentials as secrets (never as plain fly.toml values):
fly secrets set ZOTERO_API_KEY=your_key ZOTERO_LIBRARY_TYPE=user ZOTERO_LIBRARY_ID=your_id - Open the generated
fly.tomland confirminternal_port = 3000under[http_service](it should be auto-detected from the Dockerfile'sEXPOSE 3000; fix it manually if not). - Deploy:
fly deploy - Your MCP endpoint is
https://<your-app-name>.fly.dev/mcp. Checkhttps://<your-app-name>.fly.dev/health.
Option C — Railway (CLI or dashboard)
- Install the CLI (
npm install -g @railway/cli) or use the Railway dashboard connected to a GitHub repo — same idea as Render. - CLI path:
railway login, then from the project folderrailway initandrailway up. Railway detects theDockerfileautomatically. - Set env vars:
railway variables set ZOTERO_API_KEY=... ZOTERO_LIBRARY_TYPE=user ZOTERO_LIBRARY_ID=...(or via the dashboard's Variables tab). - Railway services aren't public by default — go to Settings → Networking → Generate Domain to get a public
https://your-app.up.railway.appURL. - MCP endpoint:
https://your-app.up.railway.app/mcp.
Option D — Self-hosted VM (full control, more steps)
- Provision a small Ubuntu 22.04+ VM (DigitalOcean, Linode, a spare EC2 instance, etc.) and point a DNS A record at its IP, e.g.
zotero-mcp.yourdomain.com. - SSH in and install Node 20 and Caddy (Caddy handles HTTPS automatically via Let's Encrypt — much less setup than nginx + certbot):
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo bash - sudo apt-get install -y nodejs sudo apt-get install -y debian-keyring debian-archive-keyring apt-transport-https curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list sudo apt-get update && sudo apt-get install -y caddy - Copy the project to the VM (
scpthe zip, thenunzip) and build:cd zotero-mcp-server && npm install && npm run build - Create
/etc/systemd/system/zotero-mcp.service:Then:[Unit] Description=Zotero MCP server After=network.target [Service] Environment=TRANSPORT=http Environment=PORT=3000 Environment=ZOTERO_API_KEY=your_key Environment=ZOTERO_LIBRARY_TYPE=user Environment=ZOTERO_LIBRARY_ID=your_id ExecStart=/usr/bin/node /home/youruser/zotero-mcp-server/dist/index.js Restart=always User=youruser [Install] WantedBy=multi-user.targetsudo systemctl daemon-reload && sudo systemctl enable --now zotero-mcp - Point Caddy at it — edit
/etc/caddy/Caddyfile:
Then:zotero-mcp.yourdomain.com { reverse_proxy localhost:3000 }sudo systemctl reload caddy. Caddy fetches a TLS certificate automatically on first request. - Check
https://zotero-mcp.yourdomain.com/health. MCP endpoint:https://zotero-mcp.yourdomain.com/mcp.
5. Connect it to Claude
Once deployed and reachable over HTTPS:
- In claude.ai, go to Settings → Connectors → Add custom connector.
- Enter the deployed URL, e.g.
https://your-deployment.example.com/mcp. - Claude will discover the 9 tools above automatically.
For Claude Desktop with a local stdio server instead, add an entry to its MCP server config pointing at node /absolute/path/to/dist/index.js, with the environment variables from step 2 set in that config.
Testing
npx @modelcontextprotocol/inspector node dist/index.js
This opens a local UI to call each tool by hand before wiring it up to Claude.
Notes on the Zotero API this server relies on
- Auth:
Zotero-API-Keyheader, per request. - Versioning for writes:
zotero_update_item_tagsreads the item's currentversionbefore patching, and sends it viaIf-Unmodified-Since-Version— if the item changed elsewhere in the meantime, Zotero returns412and the tool reports it clearly instead of silently overwriting. - Rate limits: Zotero may return
429with aRetry-Afterheader, or aBackoffheader on any response. This server surfaces both as actionable error text; it does not currently auto-retry. - Item creation fetches the field template for the requested
itemTypefromGET /items/newfirst, so only valid fields for that type are sent.
Official API docs: https://www.zotero.org/support/dev/web_api/v3/
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。