The Zotero MCP Server enables your MCP clients (like Anthropic Claude App or Goose) to interact with your local Zotero library. This server provides programmatic access to search papers, manage notes, and perform other operations on your Zotero collection without leaving your preferred interface.
There are two ways to set up the Zotero MCP Server, depending on your preferences: using the Zotero API or directly accessing the SQLite database.
pip install -e .
.env
file in the root directory with your Zotero credentials:ZOTERO_API_KEY=your_api_key_here
ZOTERO_USER_ID=your_user_id_here
You can obtain your Zotero API key and user ID from Zotero's settings page.
If you prefer to bypass the Zotero API and work directly with the SQLite database:
pip install -e .
Note: You must close Zotero completely before using the SQLite method, as SQLite locks the database when Zotero is running.
To integrate with the Anthropic Claude Desktop app, you need to modify its configuration file.
Add this to ~/Library/Application Support/Claude/claude_desktop_config.json
:
{
"mcpServers": {
"zotero-mcp-server": {
"command": "uv",
"args": [
"--directory",
"/Users/yourusername/path/to/zotero-mcp",
"run",
"python",
"-m",
"zotero_mcp.server"
]
}
}
}
If you encounter an error like:
{"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"claude-ai","version":"0.1.0"}},"jsonrpc":"2.0","id":0}
error: unexpected argument '--directory' found
Use this alternative configuration instead:
{
"mcpServers": {
"zotero-mcp-server": {
"command": "bash",
"args": [
"-c",
"cd /Users/yourusername/path/to/zotero-mcp-server && source .venv/bin/activate && python -m zotero_mcp.server"
]
}
}
}
Make sure to first prepare the environment with:
uv venv
source .venv/bin/activate
uv pip install ".[dev]"
For the direct SQLite database access, use this configuration:
{
"mcpServers": {
"zotero-mcp-server": {
"command": "uv",
"args": [
"--directory",
"/Users/yourusername/path/to/zotero-mcp-server",
"run",
"python",
"-m",
"zotero_mcp.db_server"
]
}
}
}
Once configured, the Zotero MCP Server allows you to:
You can interact with your Zotero library directly through supported MCP clients like the Anthropic Claude App. The server handles the communication between your client and Zotero, providing a seamless experience for managing your research papers and notes.
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "zotero-mcp-server" '{"command":"bash","args":["-c","cd /Users/shahswai/personal/zotero-mcp-server && source .venv/bin/activate && python -m zotero_mcp.server"]}'
See the official Claude Code MCP documentation for more details.
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.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"zotero-mcp-server": {
"command": "bash",
"args": [
"-c",
"cd /Users/shahswai/personal/zotero-mcp-server && source .venv/bin/activate && python -m zotero_mcp.server"
]
}
}
}
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.
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 explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"zotero-mcp-server": {
"command": "bash",
"args": [
"-c",
"cd /Users/shahswai/personal/zotero-mcp-server && source .venv/bin/activate && python -m zotero_mcp.server"
]
}
}
}
3. Restart Claude Desktop for the changes to take effect