Labsco
PhoenixChenLu logo

Zotero Local MCP Bridge

โ˜… 1

from PhoenixChenLu

Use a Zotero plugin-hosted MCP endpoint to let local agents manage a local Zotero library safely.

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedAccount requiredNeeds API keys

Zotero Local MCP Bridge

Use a Zotero plugin-hosted MCP endpoint to let local agents manage a local Zotero library safely.

AGPL-3.0-or-later ยท Plugin version 0.1.58 ยท Zotero 9.x ยท Plugin-hosted MCP ยท Local loopback access

็ฎ€ไฝ“ไธญๆ–‡ ยท English

What It Does ยท What It Does Not Do ยท Scope ยท How It Works ยท Quick Start ยท Examples ยท Support Author ยท License


โœจ 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; manage fields, creators, tags, notes, collections, and collection membership
๐Ÿ“Ž AttachmentsAdd, move, rename, and inspect attachments; import 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_KEYThis project does not request, read, or store a Zotero API key
Writing directly to zotero.sqliteChanges 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
Endpointhttp://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
readonlyBlocks all writes
askforapproveThe agent asks the user for approval after dry-run
yoloOrdinary writes may auto-execute when the plan allows it; high-risk or future unrecoverable operations still require explicit confirmation

โš™๏ธ How It Works

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:

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.


๐Ÿงช Examples

Ask the agent toExpected behavior
List my Zotero collection treeRead-only query, no write confirmation
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
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:

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:

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".


โค๏ธ Support Author


๐Ÿ“„ License

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