Zotero MCP
This server provides MCP tools to search, read, and manage a Zotero library, with read-only local access and optional write operations via the Zotero Web API, featuring safety mechanisms like confirmation and preflight checks.
Library Search & Lookup
zotero_ping— Test connectivity to the local Zotero APIzotero_search— Search items by title, author, DOI, or keyword, with local PDF path resolutionzotero_match— Find the best matching item by exact or near-exact title/DOI with configurable similarity thresholdzotero_item— Retrieve a single item as readable markdown, raw JSON, or BibTeX export (includes local PDF paths)zotero_children— List child attachments and notes for a parent itemzotero_get_citation_key— Resolve the Better BibTeX citation key for a given item
Collection Management (Read)
zotero_collections— List all collections with full nested paths, keys, and item/subcollection countszotero_resolve_collection— Resolve a collection by key, unique name, or full path (fails closed on ambiguity)zotero_item_collections— Show every collection that contains a given itemzotero_collection_items— List items in a collection, with optional recursive subcollection traversal
Web API & Write Operations
zotero_web_api_status— Check Zotero Web API credentials and permissions (read-only, no writes)zotero_plan_paper_import— Read-only preflight for importing up to 50 papers; reports create/update/duplicate/ambiguous actions without making any changeszotero_apply_paper_import— Execute a preflighted paper import batch via the Zotero Web API (requiresconfirm=true); adds collection memberships without modifying existing metadata or PDFs
Safety Features
All write operations require explicit confirmation (
confirm=true)Plan tools are read-only and provide a preflight summary
Web API writes are preceded by cloud rescan and followed by verification
Most tools are read-only, idempotent, and non-destructive
Provides tools for searching, reading, and matching Zotero items, managing collections, reading annotations, notes, PDF full text, and citation keys, and optionally importing papers and modifying collections via plan/apply workflow.
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 papers on climate change"
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
面向 Windows 与 WSL 的本地 Zotero MCP。读取走 Zotero Local API;需要修改 Zotero 时,先生成计划,再通过 Zotero Web API 执行并回读核验。
交给 Codex 配置
clone 仓库后,在仓库目录对 Codex 发送:
读取 AGENTS.md,按首次配置流程检查我的 Codex 与 Zotero 分别运行在 Windows 还是 WSL。账号注册、浏览器设置和密钥输入由我完成;你负责其余检测、配置与验证。
Codex 会先做只读检查。缺少 Zotero Web API、MinerU 或 SciVerse 账号时,会给出官方入口并暂停;不会索要或显示密钥。完整配置还会检查可选的 paper-lookup skill,并在安装前等待批准。
Related MCP server: zotero-mcp
安装
需要 Python 3.11 或更新版本。
git clone <repository-url> zotero-mcp
cd zotero-mcp
python -m venv .venvWindows PowerShell 安装:
.\.venv\Scripts\Activate.ps1
python -m pip install .WSL/Linux 安装:
source .venv/bin/activate
python -m pip install .运行首次检查:
zotero-mcp setup plan --profile corecore 只要求 Zotero 读取链路。需要 Web API 写入、MinerU、QMD 与 SciVerse 时使用:
zotero-mcp setup plan --profile full完整步骤见 docs/SETUP.md,账号边界见 docs/ACCOUNTS.md。
功能
检索、读取、匹配 Zotero 条目
按 key、唯一名称或完整路径解析 collection
读取批注、笔记、PDF 全文、页面与 Better BibTeX citation key
通过 plan/apply 两阶段工具导入论文、调整 collection、删除 PDF 附件
为缺少英文正文的条目发现并受控导入公开正式出版版 PDF;拒绝作者手稿、接受稿和预校样
可选使用 MinerU 批量解析 PDF,并用 QMD 建立全文检索
用本地 SQLite 记录重点 collection 的翻译、MinerU、QMD 和运行健康状态,供不同对话共享
在用户现有 collection 标准下,用 QMD 全文证据协同规划和执行文献整理
调用官方 PDF2zh Server 批量翻译全文,按用户配置自动命名、下载并导入译文附件;默认标题为
CN,文件名为“英文原文件名的全文翻译.pdf”按 toolset 控制暴露给 Agent 的工具
所有 apply 工具要求精确 key 和明确的 confirm=true。Web API 写入前会重新读取云端状态,写后回读核验。
Toolsets
literature:检索、条目读取、collection 与论文导入review:批注、笔记、全文、MinerU 与页面工具maintenance:collection 调整与 PDF 附件删除all:全部公共工具
默认只启用 literature。生成 Codex 配置:
zotero-mcp setup print-codex-config --toolsets literature,review,maintenance命令只输出配置块,不修改 Codex 配置文件,不包含密钥。
可用 MCP 工具:
zotero_pingzotero_searchzotero_matchzotero_itemzotero_childrenzotero_get_annotationszotero_get_noteszotero_get_citation_keyzotero_collectionszotero_resolve_collectionzotero_item_collectionszotero_collection_itemszotero_web_api_statuszotero_plan_paper_importzotero_apply_paper_importzotero_plan_pdf_acquisitionzotero_apply_pdf_acquisitionzotero_plan_collection_reconcilezotero_apply_collection_reconcilezotero_plan_pdf_attachment_deletezotero_apply_pdf_attachment_deletezotero_plan_manual_translation_renamezotero_apply_manual_translation_renamezotero_extract_textzotero_mineru_submitzotero_mineru_resultzotero_render_pageszotero_find_figure_pages
可选集成
Zotero Web API:只在写入时需要。
MinerU:外部 PDF 解析服务,需要账号与 Token,存在调用额度限制。
QMD:本地检索工具,无账号要求。
SciVerse:外部文献检索服务和独立 MCP,需要账号与 Token,存在调用额度限制。
paper-lookup:可选 Codex skill,使用多种开放学术 API;推荐与 SciVerse 互补使用。WebDAV:仅用于 Zotero 附件同步,不是 MCP 依赖。
PDF2zh:独立第三方全文翻译工具;本项目提供无人值守队列和 Zotero 回写。
完整文献工作流保持四段独立边界:SciVerse 与 paper-lookup 互补检索候选,Zotero 查重并经 plan/apply 导入,MinerU 解析已确认的 PDF,QMD 更新索引并回读核验。任何外部上传或 Zotero 写入都需要单独批准。
Zotero 工作流状态库
SQLite 是跨对话共享的工作流状态库,不是 Zotero 数据库,也不替代翻译队列或 QMD。它同时保存当前状态快照、MinerU 解析来源和可恢复批次回执。跟踪范围由用户初始化时指定,可同时跟踪多个递归 collection;每次 next-batch 或实际处理仍只针对一个明确 collection。
唯一运行状态文件:~/.local/state/zotero-mcp/zotero_workflow.sqlite3。CSV 不是运行状态;只有显式执行 export-csv 时才生成平面视图。
首次初始化时显式指定全部需要跟踪的 collection:
python -m zotero_mcp.zotero_workflow sync \
--collection Senescence \
--collection "Journal Club" \
--collection Glioma之后状态变化后可无参数复用已保存的跟踪范围:
python -m zotero_mcp.zotero_workflow sync只处理一个 collection:
python -m zotero_mcp.zotero_workflow next-batch --collection Senescence --limit 5查询汇总或单条论文:
python -m zotero_mcp.zotero_workflow status
python -m zotero_mcp.zotero_workflow status --item ITEMKEY
python -m zotero_mcp.zotero_workflow export-csv同步只写入上述本地 SQLite,不修改 Zotero、PDF、MinerU、QMD 或 PDF2zh,不提交翻译任务。export-csv 是显式的只读导出,不参与状态恢复。role=source_pdf、translated_pdf、supplementary_pdf 是工作流判断;is_primary 只表示 Zotero 的主附件提示,不能单独用来判断英文正文。
正式出版版 PDF 获取
先同步统一状态库,再只读扫描缺少英文正文的条目:
zotero-workflow sync
zotero-pdf scan --collection Senescence --recursive --missing-only
zotero-pdf status --item ITEMKEY扫描会查询 Crossref、OpenAlex、PMC、可选 Unpaywall 和出版社文章页,将候选及拒绝原因写入统一 SQLite;不会下载 PDF 或修改 Zotero。只自动接受能够证明为公开 Version of Record 的期刊 PDF,正式期刊条目的作者手稿、接受稿、投稿稿、预校样和旧预印本全部失败关闭。
Unpaywall 需要联系邮箱时,在用户配置中设置:
[pdf_acquisition]
unpaywall_email = "name@example.org"实际下载和附件导入要求精确条目 key 和明确确认。先预演:
zotero-pdf apply --item ITEMKEY --dry-run确认后执行:
zotero-pdf apply --item ITEMKEY --confirmMCP 对应入口是 zotero_apply_pdf_acquisition,同样要求精确 key 和 confirm=true。执行时重新核验来源,读取一次 Zotero 当前 attachmentRenameTemplate,附件标题固定为 PDF,文件名按模板生成。不会覆盖已有英文 PDF,也不会自动触发 MinerU、QMD 或 PDF2zh。
协同整理 collection
QMD 建立全文索引后,Codex 可以读取用户现有分类规则,逐篇回读全文,生成 collection 调整计划。用户审阅后,工具再通过 plan/apply 两阶段执行并回读。
同一连续审核对话内,已完成且仍有效的父条目、英文 PDF、MinerU 和 QMD 预检可以复用;不因用户批准或批次衔接再次逐篇实时复核。只有发现外部状态变化、附件更换、预检失效、计划与当前状态不一致或用户明确要求时,才重新扫描。plan/apply 自身的云端冲突检查和写后回读仍必须执行。
通用流程见 docs/COLLECTION_REVIEW.md,基础记录模板见 templates/collection_review.md。
PDF 全文翻译
用户先从官方项目安装并在 Zotero 图形界面配置 Zotero PDF2zh。本项目直接读取该图形界面保存的激活服务、模型和 Server 地址;API key 不进入命令行、队列、日志或仓库。
提交或检查翻译前先刷新状态库,确认目标条目没有活动任务或已有译文:
python -m zotero_mcp.zotero_workflow sync
python -m zotero_mcp.zotero_workflow status --item ITEMKEYzotero-mcp setup save-secret webdav
zotero-translate doctor
zotero-translate enqueue --collection "Collection > Path" --recursive
zotero-translate run --qps 10 --pool-size 20 --max-items 3 --dry-run
zotero-translate schedule --at "2026-08-15 22:00" --qps 10 --pool-size 20 --max-items 3QPS、poolSize、最多处理篇数和运行时间每批显式提供。正式运行去掉 --dry-run。完整配置、队列和失败恢复见 docs/TRANSLATION.md。
译文命名在用户配置中统一设置;未配置时保持当前默认行为:
[translation]
attachment_title = "CN"
filename_template = "{source_stem}的全文翻译.pdf"filename_template 必须包含且只支持 {source_stem} 变量,并渲染为单个 .pdf 文件名。用户仍可在 Zotero 中手动提交单篇翻译。默认可通过 maintenance toolset 的 plan/apply 工具事后重命名;也可显式开启 translation.auto_rename_manual,由后台监视器按上述配置自动重命名新译文。首次启动只记录历史基线,不批量修改旧译文。旧标题 CN 继续被识别,避免改配置后重复导入。两种模式都不修改 PDF2zh 插件源码或 PDF 内容。
远程 WebDAV 和 PDF2zh Server 默认必须使用 HTTPS;同机 PDF2zh Server 仍可使用 localhost HTTP。doctor 只做无写入检查,正式批处理会先创建并删除一个临时 WebDAV 探针。
配置位置
Windows:
%APPDATA%\zotero-mcp\config.tomlWSL/Linux:
~/.config/zotero-mcp/config.toml
可用 ZOTERO_MCP_CONFIG 指定配置文件,或用 ZOTERO_MCP_CONFIG_DIR 指定配置目录。环境变量与完整配置项见 docs/SETUP.md。
Zotero Web API key 默认保存在 Zotero MCP 配置目录下的 zotero_web_api_key.secret;MinerU Token 独立保存在 ~/.config/mineru/mineru_api_token.secret。它们是仅含单行密钥的 UTF-8 纯文本文件,不是加密格式;WSL/Linux 下默认权限为 0600。使用 zotero-mcp setup save-secret zotero 或 zotero-mcp setup save-secret mineru 通过隐藏输入保存,不要把密钥写入仓库或提交到 Git。
MinerU 批处理
Zotero 批处理沿用官方 mineru-open-sdk 的 API 契约和错误映射,并通过统一的 NORMAL HTTP 路由访问 MinerU,同时保留可恢复上传、Zotero item-key 目录、产物验证和 QMD 流水线。通用文件解析应另行安装官方 mineru-open-mcp,作为独立 MCP 使用;它与下列 Zotero 专用命令互不替代。若不希望 MCP 启动时创建空的默认输出目录,可用 scripts/run_mineru_open_mcp_lazy.py 启动官方 MCP;它不修改官方安装包,显式传入 output_dir 的行为保持不变。
单批预检与提交:
zotero-mineru plan <collection-key> --recursive
zotero-mineru submit-batch <collection-key> --recursive --max-pages 1000 --max-files 20
zotero-mineru collect <batch-id>
zotero-mineru verify <batch-id>MinerU 与 QMD 的有界流水线:
zotero-mineru-qmd <collection-key> --recursive --page-budget 1000 --max-files 20MinerU 论文状态和批次回执保存在 ~/.local/state/zotero-mcp/zotero_workflow.sqlite3。不使用或生成 mineru_todo.csv、.jobs 或其他批次状态文件。替换旧解析结果时,下载内容临时放在 MinerU 输出目录的 .staging 中。
如果发现已有完整解析目录但 SQLite 没有记录,预检会将其标为 untracked_existing 并阻止重新上传。先核对当前英文附件,再显式认领:
zotero-mineru adopt-existing ITEMKEY --attachment-key ATTACHMENTKEY
zotero-mineru adopt-existing ITEMKEY --attachment-key ATTACHMENTKEY --confirm认领只写入 SQLite,随后仍需正常 QMD 更新、嵌入和核验。
测试
python -m unittest discover -s tests -v公开 Python 包位于 src/zotero_mcp,测试位于 tests;仓库根目录只保留项目元数据、文档和一级目录。
常见故障见 docs/TROUBLESHOOTING.md。
Available Tools
13 toolszotero_apply_paper_importAIdempotent
Apply a preflighted batch of up to 50 papers through the official Zotero Web API. Rescans the local library, performs fail-closed cloud exact-ID checks before creation, resolves DOI/PMID/arXiv metadata, and versions collection unions for existing items. Never removes memberships, merges items, edits existing metadata, or creates/downloads/uploads PDF attachments. Zotero desktop sync makes cloud writes visible locally. Requires confirm=true.
Inputs: items (required), confirm (required). Returns: ok, data, text, error
zotero_childrenARead-onlyIdempotent
List child attachments/notes for one Zotero parent item key.
Inputs: key (required). Returns: ok, data, text, error
zotero_collection_itemsARead-onlyIdempotent
List items assigned to an exact Zotero collection key or collection reference, optionally including nested subcollections with duplicate items removed.
Inputs: key, limit, recursive, collection. Returns: ok, data, text, error
zotero_collectionsARead-onlyIdempotent
List Zotero collections with full nested paths, keys, and direct item/subcollection counts.
Inputs: no named parameters. Returns: ok, data, text, error
zotero_get_citation_keyARead-onlyIdempotent
Resolve the Better BibTeX citation key for one exact Zotero item key. Uses the running Better BibTeX plugin first, then its stored Zotero citationKey/Extra field when available.
Inputs: key (required). Returns: ok, data, text, error
zotero_itemARead-onlyIdempotent
Show one Zotero item as readable metadata, complete JSON, or a Better BibTeX export. Markdown remains the default and includes local PDF paths.
Inputs: key (required), format. Returns: ok, data, text, error
zotero_item_collectionsARead-onlyIdempotent
Show every Zotero collection containing an item. Child attachment/note keys are resolved to their top-level parent item.
Inputs: key (required). Returns: ok, data, text, error
zotero_matchARead-onlyIdempotent
Find the best Zotero item by exact or near-exact title/DOI.
Inputs: query (required), best, field, limit, +2 more. Returns: ok, data, text, error
zotero_pingARead-onlyIdempotent
Test access to the configured Zotero Local API from the current environment.
Inputs: no named parameters. Returns: ok, data, text, error
zotero_plan_paper_importARead-onlyIdempotent
Read-only preflight for up to 50 papers. Exact DOI, PMID, PMCID, and arXiv IDs may match existing items. A title-only match is always ambiguous. Reports create, collection-union, unchanged, manual, invalid, or ambiguous actions. Never touches PDFs.
Inputs: items (required). Returns: ok, data, text, error
zotero_resolve_collectionARead-onlyIdempotent
Resolve one exact Zotero collection key, globally unique name, or full path. Fails closed on missing, duplicate, deleted, or malformed collections. Similar candidates are suggestions only and are never selected automatically.
Inputs: key, name, path. Returns: ok, data, text, error
zotero_searchARead-onlyIdempotent
Search Zotero items and resolve local PDF attachment paths.
Inputs: query (required), limit, item_type. Returns: ok, data, text, error
zotero_web_api_statusARead-onlyIdempotent
Read-only check for official Zotero Web API credentials, expected user ID, personal-library write permission, and file-write permission. Performs no write.
Inputs: no named parameters. Returns: ok, data, text, error
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 13 tools
Each tool targets a distinct resource and action: search, match, item detail, children, citation keys, collections (list/resolve), item-collection relationships, web API status, and import plan/apply. Even related tools like plan and apply are clearly separated by preflight vs. execution.
All tools share a consistent 'zotero_' prefix, but the naming convention mixes verbs (ping, search, match, get_citation_key, resolve_collection, plan/apply_paper_import) and nouns (item, children, collections, item_collections, collection_items, web_api_status). This is readable but not a uniform verb_noun pattern.
13 tools is well within the ideal 3-15 range for a purpose-specific server. Each tool contributes meaningfully to the Zotero workflow without redundancy or bloat.
The tool set covers search, retrieval, collection management, item relationships, citation keys, and a robust import workflow (plan + apply). It avoids direct item create/update/delete and attachment upload, which are meaningful gaps if full Zotero management were expected, but the scope appears intentionally read-and-import oriented.
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
Read-only MCP server exposing a user ORANO library to their own AI agent.
An MCP server that provides read access to your cloud storage providers, bank accounts and more.
Related MCP Servers
- AlicenseAqualityAmaintenanceAn MCP server that gives AI assistants complete, safe access to your Zotero library for searching, citing, adding papers, and formatting bibliographies, with local-first privacy.47723 npm65MIT
- FlicenseNot gradedqualityCmaintenanceMCP server for interacting with a Zotero library via the local API. Enables searching, retrieving, creating, updating, and deleting Zotero items, managing collections and tags, and generating citations.-
- AlicenseNot gradedqualityBmaintenanceMCP server that connects to a local Zotero library, enabling search, citation generation with CSL styles, and automatic bibliography updates in Markdown documents.167 npm1MIT
- AlicenseNot gradedqualityBmaintenanceLocal read-only MCP server for Zotero libraries, enabling search, retrieval, and full-text access via the Zotero Web API.MIT