zotero-mcp
Provides read-only access to a local Zotero library via the Zotero desktop local API, with tools for searching items, retrieving metadata and full-text of attachments, and managing collections, tags, and library statistics.
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 'machine learning' in full text"
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 local-only, read-only MCP server for Zotero.
AI disclosure
This tool was built by Claude and hardly verified by me. I advise against using it on your Zotero database (and if you ignore that advise, make sure you have up to date offline backups).
Related MCP server: zotero-mcp
Features
Local-only. Talks to the Zotero desktop client's local API on
127.0.0.1:23119. No API key, no zotero.org account, no network traffic.Read-only. Every tool is a retrieval call, enforced by an allowlist; the server has no code path that can add, edit, or delete anything. Note that the local API itself is not read-only — Zotero 10+ supports
POST/PUT/PATCH/DELETEon/api/once a client obtains a local API key viaPOST /api/local/authorize. This server never requests such a key and holdsapi_key=None, so the write path stays unreachable; the read-only guarantee is enforced here, not by the API.stdio transport only.
Requirements
Zotero 7 or newer, running
Python 3.13+
Zotero's local API enabled: Settings → Advanced → "Allow other applications on this computer to communicate with Zotero"
Without that setting the API returns 403 and every tool reports how to fix it.
Install
From a local checkout:
uv tool install .Usage
Register it with Claude Code:
claude mcp add zotero -- uvx zotero-mcpOr add it to your MCP client config directly:
{
"mcpServers": {
"zotero": {
"command": "uvx",
"args": [ "zotero-mcp" ]
}
}
}Tools
Tool | Purpose |
| Search all fields, tags and attachment text; results ranked by where the match occurred. Optional item-type and tag filters. |
| Full metadata for one item key. |
| Attachments and notes belonging to an item. |
| Indexed text of an attachment (PDF, snapshot), as plain text with a header line. |
| Collections, optionally top-level only. |
| Items inside a collection. |
| Tags used in the library. |
| Most recently added items. |
| Item and collection counts. |
Item keys are 8-character strings such as ABCD2345. To read a PDF's text,
call get_item_children on a reference first to get its attachment key, then
pass that to get_item_fulltext.
Why not read zotero.sqlite directly?
Zotero's developer documentation states that the SQLite schema is an internal implementation detail that may change between releases, and that direct access must be read-only to avoid corruption (Zotero's caching layer interferes with SQLite file locking). The local API is the supported interface, works while Zotero is running, and returns stable documented JSON.
The tradeoff: Zotero must be open. Reading the SQLite file would work with Zotero closed, at the cost of coupling to an unstable schema.
Notes
itemTypenegation: the API docs document exactly three forms —itemType=book,itemType=book || journalArticle(OR), anditemType=-attachment(NOT). Negating a group is not documented, and unsupported expressions fail open: they return200 OKwith the filter silently dropped rather than a400. Measured on this library:-attachment→ 578 results,-attachment || note→ 1184 (the unfiltered total),-(attachment)→ 1184. An unknown type such asgarbagetypereturns 0 results rather than erroring. Because a broken filter yields more rows than a working one, this server sends only the documented-attachmentand drops remaining notes and annotations in code, over-fetching so the requestedlimitis still filled.get_item_fulltextreturns plain text, not JSON. Every other tool returns structured records, but a document is a text payload: serialising it as JSON escapes each newline into a literal\nand collapses the whole document onto one line (measured: 894 escapes in a single 51,003-char line), forcing the caller to decode it before reading. The tool returns the text with a one-line header instead, which preserves line breaks and is slightly smaller than the escaped JSON was. Returningstralone is not enough: FastMCP still advertises an output schema and emits{"result": "..."}as structured content, which clients that prefer structured output render as JSON — re-escaping the newlines. The tool is therefore declared@mcp.tool(output_schema=None)so only the plain-text block is sent.Search ranks, because Zotero only filters.
search_itemsdefaults toqmode="everything"(all fields, tags and indexed attachment text) rather than the API'stitleCreatorYeardefault. The narrow default made recall brittle: Zotero requires every whitespace-separated term to match, so searchingKEMTLS post-quantum TLS without handshake signaturesreturned zero hits —KEMTLSappears in the abstract, not the title, and that one term zeroed the query. The same search now finds the paper. Zotero's quicksearch filters without ranking, so hits are scored locally by match location — title, then creator/date, tags, abstract/venue, and finally attachment text — and each result reports itsmatchedOn. Whole-word matches outrank substring ones, so searchingShorsurfaces Shor's paper above Shorter Koblitz Curves.qmode="fields"(all fields and tags, no attachment text) is also accepted; it works on the local API but is not in the web API docs.Results are condensed (envelope and empty fields stripped) to keep responses small; abstracts are truncated in list views but returned in full by
get_item.ZOTERO_LIBRARY_IDandZOTERO_LOCALEcan override the defaults (0,en-US).
Tests
uv run pytestThe suite mocks pyzotero, so it runs without Zotero open.
License
Released into the public domain under the Unlicense. See LICENSE.
Available Tools
9 toolsget_collection_itemsB
List the items inside a collection.
Inputs: key (required), limit, top_level_only. Returns: result
get_itemB
Get full metadata for a single item by its key.
Inputs: key (required). Returns: object
get_item_childrenA
List the attachments and notes attached to an item.
Inputs: key (required). Returns: result
get_item_fulltextA
Get the indexed full text of an attachment (PDF, snapshot, etc.).
The key must be an attachment item key, not its parent. Use get_item_children on a reference to find its attachment keys. Text is only available if Zotero has indexed the attachment.
Inputs: key (required), max_chars. Returns: object
get_recent_itemsB
List the most recently added items in the library.
Inputs: limit. Returns: result
library_statsA
Report totals for the library: item counts and collection count.
Inputs: no named parameters. Returns: object
list_collectionsB
List collections (folders) in the library.
Inputs: limit, top_level_only. Returns: result
list_tagsB
List tags used in the library.
Inputs: limit. Returns: result
search_itemsA
Search the Zotero library for items matching a query.
Returns condensed metadata for each match. Attachments and notes are excluded so results are actual references; use get_item_children to see an item's PDFs and notes.
Inputs: query (required), tag, limit, qmode, +1 more. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 9 tools
Each tool targets a distinct operation: retrieving single items, searching, listing attachments, getting fulltext, browsing collections/tags, and library stats. There is no meaningful overlap between tool purposes, and descriptions clarify edge cases like attachment keys.
Most tools follow a verb_noun pattern (get_item, list_collections, search_items), with 'get' for single-item retrieval and 'list' for enumerations. The only outlier is library_stats, which uses a noun-noun form, slightly breaking the pattern.
With 9 tools, the server is well-scoped for a Zotero library read-only workflow. Each tool covers a distinct aspect of browsing and retrieving references, without unnecessary redundancy or excessive granularity.
The toolset covers the core read operations: item retrieval, search, attachments, fulltext, collections, tags, and recent items. Missing write operations (create/update/delete) are likely intentional for a reference-manager assistant, and a method to list all items at once is absent but can be approximated via search.
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
Search your AI chat history (ChatGPT, Claude, Codex) from any MCP client. Remote, private, read-only
Read-only MCP server exposing a user ORANO library to their own AI agent.
Related MCP Servers
- AlicenseAqualityDmaintenanceA server that enables MCP clients like Anthropic Claude App to interact with local Zotero libraries, allowing users to search papers, manage notes, and access research materials through natural language.1029Apache 2.0
- FlicenseNot gradedqualityDmaintenanceRead-only MCP server for browsing, searching, and exporting a Zotero library from AI assistants.-
- AlicenseAqualityDmaintenanceRead-only MCP server that lets Claude or any MCP client search and retrieve metadata, notes, full text, citations, and BibTeX from your local Zotero library via its built-in API.11MIT
- AlicenseAqualityBmaintenanceMCP server that grants AI tools read-only access to a Zotero library via search, citekey lookup, and on-demand fulltext retrieval, with low token usage and support for Claude Code, Claude Desktop, and Codex.5MIT