zotero-mcp
Allows searching and managing a Zotero library, including reading items, creating notes, organizing collections, and performing semantic searches over PDFs.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@zotero-mcp Search my Zotero library for recent papers on AI ethics."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
zotero-mcp
A Model Context Protocol server for Zotero. It lets Claude Code, Claude Desktop and any other MCP client search your library, read items, take notes, file things into collections and find papers by meaning rather than by exact words.
This is a ground-up rewrite of the earlier zotero-mcp server with a small,
typed tool surface, bounded responses, real error reporting and a semantic
search index that is chunk-level, incremental and reranked.
What it does
Read
Tool | Purpose |
| Keyword search across the library, paged, with type filter |
| One item's full record, children, tags and collections; flags items in the Trash |
| Browse the collection tree and its contents |
| Tags and a library overview |
| Is Zotero reachable, is the index built, which optional features are on |
Find by meaning
Tool | Purpose |
| Vector search over titles, abstracts and PDF fulltext, reranked by a cross-encoder. Each hit shows the passage that matched, whether it came from the metadata or the fulltext, and how many passages agreed. Filter by item type, year range or collection. |
Write (only when a web API key with write permission is configured)
Tool | Purpose |
| Create, edit and trash items. Delete is always "move to Trash", never permanent. |
| Add or remove tags and collection memberships |
| Attach a note to an item, or create a standalone one |
Every write tool defaults to dry_run=true and returns a preview of the change.
The client must pass dry_run=false to apply it. Updates carry Zotero's version
header, so a concurrent edit in the desktop app produces a clear conflict error
rather than a silent overwrite.
Related MCP server: zotbridge
Install
Requires Python 3.10+ and uv.
uv tool install 'zotero-mcp-next[semantic,pdf] @ git+https://github.com/v-i-n-a-y/zotero-mcp-v2'The semantic extra pulls in ChromaDB and sentence-transformers for semantic
search; pdf adds PyMuPDF and ebooklib for fulltext extraction. Omit both for a
lean install with keyword search only.
Configure
The server reads environment variables (or a JSON file via ZOTERO_MCP_CONFIG).
Variable | Meaning |
|
|
| Web API key from https://www.zotero.org/settings/keys |
| Your numeric user ID (shown on the same page) |
|
|
|
|
|
|
| Sentence-transformers model; default |
| Where the index lives; default |
Modes. local talks to the running Zotero desktop app (port 23119): fast,
no key needed, read-only. web talks to api.zotero.org and needs a key.
hybrid reads locally and writes through the web API, which is the best
everyday setting when the desktop app is open. auto picks local if the app is
reachable, otherwise web.
Claude Code
claude mcp add zotero -s user \
-e ZOTERO_MCP_MODE=hybrid \
-e ZOTERO_API_KEY=... \
-e ZOTERO_LIBRARY_ID=... \
-- zotero-mcpClaude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"zotero": {
"command": "zotero-mcp",
"env": {
"ZOTERO_MCP_MODE": "hybrid",
"ZOTERO_API_KEY": "...",
"ZOTERO_LIBRARY_ID": "..."
}
}
}
}Semantic search
Build the index once from a terminal; it needs the desktop app open (or web mode) to read fulltext:
zotero-mcp index build # first run: roughly an hour per thousand PDFs
zotero-mcp index statusAfter that the running server refreshes the index on the schedule above, re-embedding only items whose Zotero version changed. Extracted fulltext is cached beside the index, so switching embedding models rebuilds in minutes.
How a query is answered: the vector index returns a pool of candidate chunks (metadata chunk plus fulltext chunks per item, with trailing reference lists stripped), a cross-encoder rescores the pool against the query, citation-dense chunks are penalised, and chunks collapse to one hit per item with a small bonus for items that matched in several places. Everything runs locally; on Apple silicon the models use Metal.
CLI
zotero-mcp # serve over stdio (what MCP clients run)
zotero-mcp health # can the configured library be reached?
zotero-mcp index build # build or incrementally refresh the semantic index
zotero-mcp index status
zotero-mcp index clear
zotero-mcp versionDesign
Every response is bounded. Lists are paged with opaque cursors; long text is truncated with an explicit marker.
Failures raise MCP tool errors with a stable code (
not_found,invalid_input,auth,write_conflict,backend_unavailable,unsupported) and a hint, never a success whose text starts with "Error:".Tools return both markdown for humans and structured content for clients that can use it.
Logging goes to stderr; stdout carries only the protocol.
More in docs/design.md.
Development
uv sync --extra dev
uv run pytest
uv run ruff check src testsLicence
MIT.
Available Tools
8 toolscollection_itemsCollection ItemsA
List the top-level items in one collection.
Inputs: collection_key (required), limit, cursor.
get_itemGet ItemA
Fetch the full record for one item, including its attachments and note count.
Inputs: item_key (required).
library_statsLibrary StatsA
Report a quantitative overview of the active library.
Inputs: no named parameters.
list_collectionsList CollectionsA
List the library's collections as slash-joined paths (Parent/Child).
Inputs: limit, cursor.
list_tagsList TagsC
List tags used in the library.
Inputs: limit.
search_librarySearch LibraryA
Search the active Zotero library and return a page of matching items.
Each result carries the item key you pass to get_item, plus author,
year, and a short abstract preview.
Inputs: limit, query, cursor, item_type.
semantic_searchSemantic SearchA
Find items by meaning using the vector index. Each hit shows the passage that matched.
Complements search_library (exact-word matching): use this when you
know the idea but not the wording. Phrase the query as a topic, claim,
or question rather than keywords. Results are reranked by a
cross-encoder; matched_in says whether the title/abstract or a
fulltext passage matched, and evidence counts matching passages.
Filters narrow by type, year range, or collection. Requires the index
to have been built (zotero-mcp index build).
Inputs: query (required), limit, year_to, item_type, +2 more.
server_healthServer HealthA
Check that the server can actually reach the configured Zotero library.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Each tool has a clear, distinct purpose: single-item retrieval, keyword search, semantic search, collection browsing, tag listing, stats, and health check. Even search_library and semantic_search are explicitly differentiated as exact-word vs. meaning-based complement.
Naming mixes verb-prefixed tools (get_item, search_library, list_collections, list_tags) with noun-phrase tools (collection_items, library_stats, server_health, semantic_search). The pattern is readable but not consistently applied.
Eight tools is well-scoped for a Zotero library exploration and search server. Every tool addresses a necessary capability without redundancy or bloat.
The tool set covers the core read/query workflow: item lookup, two search modes, collection/tag navigation, stats, and diagnostics. The only notable gap is collection-specific detail beyond top-level items, but within the apparent read-only scope this is minor.
Maintenance
Related MCP Connectors
Zotero MCP server for Claude and ChatGPT: search, citations, safe writes, PDF passages and pages.
Remote MCP server for full read/write access to a Zotero library
Agentic search over your Dewey document collections from any MCP-compatible client.
Read-only MCP server exposing a user ORANO library to their own AI agent.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables searching, reading, annotating, and managing a Zotero library from any MCP client.AGPL 3.0
- AlicenseAqualityCmaintenanceConnects a Zotero library to MCP-compatible clients, enabling library search, full-text PDF reading, highlight retrieval, and formatted citation export.20MIT
- FlicenseNot gradedqualityAmaintenanceEnables MCP clients and AI assistants to search a Zotero library, retrieve detailed item metadata and PDF full text, and work with either the local Zotero API or the Zotero Web API.-
- FlicenseNot gradedqualityAmaintenanceEnables AI assistants and MCP clients to search a Zotero library, retrieve complete item metadata, and access full text such as PDF contents.-