Get the FREE Ultimate OpenClaw Setup Guide →

zotero

MCP server to expose local zotero repository to MCP clients

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio swairshah-zotero-mcp-server uv --directory /Users/swairshah/work/research/zotero-mcp run python -m zotero_mcp.server \
  --env ZOTERO_API_KEY="your_zotero_api_key_here" \
  --env ZOTERO_USER_ID="your_zotero_user_id_here"

How to use

This MCP server exposes a programmatic interface to your local Zotero library. It lets MCP clients search papers by tags, fetch paper details and attached notes, add new notes to papers, and request summaries of papers. The server authenticates with Zotero via API keys you provide in the environment (ZOTERO_API_KEY and ZOTERO_USER_ID). To use it with a client like Claude or another MCP consumer, run the MCP server and point your client at the server’s RPC interface. The supplied configuration demonstrates running via uv with a local directory; once started, clients can send requests defined by the MCP protocol to interact with Zotero data through this server.

How to install

Prerequisites:

  • Python 3.9+ (or as required by zotero_mcp)
  • pip (bundled with Python)
  • uv (the MCP runner) installed in your environment

Install steps:

  1. Clone or download the Zotero MCP server repository and navigate to its root.
  2. Create and activate a Python virtual environment (optional but recommended): python -m venv .venv source .venv/bin/activate # on Unix or macOS ..venv\Scripts\activate # on Windows
  3. Install the package in editable mode: pip install -e .
  4. Create a .env file in the root with your Zotero credentials: ZOTERO_API_KEY=your_api_key_here ZOTERO_USER_ID=your_user_id_here
  5. Start the MCP server using uv: uv --directory /Users/swairshah/work/research/zotero-mcp run python -m zotero_mcp.server

Notes:

  • If you prefer to run via a shell command container, you can instead use a bash command wrapper as shown in the README to activate a virtual env and then run the server.
  • Ensure Zotero is not running if you opt for direct SQLite access (as described in the README) to avoid database locks.

Additional notes

Tips and caveats:

  • Environment variables ZOTERO_API_KEY and ZOTERO_USER_ID are required for API-based access; store them securely and avoid committing to VCS.
  • If you encounter issues with the --directory argument in certain clients (as shown in the README), ensure you’re using a shell wrapper that activates the virtual environment before launching the server.
  • There is an alternative SQLite-based path zotero_mcp.db_server for direct database access; use this if you prefer not to use the Zotero API, but remember to close Zotero before accessing the database to avoid SQLite locks.
  • The server supports common MCP operations like search, fetch details, add notes, and summarize papers; ensure your MCP client is sending supported methods and parameters per the protocol version in use.
  • If you change the project path, update the uv command to reflect the new directory.
  • For Claude integration, you can embed the same command structure into Claude’s config JSON as shown in the README.

Related MCP Servers

Sponsor this space

Reach thousands of developers