MCP Server for managing local Zotero libraries - enables AI assistants to read and write bibliographic references
Project description
Zotero Keeper MCP Server
MCP Server for managing local Zotero libraries via AI Agents.
Installation
# Basic installation
pip install -e .
# With PubMed support
pip install -e ".[pubmed]"
# All features
pip install -e ".[all]"
Usage
# Run MCP server
python -m zotero_mcp
# Or use the CLI
zotero-keeper
Environment Variables
Copy .env.example to .env and configure:
# Local Zotero (default)
ZOTERO_HOST=localhost
ZOTERO_PORT=23119
# Remote Zotero
ZOTERO_HOST=<your-zotero-ip>
ZOTERO_PORT=23119
MCP Tools
🌟 Unified Import (NEW in v1.11.0)
| Tool | Description |
|---|---|
import_articles |
⭐ One tool for ALL imports - accepts articles from any pubmed-search-mcp tool |
Workflow:
# Step 1: Search with pubmed-search-mcp
results = search_literature("CRISPR gene therapy", limit=10)
# Step 2: Import to Zotero (ANY source works!)
import_articles(
articles=results["articles"],
collection_name="CRISPR Research",
tags=["2024", "review"]
)
Supported sources: PubMed, Europe PMC, CORE, CrossRef, OpenAlex, Semantic Scholar, RIS
Core Tools
| Tool | Description |
|---|---|
check_connection |
Test Zotero connectivity |
search_items |
Search references by keyword |
get_item |
Get item details by key |
list_items |
List recent items |
add_reference |
Add new reference (simple) |
create_item |
Create with full metadata |
Smart Tools 🧠
| Tool | Description |
|---|---|
smart_add_reference |
Validate + duplicate check + add |
smart_add_with_collection |
Smart add + auto-classify to collection |
suggest_collections |
Suggest collections based on title/tags |
check_duplicate |
Check if reference exists |
validate_reference |
Validate before adding |
Collection Tools
| Tool | Description |
|---|---|
list_collections |
List all collections |
get_collection |
Get collection by key |
get_collection_items |
Get items in a collection |
get_collection_tree |
Get hierarchical tree structure |
find_collection |
Find collection by name |
Saved Search Tools 🌟 (Local API Exclusive!)
| Tool | Description |
|---|---|
list_saved_searches |
List all saved searches |
run_saved_search |
Execute a saved search |
get_saved_search_details |
Get search conditions |
Other Tools
| Tool | Description |
|---|---|
list_tags |
List all tags |
get_item_types |
Get available item types |
💡 Smart Collection Feature
AI can suggest appropriate collections based on title, abstract, and tags!
Workflow Options
Option 1: Ask before saving
User: "Which collection should this AI paper go to?"
AI: suggest_collections(title="AI in Anesthesiology")
→ Suggests: "AI Research" (score: 85)
User: "Add it to AI Research"
AI: add_reference(..., collections=["ABC123KEY"])
Option 2: Auto-classify
User: "Add this paper and auto-classify"
AI: smart_add_with_collection(
title="AI in Anesthesiology",
auto_suggest_collection=True
)
→ Automatically added to "AI Research"
Option 3: Specify by name
User: "Add to 'Machine Learning' collection"
AI: smart_add_with_collection(
title="...",
collection_name="Machine Learning"
)
⚠️ Important Note
Since Local API cannot create collections:
- Create collection structure in Zotero first
- Let AI classify into existing collections
🌟 Saved Search Feature (Local API Exclusive!)
This is a unique feature only available via Local API - Web API cannot execute saved searches!
How It Works
- Create Saved Search in Zotero (one-time setup)
- AI executes it anytime via
run_saved_search
Step-by-Step Guide
Step 1: Create Saved Search in Zotero
- Open Zotero
- Press
Ctrl+Shift+F(or Edit → Advanced Search) - Set conditions (see examples below)
- Click Save Search
- Give it a memorable name (e.g., "Missing PDF")
Step 2: Use via AI
AI: "Which papers don't have PDFs?"
→ run_saved_search(search_name="Missing PDF")
AI: "What did I add this week?"
→ run_saved_search(search_name="Recent Additions")
Recommended Saved Searches
Create these once, use forever:
| Name | Conditions | Use Case |
|---|---|---|
| Missing PDF | Attachment File Type is not PDF |
Find papers without PDF |
| Missing DOI | DOI is (empty) |
Find incomplete metadata |
| Missing Abstract | Abstract is (empty) |
Find items without abstract |
| Recent Additions | Date Added is in the last 7 days |
Review recent imports |
| Unread | Tag is not read |
Track reading progress |
| Reviews | Title contains review |
Find review articles |
| This Year | Date is after 2024-01-01 |
Recent publications |
Condition Reference
| Field | Operators | Example Values |
|---|---|---|
| Title | contains, is, is not | "machine learning" |
| Creator | contains, is | "Zhang" |
| Date | is, is after, is before | "2024-01-01" |
| Date Added | is in the last | "7 days", "1 month" |
| Tag | is, is not | "read", "important" |
| DOI | is, is not | (leave empty for "is empty") |
| Attachment File Type | is, is not | "PDF" |
| Item Type | is | "journalArticle", "book" |
Documentation
See main README for full documentation.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file zotero_keeper-1.11.0.tar.gz.
File metadata
- Download URL: zotero_keeper-1.11.0.tar.gz
- Upload date:
- Size: 154.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d2388d87ed9ec0104a26c7295e35432e09acb2d727c101525e7f37dbb1d141cb
|
|
| MD5 |
ca61162d2a1ce750bbc05786678b669a
|
|
| BLAKE2b-256 |
b6eb1f96ac79553bc25601923886d838a3355345c4448b054c7dda66cc5601ed
|
Provenance
The following attestation bundles were made for zotero_keeper-1.11.0.tar.gz:
Publisher:
release.yml on u9401066/zotero-keeper
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
zotero_keeper-1.11.0.tar.gz -
Subject digest:
d2388d87ed9ec0104a26c7295e35432e09acb2d727c101525e7f37dbb1d141cb - Sigstore transparency entry: 813699340
- Sigstore integration time:
-
Permalink:
u9401066/zotero-keeper@86e3809fbd3936e3de5567a4e6ab3db462dfb272 -
Branch / Tag:
refs/tags/v1.11.0 - Owner: https://github.com/u9401066
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@86e3809fbd3936e3de5567a4e6ab3db462dfb272 -
Trigger Event:
push
-
Statement type:
File details
Details for the file zotero_keeper-1.11.0-py3-none-any.whl.
File metadata
- Download URL: zotero_keeper-1.11.0-py3-none-any.whl
- Upload date:
- Size: 76.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
008a803fc4801561e88f0330474eb1c50604f49b5425f48dbeed0a0031552ba6
|
|
| MD5 |
1d12afdbc492502b894c6c7db96a774e
|
|
| BLAKE2b-256 |
2c269b811e4f27642c3373e5f2aedc0794209a186bbbb4c2716b44786370b140
|
Provenance
The following attestation bundles were made for zotero_keeper-1.11.0-py3-none-any.whl:
Publisher:
release.yml on u9401066/zotero-keeper
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
zotero_keeper-1.11.0-py3-none-any.whl -
Subject digest:
008a803fc4801561e88f0330474eb1c50604f49b5425f48dbeed0a0031552ba6 - Sigstore transparency entry: 813699341
- Sigstore integration time:
-
Permalink:
u9401066/zotero-keeper@86e3809fbd3936e3de5567a4e6ab3db462dfb272 -
Branch / Tag:
refs/tags/v1.11.0 - Owner: https://github.com/u9401066
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@86e3809fbd3936e3de5567a4e6ab3db462dfb272 -
Trigger Event:
push
-
Statement type: