Zotero MCP Server
Provides programmatic access to Zotero reference libraries, enabling search, citation generation, PDF text extraction, item and collection management, and tag management.
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 Server search my Zotero library for publications on machine learning from 2023"
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 Server
A Model Context Protocol server that provides programmatic access to Zotero reference libraries. This server enables AI assistants to search, cite, and manage research references directly from your Zotero library.
Features
Tools
search_items - Search and filter items in your library
get_item - Retrieve a single item by key or DOI
generate_citation - Generate formatted citations in multiple styles
extract_pdf_text - Extract full-text content from PDF attachments
create_item - Add new items to your library
update_item - Modify existing item metadata
delete_items - Remove items from your library
manage_collections - Create and organize collections
manage_tags - Add and remove tags from items
Resources
zotero://collections - Access collection hierarchy and metadata
zotero://tags - Browse all tags in your library
zotero://citation-styles - List available citation styles
Related MCP server: zotero-mcp
Prerequisites
Node.js 20.16.0 or higher
A Zotero account with API access
Zotero API key from https://www.zotero.org/settings/keys
Installation
Option 1: NPM (Coming Soon)
npm install -g zotero-mcp-serverOption 2: From Source
git clone <repository-url>
cd zotero-mcp-server
npm install
npm run buildConfiguration
Getting Your Credentials
Create a new API key with appropriate permissions
Note your User ID (displayed at the top of the page)
Copy the generated API key
Environment Variables
Create a .env file in the project root:
ZOTERO_API_KEY=your_api_key_here
ZOTERO_USER_ID=your_user_id_hereFor group libraries, use ZOTERO_GROUP_ID instead of ZOTERO_USER_ID.
Optional Configuration
ZOTERO_BASE_URL=https://api.zotero.org
ZOTERO_TIMEOUT=30000
ZOTERO_MAX_RETRIES=3
CACHE_ENABLED=true
CACHE_TTL_SECONDS=300Usage with Claude Desktop
Add this configuration to your Claude Desktop config file:
MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"zotero": {
"command": "node",
"args": ["/absolute/path/to/ZoteroMCP/dist/index.js"],
"env": {
"ZOTERO_API_KEY": "your_api_key_here",
"ZOTERO_USER_ID": "your_user_id_here"
}
}
}
}Restart Claude Desktop after making this change.
Tool Usage Examples
Searching Items
Search your library with various filters:
// Search by text query
{
"query": "machine learning",
"limit": 10
}
// Filter by item type and tags
{
"itemType": "journalArticle",
"tag": ["ai", "research"],
"sort": "dateAdded",
"direction": "desc"
}
// Search within a collection
{
"collection": "COLLECTION_KEY",
"limit": 25
}Generating Citations
Create formatted citations in various styles:
{
"itemKeys": ["ITEM_KEY_1", "ITEM_KEY_2"],
"style": "apa"
}
// Supported styles include:
// apa, chicago-note-bibliography, mla, ieee, nature,
// science, harvard-cite-them-right, vancouver, and 10,000+ moreExtracting PDF Text
Extract text content from PDF attachments:
{
"itemKey": "PDF_ATTACHMENT_KEY",
"pages": {
"start": 1,
"end": 5
}
}Note: PDFs must be indexed by Zotero Desktop for full-text extraction to work.
Creating Items
Add new items to your library:
{
"itemType": "journalArticle",
"title": "Understanding Neural Networks",
"creators": [
{
"creatorType": "author",
"firstName": "Jane",
"lastName": "Smith"
}
],
"date": "2024",
"DOI": "10.1234/example",
"tags": ["neural-networks", "deep-learning"],
"collections": ["COLLECTION_KEY"]
}Managing Collections
Create and organize collections:
// List all collections
{
"action": "list"
}
// Create a new collection
{
"action": "create",
"name": "Machine Learning Papers"
}
// Create a nested collection
{
"action": "create",
"name": "Deep Learning",
"parentCollection": "PARENT_COLLECTION_KEY"
}Managing Tags
Add or remove tags from items:
// Add tags to an item
{
"action": "add_to_item",
"itemKey": "ITEM_KEY",
"tags": ["ai", "research"]
}
// Remove tags from an item
{
"action": "remove_from_item",
"itemKey": "ITEM_KEY",
"tag": "outdated"
}
// List all tags
{
"action": "list"
}Resource Usage Examples
Collections Resource
zotero://collectionsReturns all collections with hierarchy information, item counts, and metadata.
zotero://collections/COLLECTION_KEYReturns details for a specific collection.
Tags Resource
zotero://tagsReturns all tags in your library with usage counts.
Citation Styles Resource
zotero://citation-stylesReturns a list of commonly used citation styles with their identifiers.
API Details
Rate Limiting
The server implements automatic rate limiting with exponential backoff:
Initial retry delay: 5 seconds
Maximum retries: 3 (configurable)
Respects Zotero API
BackoffandRetry-AfterheadersRequests are queued during rate limit periods
Caching
Intelligent caching reduces API calls and improves performance:
Item templates: 1 hour
Collections and tags: 15 minutes
Search results: 5 minutes
PDF full-text: 30 days
Citations: 1 hour
Error Handling
All errors are transformed into descriptive messages:
400 - Invalid request parameters
401/403 - Authentication failure (check API key)
404 - Item or resource not found
409 - Version conflict (item modified elsewhere)
412 - Precondition failed (library version changed)
429 - Rate limited (automatic retry)
5xx - Server error (automatic retry)
Development
Building from Source
npm install
npm run buildRunning in Development Mode
npm run devProject Structure
src/
├── index.ts # Server entry point
├── config/
│ └── default.ts # Configuration management
├── services/
│ ├── zotero-client.ts # Zotero API client
│ ├── cache-manager.ts # Caching layer
│ └── pdf-extractor.ts # PDF text extraction
├── tools/
│ └── index.ts # MCP tool implementations
├── resources/
│ └── index.ts # MCP resource implementations
├── utils/
│ ├── validators.ts # Input validation
│ └── error-handler.ts # Error transformation
└── types/
└── zotero.ts # Type definitionsTroubleshooting
Server won't start
Ensure you have created a .env file with valid credentials:
cp .env.example .env
# Edit .env and add your ZOTERO_API_KEY and ZOTERO_USER_IDAuthentication errors
Verify your API key at https://www.zotero.org/settings/keys
Ensure the API key has appropriate read/write permissions
Check that ZOTERO_USER_ID matches the ID shown on the API keys page
PDF extraction fails
PDFs must be indexed by Zotero Desktop application
Open Zotero Desktop and allow it to index PDF attachments
Verify the item has an actual PDF attachment (not just a link)
Claude Desktop doesn't show Zotero tools
Verify the absolute path in
claude_desktop_config.jsonis correctCheck that environment variables in the config are set
Restart Claude Desktop completely (quit and reopen)
Check Claude Desktop logs: Help → View Logs
License
MIT
Contributing
Contributions are welcome. Please open an issue or submit a pull request.
Attribution
This MCP server uses the Zotero Web API to provide programmatic access to Zotero libraries. Zotero is a free, open-source reference management software developed by the Corporation for Digital Scholarship.
This project is not affiliated with, endorsed by, or sponsored by Zotero or the Corporation for Digital Scholarship.
Links
Available Tools
9 toolscreate_itemC
Create a new item in your Zotero library
Inputs: itemType (required), title (required), creators, date, +4 more.
delete_itemsA
Delete items from library (supports batch up to 50)
Inputs: itemKeys (required).
extract_pdf_textB
Extract full-text content from PDF attachments
Inputs: itemKey (required), pages.
generate_citationB
Generate formatted citations in various styles (APA, Chicago, MLA, IEEE, etc.)
Inputs: itemKeys (required), style (required), format.
get_itemA
Get a single item by key or DOI
Inputs: itemKey, doi.
manage_collectionsC
Manage collections (create, list, get, delete)
Inputs: action (required), collectionKey, name, parentCollection.
manage_tagsC
Manage tags (list, add to item, remove from item)
Inputs: action (required), itemKey, tag, tags.
search_itemsB
Search and retrieve items from your Zotero library with filtering by query, tags, collections, and item type
Inputs: query, qmode, itemType, tag, +4 more.
update_itemC
Update an existing item
Inputs: itemKey (required), version (required), data (required).
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 has a distinct purpose with no overlapping functionality. Create, delete, extract, generate, get, manage collections, manage tags, search, and update are all clearly separated.
All tool names follow a consistent verb_noun pattern in snake_case. Verbs like create, delete, get, search, update are used predictably, with manage_ prefixed for collection and tag operations.
9 tools cover the core operations of a Zotero library management server: CRUD for items, collections, tags, plus search, citation generation, and PDF extraction. The count is well-scoped without being excessive.
The tool set covers basic CRUD, search, citation, and PDF extraction. Minor gaps exist such as lack of batch update or attachment upload, but core workflows are well-supported.
Maintenance
Related MCP Connectors
Zotero MCP server for Claude and ChatGPT: search, citations, safe writes, PDF passages and pages.
Academic literature search, retrieval, and private library management on top of OpenAlex.
Research paper search with real citations and reference formatting for AI assistants
Federated search of books and papers, BibTeX/RIS citations, open-access retrieval and reading.
Related MCP Servers
- AlicenseAqualityBmaintenanceEnables AI assistants to search, access, and interact with your Zotero research library, including semantic search, metadata retrieval, PDF annotations, and library management.41MIT
- FlicenseNot gradedqualityAmaintenanceEnables AI assistants to search a Zotero library, retrieve item metadata, and access the full text of PDF attachments.-
- FlicenseNot gradedqualityAmaintenanceEnables AI assistants to search a Zotero library, retrieve complete item metadata, and access the full text of documents.-
- FlicenseNot gradedqualityAmaintenanceEnables AI assistants to search a Zotero library, retrieve item metadata, and access full text from PDFs via the local or Web API.-