Zotero Assistant MCP Server

Zotero library management MCP server for Cloudflare Workers

README.md

zotero-assistant-mcp

Zotero library management MCP server for Cloudflare Workers, designed for deployment via mcp-deploy.

Tools (16)

Groups

  • list_groups — list Zotero groups the user belongs to (returns group IDs for use with group_id params)

Search & Browse

  • search_items — search by text, tags, type, collection, or date range
  • get_collection_items — list items in a specific collection
  • list_collections — list all collections (folders)
  • create_collection — create a new collection
  • list_tags — list tags with item counts
  • get_library_stats — library overview with totals and top tags

Read

  • get_item — full metadata and children for a single item
  • read_attachment — read attachment content (auto-detects type, accepts parent or attachment key)
  • get_note — read note content

Write

  • save_item — create an item with metadata and optional attachment (PDF URL, snapshot, or base64 file)
  • attach — attach a file to an existing item (supports pdf_url, snapshot_url, or file via base64)
  • create_note — create a note on an existing item
  • update_item — update metadata, tags, or collections
  • trash_item — move a note or attachment to trash

All tools that operate on library data accept an optional group_id parameter. Omit it for the personal library; pass a group ID (from list_groups) to operate on a group library.

Features

  • Server instructions — workflow guidance injected once at init, not per-tool
  • Progress notifications — multi-step operations (attach, save with attachment, read) emit MCP progress events
  • Group library support — call list_groups to discover groups, pass group_id to any tool
  • Smart author parsing — handles "Last, First", suffixes (Jr., III), and institutional authors
  • Curated responsesget_item returns only non-empty, agent-relevant fields; search results are compact summaries

Deploy

Install mcp-deploy and deploy to Cloudflare Workers:

npm install -g mcp-deploy
mcp-deploy login
mcp-deploy add upascal/zotero-assistant-mcp
mcp-deploy deploy zotero-assistant-mcp

Or use the web UI: mcp-deploy gui

How it works

This repo contains only MCP logic. Auth, deployment, and UI are handled by mcp-deploy (npm install -g mcp-deploy). The repo ships:

  • src/ — MCP server code (Cloudflare Workers + Durable Objects)
  • mcp-deploy.json — deployment contract (secrets, config, worker settings)

Configuration

Secret Required Description
ZOTERO_API_KEY Yes Zotero API key
ZOTERO_LIBRARY_ID Yes Your numeric user library ID

Local development

npm install

# Create .dev.vars with your Zotero credentials:
# ZOTERO_API_KEY=your-api-key
# ZOTERO_LIBRARY_ID=your-library-id

npx wrangler dev

Testing

npm test

Integration tests run against a live Zotero library. Set .dev.vars with your credentials. Tests create temporary items/collections and clean up after themselves.

Release

Tag a version to trigger the GitHub Actions release workflow:

git tag v0.5.0
git push --tags

This builds worker.mjs and publishes it alongside mcp-deploy.json as release assets. mcp-deploy fetches these assets to deploy the worker.

Tools 15

list_groupsList Zotero groups the user belongs to
search_itemsSearch by text, tags, type, collection, or date range
get_collection_itemsList items in a specific collection
list_collectionsList all collections (folders)
create_collectionCreate a new collection
list_tagsList tags with item counts
get_library_statsLibrary overview with totals and top tags
get_itemFull metadata and children for a single item
read_attachmentRead attachment content
get_noteRead note content
save_itemCreate an item with metadata and optional attachment
attachAttach a file to an existing item
create_noteCreate a note on an existing item
update_itemUpdate metadata, tags, or collections
trash_itemMove a note or attachment to trash

Environment Variables

ZOTERO_API_KEYrequiredYour Zotero API key
ZOTERO_LIBRARY_IDrequiredYour numeric user library ID

Try it

Search my library for papers about climate change published in the last year.
List all collections in my library and tell me which one has the most items.
Read the PDF attachment for the item with key ABC12345 and summarize the main findings.
Create a new note for the paper 'The Future of AI' with my thoughts on the methodology.
Move the attachment with key XYZ98765 to the trash.

Frequently Asked Questions

What are the key features of Zotero Assistant?

Full CRUD operations for Zotero library items, notes, and attachments. Support for both personal and group Zotero libraries. Smart author parsing for various name formats and suffixes. Real-time progress notifications for long-running operations. Compact, agent-relevant metadata responses for efficient context usage.

What can I use Zotero Assistant for?

Automating the organization of research papers into specific collections. Quickly summarizing PDF attachments within a research workflow. Managing collaborative group libraries via natural language commands. Batch updating metadata or tags across multiple library items.

How do I install Zotero Assistant?

Install Zotero Assistant by running: mcp-deploy deploy zotero-assistant-mcp

What MCP clients work with Zotero Assistant?

Zotero Assistant works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Zotero Assistant docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Open Conare