Search your Zotero library, retrieve item metadata, and read full text from AI assistants.
io.github.kujenga/zotero-mcp MCP Server
This Model Context Protocol (MCP) server is a Python implementation that provides access to a Zotero library. It supports searching the library, retrieving item metadata, and reading full text from AI assistants.
🛠️ Key Features
Search a Zotero library
Retrieve item metadata
Read full text from AI assistants
🚀 Use Cases
Find Zotero items by query
Pull structured metadata for Zotero records
Provide full-text content to AI assistants
⚡ Developer Benefits
MCP-compatible server for Zotero workflows
Exposes functionality tailored to metadata and full-text retrieval
⚠️ Limitations
Documentation excerpt provided does not include details on configuration, auth, or supported Zotero item types.
This project is a python server that implements the Model Context Protocol (MCP) for Zotero, giving you access to your Zotero library within AI assistants. It is intended to implement a small but maximally useful set of interactions with Zotero for use with MCP clients.
zotero_search_items: Search for items in your Zotero library using a text query
zotero_item_metadata: Get the complete metadata for a specific Zotero item, covering every populated field grouped into publication details, identifiers, timestamps, and library information
zotero_item_fulltext: Get the full text of a specific Zotero item (i.e. PDF contents)
These can be discovered and accessed through any MCP client or through the MCP Inspector.
Each tool returns formatted text containing relevant information from your Zotero items, and AI assistants such as Claude can use them sequentially, searching for items then retrieving their metadata or text content.
Installation
This server can either run against either a local API offered by the Zotero desktop application) or through the Zotero Web API. The local API can be a bit more responsive, but requires that the Zotero app be running on the same computer with the API enabled. To enable the local API, do the following steps:
Open Zotero and open "Zotero Settings"
Under the "Advanced" tab, check the box that says "Allow other applications on this computer to communicate with Zotero".
To use the Zotero Web API, you'll need to create an API key and find your Library ID (usually your User ID) in your Zotero account settings here: https://www.zotero.org/settings/keys
These are the available configuration options:
ZOTERO_LOCAL=true: Use the local Zotero API (default: false, see note below)
ZOTERO_API_KEY: Your Zotero API key (not required for the local API)
ZOTERO_LIBRARY_ID: Your Zotero library ID (your user ID for user libraries, not required for the local API)
ZOTERO_LIBRARY_TYPE: The type of library (user or group, default: user)
The @latest specifier is optional and will pull the latest version when new ones are available. If you don't have uvx installed you can use pipx run instead, or clone this repository locally and use the instructions in Development below.
Docker with Zotero Web API
If you want to run this MCP server in a Docker container, you can use the following configuration, inserting your API key and library ID:
To update to a newer version, run docker pull ghcr.io/kujenga/zotero-mcp:main. It is also possible to use the docker-based installation to talk to the local Zotero API, but you'll need to modify the above command to ensure that there is network connectivity to the Zotero application's local API interface.
Development
Information on making changes and contributing to the project.
npx @modelcontextprotocol/inspector uv run zotero-mcp
To test the local repository against Claude Desktop, run echo $PWD/.venv/bin/zotero-mcp in your shell within this directory, then set the following within your Claude Desktop configuration
json
{"mcpServers":{"zotero":{"command":"/path/to/zotero-mcp/.venv/bin/zotero-mcp""env":{// Whatever configuration is desired.}}}}
Running Tests
To run the test suite:
bash
uv run pytest
Releasing
Bump the version in pyproject.toml and server.json (two places: the
server version and the package version).
Publish to PyPI with make publish.
Publish updated metadata to the official MCP
registry with make publish-mcp, authenticating first with mcp-publisher login github if
needed.
Docker Development
Build the container image with this command:
sh
docker build . -t zotero-mcp:local
To test the container with the MCP inspector, run the following command:
Item metadata is rendered from whatever fields the API returns rather than from
a fixed list. Fields it omits are skipped, and fields this server doesn't know
about appear under an "Other Fields" heading, so a Zotero upgrade never
silently drops metadata.
The two APIs differ in one way worth knowing: the local API's quick search
indexes citation keys, while the Web API does not, so searching for one returns
nothing over the Web API even though the field is present in the data.
Install
Configuration
Environment variables
ZOTERO_LOCALdefault false
Use the local API from the Zotero desktop app instead of the Web API. Requires Zotero to be running with 'Allow other applications on this computer to communicate with Zotero' enabled under Settings > Advanced.
ZOTERO_API_KEYsecret
Zotero Web API key from https://www.zotero.org/settings/keys. Not required when ZOTERO_LOCAL is true.
ZOTERO_LIBRARY_ID
Zotero library ID (your user ID for user libraries). Not required when ZOTERO_LOCAL is true.
ZOTERO_LIBRARY_TYPEdefault user
Whether ZOTERO_LIBRARY_ID refers to a user or group library.