@xbghc/zotero-mcp
Manages Zotero library: query, create, update, delete items, manage tags, groups, attachments, and export citations in multiple formats.
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., "@@xbghc/zotero-mcp find all items tagged 'machine learning'"
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.
@xbghc/zotero-mcp
Zotero MCP Server - 通过 MCP 协议管理 Zotero 文献库。
功能
查询文献: 搜索、获取详情、获取全文、按分组/标签过滤
创建文献: 手动创建或通过 DOI/ISBN/PMID 自动获取元数据
管理文献: 更新、删除、添加标签、添加到分组、下载附件
导出引用: 支持 BibTeX、RIS、CSL JSON 等格式
Related MCP server: zotero-mcp
快速开始
1. 获取 Zotero API Key
登录 zotero.org
进入 Settings → Security
记下你的 User ID
点击 "Create new private key" 生成 API Key
2. 配置 Claude Code
在 ~/.claude/settings.json 中添加:
{
"mcpServers": {
"zotero": {
"command": "npx",
"args": ["@xbghc/zotero-mcp"],
"env": {
"ZOTERO_API_KEY": "your-api-key",
"ZOTERO_USER_ID": "your-user-id"
}
}
}
}配置完成后重启 Claude Code 即可使用。
可选配置
Translation Server(DOI 自动获取)
create_item_by_identifier 工具需要 Translation Server 支持。
git clone --recurse-submodules https://github.com/zotero/translation-server.git
cd translation-server
npm install
npm start服务运行在 http://localhost:1969,然后在 env 中添加:
"TRANSLATION_SERVER_URL": "http://localhost:1969"环境变量
变量 | 必需 | 说明 |
| 是 | Zotero API 密钥 |
| 是 | 用户 ID |
| 否 | 群组 ID(访问群组库时使用) |
| 否 | Translation Server 地址 |
| 否 | 附件缓存目录 |
开发
npm install
npm run build
npm testLicense
MIT
Available Tools
22 toolsadd_item_to_collectionAdd Item to CollectionA
Add an item to a collection (folder). An item can belong to multiple collections. Use list_collections to get available collection keys.
Inputs: itemKey (required), collectionKey (required).
add_tags_to_itemAdd Tags to ItemA
Add one or more tags to an existing item. Tags are useful for organizing and filtering items. Duplicate tags are automatically ignored.
Inputs: tags (required), itemKey (required).
clear_attachment_cacheClear Attachment CacheA
Clear cached attachment files to free disk space.
Provide itemKey to clear cache for a specific attachment
Omit itemKey to clear all cached attachments
Inputs: itemKey.
create_collectionCreate CollectionA
Create a new collection (folder) in the Zotero library. Collections help organize items into hierarchical folders. Use parentCollection to create a sub-collection.
Inputs: name (required), parentCollection.
create_itemCreate ItemA
Create a new item in the Zotero library with manual metadata entry. Common item types: journalArticle, book, bookSection, conferencePaper, webpage, thesis. For journal articles, use create_item_by_identifier with DOI instead - it's faster and more accurate.
Inputs: title (required), itemType (required), DOI, url, +9 more.
create_item_by_identifierCreate Item by IdentifierA
Create a new item by looking up metadata from DOI, ISBN, PMID, or arXiv ID. This is the preferred way to add published papers - metadata is fetched automatically. Requires Translation Server to be running (see README for setup). Examples: "10.1038/nature12373" (DOI), "978-0-13-468599-1" (ISBN), "PMID:12345678", "arXiv:2301.00001"
Inputs: identifier (required), tags, collections.
delete_collectionDelete CollectionA
Delete a collection from the library. Items in the collection are NOT deleted - they remain in the library. Sub-collections are also deleted.
Inputs: collectionKey (required).
delete_itemDelete ItemA
Move an item to trash (does not permanently delete). The item can be restored from trash in the Zotero client. To permanently delete, user must empty trash in Zotero.
Inputs: itemKey (required).
download_attachmentDownload AttachmentA
Download an attachment file (PDF, etc.) to local cache.
Only works for stored attachments (imported_file, imported_url)
Files are cached locally - subsequent calls return cached version
Use force=true to re-download and update cache
Returns the local file path for further processing
Inputs: itemKey (required), force.
export_bibliographyExport BibliographyA
Export items as formatted bibliography or citation data.
Selection methods (use ONE):
itemKeys: Export specific items by their keys
collectionKey: Export all items in a collection
tag: Export all items with a specific tag
query: Export items matching a search query
exportAll: Export entire library (use with caution for large libraries)
Formats:
bibtex: BibTeX format for LaTeX
ris: RIS format for reference managers
csljson: CSL JSON for citation processors
bibliography: Formatted citation text (use 'style' parameter)
Common styles for bibliography: apa, chicago-author-date, ieee, vancouver, harvard
Output: Content is always saved to a file (to avoid flooding the conversation with large exports). Returns file path and summary.
Inputs: format (required), tag, limit, query, +5 more.
get_collection_itemsGet Collection ItemsA
Get all items in a specific collection. Returns items directly in the collection (not in sub-collections).
Inputs: collectionKey (required), limit.
get_itemGet Item DetailsA
Get complete metadata of a single item by its key. Returns all fields: title, creators, abstract, DOI, URL, tags, collections, etc. Use this after search_items to get full details of a specific item.
Inputs: itemKey (required).
get_item_childrenGet Item ChildrenA
Get child items (attachments, notes) of a parent item.
Attachments include: PDF files, snapshots, linked files
Notes include: user-created notes attached to the item Use the returned attachment key with download_attachment to get the file.
Inputs: itemKey (required).
get_item_fulltextGet Item FulltextA
Get the full-text content of an item (usually a PDF attachment).
Supports pagination for large documents using offset and limit
Use 'hasMore' and 'nextOffset' in response to fetch remaining content
Returns indexed text extracted from PDF, not the original PDF file
If you need the actual PDF file, use download_attachment instead
Inputs: itemKey (required), limit, offset.
get_recent_itemsGet Recent ItemsA
Get the most recently added items in the Zotero library. Useful for checking what was recently imported or created. Returns items sorted by dateAdded in descending order.
Inputs: limit.
get_saved_searchesGet Saved SearchesA
Get saved searches (smart collections) defined in the Zotero library. Returns search names and their filter conditions.
Inputs: no named parameters.
get_trash_itemsGet Trash ItemsA
Get items that have been moved to trash. Items in trash can be restored or permanently deleted from Zotero client.
Inputs: limit.
list_collectionsList CollectionsA
List all collections (folders) in the Zotero library. Collections help organize items into hierarchical folders. Use parentKey to list sub-collections of a specific collection.
Inputs: parentKey.
list_tagsList TagsA
List all tags used in the Zotero library. Tags can be used with search_items to filter items. Type 0 = user-created tags, Type 1 = automatic tags.
Inputs: limit.
search_itemsSearch ItemsA
Search items in the Zotero library.
Use 'query' for keyword search
Use 'qmode=everything' to search within notes and full-text content (PDF text)
Use 'itemType=note' with 'includeChildren=true' to find only notes
Use 'includeTrashed=true' to include items in trash
Returns: list of items with key, title, itemType, creators, date
Inputs: tag, limit, qmode, query, +5 more.
update_collectionUpdate CollectionA
Update a collection's name or parent. Set parentCollection to false to move to top level.
Inputs: collectionKey (required), name, parentCollection.
update_itemUpdate ItemA
Update metadata fields of an existing item. Only provide fields you want to change - other fields remain unchanged. Common fields: title, date, DOI, url, abstractNote, publicationTitle, volume, issue, pages, extra.
Inputs: itemKey (required), DOI, url, date, +7 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 22 tools
Most tools target distinct resources and actions (e.g., get_item vs. get_item_fulltext vs. download_attachment). A few overlapping retrieval paths exist (search_items with includeTrashed vs. get_trash_items) but descriptions clarify their purposes.
All tool names use snake_case, but the verb pattern is inconsistent: 'get_' is used for both single items and lists (get_trash_items, get_recent_items) while 'list_' is reserved for collections/tags. This mix of get/list for list-style operations makes naming less predictable.
At 22 tools, the count is in the 'heavy' range (16-25) and feels borderline. Each tool has a distinct purpose, but the breadth may overwhelm agents; some operations could be consolidated (e.g., tag and collection membership updates).
Core CRUD for items and collections is covered, and there are useful extras like full-text search and bibliography export. However, notable gaps remain: no tool to remove tags from an item, remove an item from a collection, or restore items from trash. These missing operations could cause agent failures in common workflows.
Maintenance
Related MCP Connectors
Remote MCP server for full read/write access to a Zotero library
Zotero MCP server for Claude and ChatGPT: search, citations, safe writes, PDF passages and pages.
Notes, files, GitHub, and Drive through one MCP connection.
Notes, files, GitHub, and Drive through one MCP connection.
Related MCP Servers
- AlicenseNot gradedqualityNot gradedmaintenanceEnables LLM clients to browse and query your Zotero library through tool calls. Provides access to Zotero-specific functions like listing open tabs, searching items, and browsing collections via a local MCP server running inside Zotero.1-
- 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 gradedqualityCmaintenanceEnables interaction with a locally running Zotero Desktop library via MCP, including search, collections, tags, BibTeX export, citations, attachment full-text lookup, and explicitly confirmed write operations.MIT
- AlicenseNot gradedqualityBmaintenanceEnables searching, reading, annotating, and managing a Zotero library from any MCP client.AGPL 3.0