Skip to main content

Lightweight Zotero MCP server for AI agent interaction

Project description

zoty

Lightweight Zotero MCP server for AI agents.

What it does

MCP server that connects AI agents to your local Zotero library. Provides 6 tools: BM25-ranked search over titles and abstracts, collection browsing, item lookup, and paper ingestion by arXiv ID or DOI with automatic PDF attachment.

Requirements

  • Python 3.10+
  • Zotero 7 desktop running
  • Zotero local API enabled: Zotero Settings > Advanced > Config Editor > set extensions.zotero.httpServer.localAPI.enabled to true
  • Zoty Bridge plugin installed (for PDF attachment and collection assignment)

Install

# Install as a uv tool (recommended)
uvx --from git+https://github.com/etramel/zoty zoty

# Or from a local checkout
uv tool install .

Claude Code

Add to .mcp.json or ~/.claude/settings.json:

{
  "mcpServers": {
    "zoty": {
      "command": "zoty"
    }
  }
}

Claude Desktop

Add to your Claude Desktop MCP config:

{
  "mcpServers": {
    "zoty": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/etramel/zoty", "zoty"]
    }
  }
}

Zoty Bridge Plugin

A tiny Zotero 7 plugin that lets zoty execute JavaScript inside Zotero's privileged context. This is needed for operations that can't go through the REST API: PDF attachment and collection assignment both require writing to Zotero's SQLite database, which locks out external processes. The bridge sidesteps this by running JS inside Zotero itself.

Install the plugin

  1. Download zoty-bridge.xpi from releases, or build it yourself:
    make build
    
  2. In Zotero: Tools > Add-ons > gear icon > Install Add-on From File > select the .xpi
  3. Restart Zotero

The bridge runs an HTTP server on localhost:24119 when Zotero is open. No configuration needed.

Tools

Tool Description
search_library BM25-ranked search over item titles and abstracts
list_collections List all collections with keys, names, and item counts
list_collection_items List items in a specific collection
get_item Full metadata for a single item by key
get_recent_items Recently added items, sorted by date
add_paper Add a paper by arXiv ID or DOI with automatic PDF download

How it works

Read operations go through pyzotero against Zotero's local API (localhost:23119). The BM25 search index builds in a background thread at startup so the MCP handshake completes immediately.

Write operations use the Zotero connector endpoint (/connector/saveItems) to create metadata items. PDF attachment and collection assignment go through the zoty-bridge plugin, which executes JavaScript in Zotero's privileged context. This two-path design exists because Zotero's SQLite database uses exclusive locking -- external processes can read it (immutable mode) but not write to it while Zotero is running.

Development

make build   # build zotero-plugin/dist/zoty-bridge.xpi
make test    # run Python unit tests

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

zoty-0.1.1.tar.gz (85.6 kB view details)

Uploaded Source

Built Distribution

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

zoty-0.1.1-py3-none-any.whl (14.2 kB view details)

Uploaded Python 3

File details

Details for the file zoty-0.1.1.tar.gz.

File metadata

  • Download URL: zoty-0.1.1.tar.gz
  • Upload date:
  • Size: 85.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for zoty-0.1.1.tar.gz
Algorithm Hash digest
SHA256 26ebbf4dedd8f48540d835c0662c73cecd52bd2ab1369dbb3706798b53c6e28c
MD5 f78ab2a7db7e1142cfb3e39f2472ba7f
BLAKE2b-256 c59c69367f08b3aa472038c2a0c9105f30156dc17aa2ebaa8fd24adb3bd92365

See more details on using hashes here.

Provenance

The following attestation bundles were made for zoty-0.1.1.tar.gz:

Publisher: publish.yml on eric-tramel/zoty

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file zoty-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: zoty-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 14.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for zoty-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 90b9828b0b6bb08ba434748368d6ad7bd493d5cf78ce52b243701e1e515ff1b2
MD5 1ccb8e4fc25de6ad9d9dd4c959628ad2
BLAKE2b-256 93d26aa540cc72e621d965fb20b2af84a85d9aa595f1b0553001c14e6046910f

See more details on using hashes here.

Provenance

The following attestation bundles were made for zoty-0.1.1-py3-none-any.whl:

Publisher: publish.yml on eric-tramel/zoty

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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