Give your AI assistant superpowers for Zotero plugin development
MCP Server Zotero Dev
Give your AI assistant superpowers for Zotero plugin development
Architecture · Getting Started · Available Tools
A Model Context Protocol (MCP) server that enables AI assistants like Claude, Cursor, and Windsurf to build, test, and debug Zotero 7/8 plugins. Screenshots, DOM state, debug logs, and JavaScript execution give the AI rich context to understand what's happening—and tools to help you fix it.
✨ Features
| Category | Capabilities |
|---|---|
| 🎯 UI Inspection | Screenshots, DOM tree, element finding, computed styles |
| 💻 JS Execution | Run code in Zotero context, inspect APIs, test snippets |
| 🔧 Build Tools | Scaffold integration for build, serve, hot reload |
| 📋 Logs & Errors | Stream debug output, error console, watch for issues |
| 🗃️ Database | Read-only access to zotero.sqlite for debugging |
| 🔌 Plugin Management | Install, reload, list plugins |
🚀 Quick Start
Prerequisites
- Node.js 20+ and npm
- Zotero 7+ — Works on all Zotero 7 and 8 builds (release, beta, dev)
- For plugin development: zotero-plugin-scaffold
1. Install MCP Server
Use install-mcp to add the server to your AI assistant:
npx -y install-mcp @introfini/mcp-server-zotero-dev --client claude-code
Supported clients: claude-code, cursor, windsurf, vscode, cline, roo-cline, claude, zed, goose, warp, codex
Claude Code
npx -y install-mcp @introfini/mcp-server-zotero-dev --client claude-code
Cursor
npx -y install-mcp @introfini/mcp-server-zotero-dev --client cursor
VS Code / Copilot
npx -y install-mcp @introfini/mcp-server-zotero-dev --client vscode
Windsurf
npx -y install-mcp @introfini/mcp-server-zotero-dev --client windsurf
Manual Configuration
Add to your MCP client config:
{
"mcpServers": {
"zotero-dev": {
"command": "npx",
"args": ["-y", "@introfini/mcp-server-zotero-dev"],
"env": {
"ZOTERO_RDP_PORT": "6100"
}
}
}
}
Restart your AI assistant after adding the configuration.
2. Install MCP Bridge Plugin in Zotero
Download zotero-mcp-bridge.xpi and install:
- In Zotero: Tools → Plugins
- Click ⚙️ → Install Plugin From File
- Select the downloaded
.xpifile - Restart Zotero
This lightweight plugin enables the Remote Debugging Protocol when Zotero starts. It only needs to be installed once and works on all Zotero 7+ builds (release, beta, and dev).
3. Start Developing!
Just open Zotero normally and ask your AI assistant:
"Take a screenshot of Zotero and list installed plugins"
That's it! No special launch flags, no configuration. 🎉
🧰 Available Tools (26 total)
UI Inspection — Screenshots, DOM, styles
| Tool | Description |
|---|---|
zotero_screenshot |
Capture window, element, or region screenshots |
zotero_inspect_element |
Find elements by CSS selector |
zotero_get_dom_tree |
Get DOM structure of a window/panel |
zotero_get_styles |
Get computed CSS styles for element |
zotero_list_windows |
List all open Zotero windows |
Screenshot Targets: Main window, preferences, PDF reader, dialogs, or any element by selector. Use
highlightSelectorto add a red border before capture.
JavaScript Execution — Run code in Zotero context
| Tool | Description |
|---|---|
zotero_execute_js |
Execute JavaScript in Zotero's privileged context. Auto-wraps code with top-level return statements in IIFE. |
zotero_inspect_object |
Explore Zotero APIs - list methods and properties of any object (e.g., Zotero.Items) |
zotero_open_preferences |
Open Zotero's settings window, optionally to a specific pane (built-in or plugin) |
zotero_search_prefs |
Search/discover preferences by pattern (e.g., find all prefs containing "debug") |
zotero_get_pref |
Get a preference value |
| `zotero_set |
Tools (10)
zotero_screenshotCapture window, element, or region screenshotszotero_inspect_elementFind elements by CSS selectorzotero_get_dom_treeGet DOM structure of a window/panelzotero_get_stylesGet computed CSS styles for elementzotero_list_windowsList all open Zotero windowszotero_execute_jsExecute JavaScript in Zotero's privileged context with auto-wrapped IIFEzotero_inspect_objectExplore Zotero APIs - list methods and properties of any objectzotero_open_preferencesOpen Zotero's settings window, optionally to a specific panezotero_search_prefsSearch/discover preferences by patternzotero_get_prefGet a preference valueEnvironment Variables
ZOTERO_RDP_PORTPort for Zotero Remote Debugging ProtocolConfiguration
{"mcpServers": {"zotero-dev": {"command": "npx", "args": ["-y", "@introfini/mcp-server-zotero-dev"], "env": {"ZOTERO_RDP_PORT": "6100"}}}}