trackmcp
Back to directory
PhoenixChenLu

zotero-local-mcp-bridge

View on GitHub

Zotero Local MCP Bridge

4 stars FluentOthers Updated Aug 10, 2026

Documentation


✨ What It Does

Zotero Local MCP Bridge lets MCP-capable agents manage a local Zotero library through Zotero itself. It is not a database script that bypasses Zotero. It is a local MCP entrypoint running inside the Zotero plugin.

AreaCapability
📚 Items and collectionsRead, search, create, and edit items; batch-check whether DOI records already exist; batch-manage membership in top-level collections or subcollections
📎 AttachmentsAdd, move, rename, and inspect attachments; import single or multiple PDF/EPUB files and call Zotero's built-in metadata recognition and attachment rename logic
📝 Annotations and citationsRead, create, and update supported PDF annotations; format citations and bibliographies through Zotero
🔁 Import and exportImport and export BibTeX, RIS, and CSL JSON
🔎 SearchUse basic search, advanced search, and saved search read/update workflows
🛡️ Safety workflowEnforce dry-run for all writes; support approval, audit, file-level backup, and undo
🧩 DuplicatesFind duplicates and run controlled duplicate merge flows

> [!NOTE]

> Writes do not execute immediately. The agent first receives a dry-run plan, warnings, affected targets, and confirmation data. In approval modes, execution must wait for user approval.


🚫 What It Does Not Do

Not supportedReason
Managing online Zotero librariesThis project does not write through the Zotero Web API or manage remote Zotero accounts
Using `ZOTERO_API_KEY`This project does not request, read, or store a Zotero API key
Writing directly to `zotero.sqlite`Changes should go through Zotero internal APIs
Exposing arbitrary JavaScript evalOrdinary management must come from the plugin command table
Managing group librariesThe current public scope covers local user libraries only
Permanent deletion or empty trashCurrent delete-like flows use Zotero trash or controlled merge, not unrecoverable erase
Directly deleting existing attachment filesAttachment file operations must respect backup/undo and safety boundaries

📍 Scope

This plugin is designed for Zotero Desktop and a local MCP client on the same machine. The MCP endpoint is registered on Zotero's local connector server and uses local loopback access only.

ItemCurrent setting
Runtime locationInside the Zotero plugin
Endpoint`http://127.0.0.1:23119/zotero-local-mcp-bridge/mcp`
Library scopeLocal user library
Write pathZotero internal APIs
Network modelLocal loopback, no cloud writes
Audit and backupMust stay outside the Zotero profile, Zotero data directory, linked attachment root, and attachment directories

Run mode is configured in `Settings -> Zotero Local MCP Bridge`:

ModeBehavior
`readonly`Blocks all writes
`askforapprove`The agent asks the user for approval after dry-run
`yolo`Ordinary writes may auto-execute when the plan allows it; high-risk or future unrecoverable operations still require explicit confirmation

⚙️ How It Works

text
MCP-capable agent
  -> MCP tool call
  -> Zotero local connector server
  -> Zotero Local MCP Bridge plugin endpoint
  -> plugin command table
  -> Zotero internal API

The MCP endpoint is hosted inside the Zotero plugin:

text
http://127.0.0.1:23119/zotero-local-mcp-bridge/mcp

There is no separate Node, Python, or sidecar MCP process to start. Starting Zotero starts the plugin endpoint. Closing Zotero stops it. The release build exposes MCP tools, not the old private command endpoint.

Codex and Claude Code can connect to the Streamable HTTP MCP endpoint directly. OpenCode and other clients with stdio support but no Streamable HTTP support can use the standalone stdio adapter. The adapter runs on the agent side, stays outside the XPI, and never touches the Zotero database.


🚀 Quick Start

1. Download Release Files

Download from GitHub Releases:

FilePurpose
`zotero-local-mcp-bridge.xpi`Zotero plugin
`zotero-local-mcp-bridge-.mcpb`Claude Desktop MCP bundle for macOS and Windows
English skillFor English-speaking agents
Chinese skillFor Chinese-speaking agents

2. Install The Zotero Plugin

Open the Zotero plugin manager:

text
Tools -> Plugins

Drag `zotero-local-mcp-bridge.xpi` into the plugin manager window, confirm installation when prompted, and restart Zotero.

3. Choose Run Mode

Open:

text
Settings -> Zotero Local MCP Bridge

For first use, start with `readonly` or `askforapprove`. Use `yolo` only after you understand dry-run, approval, audit, and backup behavior.

4. Connect The MCP Client

Agents can connect through stdio or Streamable HTTP. Claude Desktop users on macOS or Windows can install the packaged MCPB adapter.

Option A: stdio MCP

Install the npm adapter:

bash
npm install -g zotero-local-mcp-bridge-stdio-adapter

Then configure stdio MCP in your agent:

