Zotero MCP server

Integrates local Zotero libraries, enabling natural language interactions for exploring and analyzing personal research collections.
Back to servers
Provider
Samuel Gyger
Release date
Jan 08, 2025
Language
Python
Stats
41 stars

This MCP server provides a connection between your local Zotero library and Claude, allowing Claude to access and read your Zotero references directly through the Desktop interface. It leverages Zotero 7's local web API capabilities to make your research library available to Claude.

Installation

Prerequisites

  • Python 3.10+
  • Local Zotero installation
  • Claude Desktop

Step-by-Step Installation

  1. Install uv package manager if you don't have it already:

  2. Clone the repository and set up the environment:

    git clone https://github.com/gyger/mcp-pyzotero.git
    cd mcp-pyzotero
    uv sync
    
  3. Enable the local API in Zotero 7:

    • Open Zotero preferences
    • Navigate to the Advanced section
    • Find and enable the Local API option
  4. Add the server to your local Claude installation:

    uv run mcp install zotero.py
    

Configuration

The connector works with local Zotero installations and currently supports only user libraries. By default, it uses the userid 0.

If you need to specify a different user ID, set the environment variable when installing:

uv run mcp install zotero.py -v ZOTERO_USER_ID=0

Using the Connector

After installation, Claude can interact with your Zotero library using the following functions:

Available Functions

  • List Collections

    • get_collections(): Returns all collections in your Zotero library
  • Retrieve Collection Items

    • get_collection_items(collection_key): Gets all items within a specific collection
  • Get Item Details

    • get_item_details(item_key): Retrieves detailed information about a specific paper, including its abstract
  • Search Library

    • search_library(query): Performs a search across your entire Zotero library
  • Recent Additions

    • get_recent(limit=10): Retrieves recently added papers (default: 10 most recent items)

Example Usage in Claude

You can ask Claude to perform tasks like:

  • "Show me my Zotero collections"
  • "Search my Zotero library for papers about machine learning"
  • "Get details about a specific paper in my collection"
  • "What are the most recent papers I've added to my library?"

Claude will use the appropriate MCP function to retrieve the information from your Zotero library.

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later