Skip to main content

MCP server for Zotero — library tools + optional semantic search

Project description

mcp-zotero

MCP server for Zotero — 38 library tools + optional semantic search via local embeddings.

Install

Base (Zotero API tools only)

uv tool install mcp-zotero

With semantic search

uv tool install "mcp-zotero[rag]"

Adds 8 RAG tools for indexing PDFs and searching by meaning. Downloads a ~80MB embedding model on first use.

With OCR for scanned PDFs

uv tool install "mcp-zotero[rag,ocr]"

Adds docling-based OCR fallback for PDFs that contain scanned images instead of text.

Configuration

Add to your Claude Code MCP settings (.mcp.json or ~/.claude/settings.json):

{
  "mcpServers": {
    "zotero": {
      "command": "mcp-zotero",
      "env": {
        "ZOTERO_LIBRARY_ID": "YOUR_LIBRARY_ID",
        "ZOTERO_LOCAL": "true",
        "ZOTERO_LOCAL_KEY": "YOUR_LOCAL_KEY",
        "ZOTERO_API_KEY": "YOUR_API_KEY",
        "ZOTERO_ATTACHMENTS_DIR": "~/Zotero/storage"
      }
    }
  }
}

Environment variables

Variable Required Default Description
ZOTERO_LIBRARY_ID Yes Your Zotero library ID
ZOTERO_LIBRARY_TYPE No user user or group
ZOTERO_LOCAL No true Use Zotero Local API (requires Zotero app running)
ZOTERO_LOCAL_KEY For reads Local API key
ZOTERO_API_KEY For writes Web API key from zotero.org/settings/keys
ZOTERO_ATTACHMENTS_DIR For RAG Path to Zotero storage directory

RAG-only variables (when installed with [rag])

Variable Default Description
RAG_INDEX_DIR ~/.zotero-rag Where to store index data
RAG_EMBEDDING_MODEL all-MiniLM-L6-v2 Sentence transformer model
RAG_CHUNK_SIZE 512 Target chunk size in tokens
RAG_CHUNK_OVERLAP 50 Overlap between chunks
RAG_ENABLE_OCR false Enable docling OCR fallback for scanned PDFs

Tools

Base tools (38)

Always available. Covers the full Zotero API:

Search & browse: search_items, top_items, get_item, trash_items, deleted_items

Collections: list_collections, list_collections_top, list_collections_sub, get_collection, collection_items, collection_items_top, collection_tags, create_collections, update_collection, delete_collection, add_item_to_collection, remove_item_from_collection

Tags: list_tags, item_tags, delete_tags

Items: add_item, update_item, delete_item

Attachments: download_attachments, attach_file, attach_linked_file

Schema: item_types, item_fields, item_type_fields, creator_fields, item_creator_types, item_attachment_link_modes

Saved searches: list_searches, list_groups, create_saved_search, delete_saved_search

System: ping, health_check

RAG tools (8)

Available when installed with [rag]. Semantic search across your PDF library:

Tool Description
index_library Index a collection or entire library
index_items Index specific items by key
remove_from_index Remove items from the index
semantic_search Search passages by meaning
get_chunk_context Get surrounding text for a search result
find_similar_chunks Find similar passages across documents
index_status Get index statistics
list_indexed_items List all indexed items

Development

git clone https://github.com/nealcaren/mcp-zotero.git
cd mcp-zotero
uv venv && uv pip install -e ".[dev,rag]"
pytest

License

MIT

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

mcp_zotero-0.2.0.tar.gz (27.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_zotero-0.2.0-py3-none-any.whl (27.5 kB view details)

Uploaded Python 3

File details

Details for the file mcp_zotero-0.2.0.tar.gz.

File metadata

  • Download URL: mcp_zotero-0.2.0.tar.gz
  • Upload date:
  • Size: 27.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.7

File hashes

Hashes for mcp_zotero-0.2.0.tar.gz
Algorithm Hash digest
SHA256 0e8e12fb46ab47c8025c8d5e7e4b35b82e57f611eb36735e6139d84fe91bd926
MD5 3e35364cb713f478d76e9e7f31e0e44c
BLAKE2b-256 3f2794fa798402d96f41e2443b83445ca267bf1448b1e181681ae3bf2c73a932

See more details on using hashes here.

File details

Details for the file mcp_zotero-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mcp_zotero-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b49b019ab781cde6cd72784c56d9aa5e202d0f28205190c9973f2d74f206845f
MD5 358dbbb83e16b16d08d8108c6d081261
BLAKE2b-256 e5bb1aae062e5a619f4b204c7fd8be3f5d5a1d98b396f4444a8896d2de7c34bb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page