Install the Zotero MCP server
mainInstall the Zotero MCP server using pip to enable AI assistants to interact with your Zotero library.
pip install zotero-mcp-serverrepository·main·Indexed 26 days ago
https://github.com/54yyyu/zotero-mcpA Model Context Protocol (MCP) server that connects Zotero research libraries to AI assistants like Claude and ChatGPT. It provides capabilities for semantic search, metadata retrieval, annotation extraction, and library management via AI or a standalone CLI. The server supports local read-only mode, hybrid mode for web API writes, and optional extras for PDF extraction and Scite citation intelligence.
Install the Zotero MCP server using pip to enable AI assistants to interact with your Zotero library.
pip install zotero-mcp-serverBy default, configuration and the semantic index (ChromaDB) are stored inside the container at:
/home/app/.config/zotero-mcp/config.json/home/app/.config/zotero-mcp/chroma_db/To prevent ChromaDB from being rebuilt every time the container restarts (e.g., after running zotero-mcp update-db), you must mount the configuration directory to a persistent volume or host path.
docker run --rm \
-v zotero-mcp-data:/home/app/.config/zotero-mcp \
--env-file .env \
ghcr.io/<owner>/zotero-mcp:latestSince ChatGPT web app does not support local MCPs natively, you must use a tunnel (like ngrok) to expose your local server via SSE.
sse transport:zotero-mcp serve --transport sse --host 0.0.0.0 --port 8000ngrok http 8000https://<random-string>.ngrok-free.app).zotero-mcp serve --transport sse --host 0.0.0.0 --port 8000Zotero MCP is available as multi-arch Docker images on GHCR. Use the -core tag for a lightweight install or the default/-all tag for full features (semantic search, PDF, scite).
Default MCP server mode (stdio):
docker run --rm ghcr.io/<owner>/zotero-mcp:latestMCP server mode with explicit transport (e.g., SSE):
docker run --rm ghcr.io/<owner>/zotero-mcp:latest serve --transport streamable-http --host 0.0.0.0 --port 8000Standalone CLI mode:
Set ZOTERO_APP=cli to use the CLI instead of the server.
docker run --rm -e ZOTERO_APP=cli ghcr.io/<owner>/zotero-mcp:latest search "machine learning"Persistence:
To persist configuration and the ChromaDB database across container restarts, mount /home/app/.config/zotero-mcp to a volume.
docker run --rm -v zotero-mcp-data:/home/app/.config/zotero-mcp --env-file .env ghcr.io/<owner>/zotero-mcp:latestWhen performing write operations or adding items during testing, follow these cleanup protocols to prevent library clutter:
_MCP-test-to-delete.mcp-test-verified) must be removed at the end of the testing phase to restore the item to its original state._MCP-test-to-delete, move those items to the Trash, and delete any collections containing "MCP Test" in their name.Once a tunnel is running, connect it to ChatGPT:
/sse/ (with trailing slash), and a unique session_id (UUIDv4).https://<YOUR_NGROK_URL>.ngrok-free.app/sse/?session_id=<YOUR_UUID>No authenticationIf you need to access your library remotely without the Zotero desktop app running locally, use the --no-local flag during setup to bypass the local API requirement.
zotero-mcp setup --no-local --api-key YOUR_API_KEY --library-id YOUR_LIBRARY_IDZotero MCP supports advanced PDF annotation extraction, including direct processing of PDF files even if they are not yet indexed by Zotero. It supports searching through annotations, comments, and image annotations.
Requirements & Recommendations:
To add advanced features like semantic search, PDF extraction, or Scite intelligence, install the corresponding extras using pip or uv:
semantic: Vector-based similarity search (requires ChromaDB and embedding models).pdf: PDF outline extraction and EPUB annotation support.scite: Scite citation intelligence (tallies and retraction alerts).all: Installs all the above features.Note: When using uv, use quotes around the package name to ensure the shell handles the brackets correctly.
# Full install with all features using uv
uv tool install "zotero-mcp-server[all]"
# Just semantic search using uv
uv tool install "zotero-mcp-server[semantic]"
# Using pip for specific extras
pip install "zotero-mcp-server[semantic]"
pip install "zotero-mcp-server[pdf]"
pip install "zotero-mcp-server[scite]"
pip install "zotero-mcp-server[all]"You can configure the Zotero MCP server for Claude clients using auto-configuration or manual JSON editing.
Run the following command in your terminal:
zotero-mcp setupAdd the server definition to your configuration file:
claude_desktop_config.json~/.claude.jsonUse only ZOTERO_LOCAL: "true". This mode is fast but does not support write operations.
To enable writing (e.g., adding notes, changing tags), keep ZOTERO_LOCAL: "true" and provide your Zotero Web API credentials:
userID on the same page.ZOTERO_LIBRARY_TYPE: "group" and use the group's ID.{
"mcpServers": {
"zotero": {
"command": "zotero-mcp",
"env": {
"ZOTERO_LOCAL": "true",
"ZOTERO_API_KEY": "YOUR_API_KEY",
"ZOTERO_LIBRARY_ID": "YOUR_LIBRARY_ID"
}
}
}
}You can add papers to Zotero using their DOI. The system attempts to automatically attach an open-access PDF using a cascade of sources:
If no open-access PDF is found, the tool will return a message stating "no open-access PDF found" rather than an error.
To use Zotero MCP with Chorus.sh:
zotero-mcp setup-info to get the exact path.zotero-mcp installation.Example Environment JSON:
{"ZOTERO_LOCAL": "true"}