toml
[mcp_servers.zotero-local-mcp-bridge]
command = "zotero-local-mcp-bridge-stdio"
args = []
startup_timeout_sec = 20
tool_timeout_sec = 120

Generic stdio MCP configuration:

json
{
  "mcpServers": {
    "zotero-local-mcp-bridge": {
      "type": "stdio",
      "command": "zotero-local-mcp-bridge-stdio",
      "args": []
    }
  }
}

You can also use `npx` without a global install:

json
{
  "mcpServers": {
    "zotero-local-mcp-bridge": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "zotero-local-mcp-bridge-stdio-adapter"]
    }
  }
}

The stdio adapter is a compatibility layer started by the agent session. It forwards stdio MCP requests to the Zotero plugin HTTP MCP endpoint. It is not the Zotero plugin itself and does not start with Zotero.

Before editing an agent configuration, verify the installed plugin and MCP endpoint:

bash
zotero-local-mcp-bridge-stdio doctor

The one-shot command checks MCP initialization and tool discovery, then prints the detected plugin version, tool count, and ready-to-copy Codex, Claude Code, and OpenCode configurations. It does not modify agent settings.

See the client compatibility matrix for Codex, Claude Code, OpenCode, Claude Desktop, and current ChatGPT limitations.

Option B: HTTP MCP

If your agent supports Streamable HTTP / HTTP MCP, you can skip the npm package and connect directly to the Zotero plugin endpoint:

text
http://127.0.0.1:23119/zotero-local-mcp-bridge/mcp

Codex example:

toml
[mcp_servers.zotero-local-mcp-bridge]
url = "http://127.0.0.1:23119/zotero-local-mcp-bridge/mcp"
startup_timeout_sec = 10
tool_timeout_sec = 120

Claude Code example:

bash
claude mcp add --transport http zotero-local-mcp-bridge http://127.0.0.1:23119/zotero-local-mcp-bridge/mcp

Option C: Claude Desktop MCPB

Install `zotero-local-mcp-bridge-.mcpb` in Claude Desktop on macOS or Windows. The MCPB contains the stdio compatibility adapter, not the Zotero plugin; install the XPI first and keep Zotero open. See Claude Desktop setup.

5. Install The Matching Skill

Tell the agent to use Zotero through Zotero Local MCP Bridge. When approval is required, the agent should briefly describe the pending operation and wait for user approval.

6. Run The First Read-Only Query

Ask the agent:

text
List my Zotero collection tree without making changes.

The agent should call `zotero_collection_get_tree` with `libraryScope=local-user`. This query does not require write approval.


🧪 Examples

Ask the agent toExpected behavior
List my Zotero collection treeRead-only query, no write confirmation
Check which DOI values already exist in my libraryRun one batch lookup and return matching items, reusable item keys, and unmatched DOI values
Add these existing items to "Current Project / Reading Queue"Use one dry-run, one approval when required, and one batch write while skipping existing members
Create a "Reading Queue" subcollection under "Current Project"Dry-run first, then ask for approval
Add this PDF attachment to this itemResolve the item and file path, then dry-run the attachment operation
Import this PDF and retrieve metadata automaticallyDry-run first, then use Zotero's built-in recognition flow to create the parent item and rename the attachment according to preferences
Import these PDFs and retrieve metadata automaticallyUse the batch recognition tool with one dry-run, one approval, and one execute
Export selected items as BibTeXRead-only export, no write confirmation
Format a bibliography with a chosen styleUse Zotero's citation formatter

In approval mode, a single write operation should interact through the agent like this:

text
I am about to create a subcollection named "Reading Queue" under "Current Project". Approve execution?

Multiple pending operations use a numbered table, so the user can approve all operations or approve only selected numbers:

text
The following operations need approval:

| No. | Operation |
|---:|---|
| 1 | Move subcollection "Temporary" under "Old Project" to Zotero trash |
| 2 | Merge duplicate items "Smith 2024" and "Smith 2024 copy" |
| 3 | Add "Zotero MCP design notes" to "Current Project / Reading Queue" |

The user can reply "approve all", or reply "approve 1 and 3, reject 2".

If this project helps your workflow, consider starring the repository or opening a focused issue with reproducible feedback.


❤️ Support Author


📄 License

Zotero Local MCP Bridge is licensed under AGPL-3.0-or-later. See LICENSE.

Frequently asked questions

What is zotero-local-mcp-bridge?

zotero-local-mcp-bridge is Zotero Local MCP Bridge

How do I install zotero-local-mcp-bridge?

Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.

Is zotero-local-mcp-bridge open source?

Yes — it is hosted on GitHub at https://github.com/PhoenixChenLu/zotero-local-mcp-bridge and has 4 stars.

Related MCP tools

Run your own MCP server? See who uses it and what to fix.

Measure it with TrackMCP