zotero-mcp
Read-only MCP server for browsing, searching, and exporting a Zotero library from AI assistants.
README
zotero-mcp
Read-only MCP server for browsing, searching, and exporting a Zotero library from AI assistants such as Claude. <!-- mcp-name: io.github.nadavWeisler/zotero-mcp -->
Features
- Read-only access to collections, saved searches, items, notes, attachments, tags, and citations
- Structured JSON responses (
output_format="json") for AI clients that prefer machine-readable output - Text responses by default for chat-oriented clients
- Pagination hints, filter validation, and normalized metadata fields
- Shared HTTP client with retry/backoff and clearer upstream error handling
Available tools
| Tool | Description |
|---|---|
list_collections |
List non-search collections |
list_saved_searches |
List saved searches |
list_items |
List items with optional type/tag filters |
list_collection_items |
List items from a specific collection |
list_saved_search_items |
List items returned by a saved search |
get_item |
Fetch normalized metadata for a single item |
get_note |
Fetch note content for a note item |
get_attachment |
Fetch attachment metadata |
search_items |
Full-text or title/creator/year search |
list_tags |
List tags with item counts |
get_item_children |
List note/attachment children for an item |
get_item_citation |
Render a citation in a Zotero style such as APA or MLA |
export_item |
Export an item as BibTeX, BibLaTeX, RIS, MODS, Refer, or CSL JSON |
Requirements
- Python 3.12+
- A Zotero Web API key
- Your numeric Zotero user or group library ID
Setup
1 — Get your API credentials
- Sign in at zotero.org and open Settings → Feeds/API.
- Create a new private key with read-only access to your library.
- Note the generated key and your numeric User ID or Group ID.
2 — Set environment variables
| Variable | Required | Default | Description |
|---|---|---|---|
ZOTERO_API_KEY |
✅ | — | Zotero API key |
ZOTERO_LIBRARY_ID |
✅ | — | Numeric user or group library ID |
ZOTERO_LIBRARY_TYPE |
user |
user or group |
|
ZOTERO_API_BASE |
https://api.zotero.org |
Override for alternate Zotero API bases | |
ZOTERO_MCP_LOG_LEVEL |
WARNING |
Python logging level for request/retry observability |
export ZOTERO_API_KEY="your_api_key_here"
export ZOTERO_LIBRARY_ID="123456"
export ZOTERO_LIBRARY_TYPE="user" # or "group"
3 — Install dependencies
With uv:
uv sync
With pip:
python -m pip install -e .
4 — Run the server
python main.py
Or via the installed package entrypoint:
python -m zotero_mcp
Client configuration
Claude Desktop
Add the following to claude_desktop_config.json:
{
"mcpServers": {
"zotero": {
"command": "python",
"args": ["/absolute/path/to/zotero-mcp/main.py"],
"env": {
"ZOTERO_API_KEY": "your_api_key_here",
"ZOTERO_LIBRARY_ID": "123456",
"ZOTERO_LIBRARY_TYPE": "user"
}
}
}
}
Restart Claude Desktop after saving.
Generic stdio MCP clients
Any stdio-based MCP client can launch the server with:
{
"command": "python",
"args": ["/absolute/path/to/zotero-mcp/main.py"],
"env": {
"ZOTERO_API_KEY": "your_api_key_here",
"ZOTERO_LIBRARY_ID": "123456",
"ZOTERO_LIBRARY_TYPE": "user"
}
}
Structured output
Every tool supports:
output_format="text"(default)output_format="json"
JSON mode is useful when an MCP client or agent wants explicit paging and normalized metadata:
{
"paging": {
"start": 0,
"returned": 25,
"total": 143,
"next_start": 25,
"has_more": true
}
}
Common workflows
- Browse a collection:
list_collection_items(collection_key="ABCD1234") - Explore saved searches:
list_saved_searches(output_format="json") - Fetch richer child data:
get_item_children(item_key="ABCD1234", item_type="note") - Export a reference:
export_item(item_key="ABCD1234", export_format="bibtex") - Render a formatted citation:
get_item_citation(item_key="ABCD1234", style="mla")
Example prompts for AI clients
- “List my saved searches as JSON.”
- “Show the latest 10 journal articles tagged
ai.” - “Export item
ABCD1234as BibTeX.” - “Get the note content for Zotero item
NOTE1234.” - “List attachments for item
ABCD1234.”
Tool reference
Common pagination and output parameters
Most list tools support:
| Parameter | Type | Default | Description |
|---|---|---|---|
start |
int | 0 |
Pagination offset |
limit |
int | 25 or 100 |
Items per page (max 100) |
output_format |
str | text |
text or json |
list_items
| Parameter | Type | Default | Description |
|---|---|---|---|
item_type |
str | — | Filter by Zotero item type |
tag |
str | — | Filter by tag name |
sort |
str | dateModified |
dateModified, title, creator, date |
direction |
str | desc |
asc or desc |
list_collection_items / list_saved_search_items
| Parameter | Type | Default | Description |
|---|---|---|---|
collection_key / search_key |
str | — | Target Zotero key |
sort |
str | dateModified |
dateModified, title, creator, date |
direction |
str | desc |
asc or desc |
get_item
| Parameter | Type | Default | Description |
|---|---|---|---|
item_key |
str | — | Zotero item key |
expanded |
bool | false |
Include abstract text |
get_item_children
| Parameter | Type | Default | Description |
|---|---|---|---|
item_key |
str | — | Parent Zotero item key |
item_type |
str | — | Optional attachment or note filter |
search_items
| Parameter | Type | Default | Description |
|---|---|---|---|
query |
str | — | Search terms |
qmode |
str | everything |
everything or titleCreatorYear |
tag |
str | — | Optional tag filter |
item_type |
str | — | Optional item type filter |
get_item_citation
| Parameter | Type | Default | Description |
|---|---|---|---|
item_key |
str | — | Zotero item key |
style |
str | apa |
Citation style |
locale |
str | — | Optional locale such as en-US |
linkwrap |
bool | false |
Request wrapped links when supported |
export_item
| Parameter | Type | Default | Description |
|---|---|---|---|
item_key |
str | — | Zotero item key |
export_format |
str | bibtex |
bibtex, biblatex, ris, mods, refer, csljson |
Known limitations
- Read-only: creating, editing, or deleting items is not supported.
- Attachment binaries: attachment file content is not downloaded.
- Saved searches: the server exposes saved searches as special collections and uses their keys for item listing.
- Single library scope: one configured user or group library per server process.
Development
Install dev dependencies
With uv:
uv sync --extra dev
With pip:
python -m pip install -e ".[dev]"
Run tests
python -m pytest tests/ -v
Build the package
python -m build
Project layout
zotero-mcp/
├── main.py # Compatibility entry point
├── server.json # MCP Registry metadata
├── zotero_mcp/
│ ├── __main__.py # Packaged entry point
│ ├── client.py # Zotero Web API v3 client
│ ├── config.py # Constants and version metadata
│ ├── formatters.py # Text + structured output normalization
│ └── tools.py # MCP tool implementations
└── tests/
├── test_client.py
├── test_formatters.py
├── test_main.py
├── test_server.py
└── test_tools.py
Changelog
0.2.0
- Added collection-scoped listing and saved-search discovery tools
- Added dedicated note, attachment, citation, and export tools
- Added structured JSON output across the tool surface
- Added stricter validation, shared HTTP client reuse, and retry/backoff logging
- Expanded automated coverage and CI expectations
0.1.0
- Initial Zotero MCP server implementation
- Six read-only tools for browsing items, collections, tags, and children
- Automatic retry on rate-limit (HTTP 429) and transient network errors
MCP Registry publishing
This repository includes a server.json file for MCP Registry publication under:
name:io.github.nadavWeisler/zotero-mcpregistryType:pypiidentifier:nadavweisler-zotero-mcp
To publish a new release:
- Publish version
0.2.0(or newer) ofnadavweisler-zotero-mcpto PyPI. - Install
mcp-publisher. - Run:
mcp-publisher login githubmcp-publisher publish
v2 roadmap ideas
- Optional write operations behind explicit opt-in safeguards
- Multi-library support
- More advanced search composition for large libraries
- Client-selectable output modes tuned for specific MCP consumers
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。