MCP Server Zotero Dev

MCP Server Zotero Dev

An MCP server that enables AI assistants to build, test, and debug Zotero 7/8 plugins through tools for UI inspection, JavaScript execution, and real-time log monitoring. It integrates with Zotero's Remote Debugging Protocol to provide rich context including screenshots, DOM access, and database querying.

Category
Visit Server

README

<div align="center">

MCP Server Zotero Dev

Give your AI assistant superpowers for Zotero plugin development

License: MIT Zotero 7+

Architecture Β· Getting Started Β· Available Tools

<img src="docs/images/demo.png" alt="MCP Server Zotero Dev in action" width="800">

</div>


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

<details> <summary><strong>Claude Code</strong></summary>

npx -y install-mcp @introfini/mcp-server-zotero-dev --client claude-code

</details>

<details> <summary><strong>Cursor</strong></summary>

npx -y install-mcp @introfini/mcp-server-zotero-dev --client cursor

</details>

<details> <summary><strong>VS Code / Copilot</strong></summary>

npx -y install-mcp @introfini/mcp-server-zotero-dev --client vscode

</details>

<details> <summary><strong>Windsurf</strong></summary>

npx -y install-mcp @introfini/mcp-server-zotero-dev --client windsurf

</details>

<details> <summary><strong>Manual Configuration</strong></summary>

Add to your MCP client config:

{
  "mcpServers": {
    "zotero-dev": {
      "command": "npx",
      "args": ["-y", "@introfini/mcp-server-zotero-dev"],
      "env": {
        "ZOTERO_RDP_PORT": "6100"
      }
    }
  }
}

</details>

Restart your AI assistant after adding the configuration.

2. Install MCP Bridge Plugin in Zotero

Download zotero-mcp-bridge.xpi and install:

  1. In Zotero: Tools β†’ Plugins
  2. Click βš™οΈ β†’ Install Plugin From File
  3. Select the downloaded .xpi file
  4. 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)

<details> <summary><strong>UI Inspection</strong> β€” Screenshots, DOM, styles</summary>

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 highlightSelector to add a red border before capture.

</details>

<details> <summary><strong>JavaScript Execution</strong> β€” Run code in Zotero context</summary>

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_pref Set a preference value

Examples: Zotero.Items.getAll(1), Zotero.Prefs.get('export.quickCopy.setting'), ZoteroPane.getSelectedItems()

Tip: Use zotero_inspect_object to explore APIs before writing code. Use zotero_search_prefs to discover preference keys.

</details>

<details> <summary><strong>Build & Scaffold</strong> β€” Integration with zotero-plugin-scaffold</summary>

Tool Description
zotero_scaffold_build Build plugin (dev or production mode)
zotero_scaffold_serve Start dev server with hot reload
zotero_scaffold_lint Run ESLint on plugin source
zotero_scaffold_typecheck Run TypeScript type checking

</details>

<details> <summary><strong>Logs & Debugging</strong> β€” Error console and debug output</summary>

Tool Description
zotero_read_logs Read debug output (Zotero.debug)
zotero_read_errors Read error console entries
zotero_watch_logs Stream logs in real-time
zotero_clear_logs Clear log buffer

</details>

<details> <summary><strong>Plugin Management</strong> β€” Install, reload, inspect</summary>

Tool Description
zotero_plugin_reload Hot reload your dev plugin
zotero_plugin_install Install plugin from XPI path
zotero_plugin_list List installed plugins with version/status

</details>

<details> <summary><strong>Database Access</strong> β€” Read-only SQLite access</summary>

Tool Description
zotero_db_query Execute SELECT query on zotero.sqlite
zotero_db_schema Get table schema information
zotero_db_stats Get database statistics (items, attachments, collections, size)

Note: Database access is read-only and requires Zotero to be closed, or uses a copy of the database.

</details>


πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                        AI Assistant                             β”‚
β”‚                  (Claude, Cursor, Windsurf)                     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                          β”‚ MCP Protocol (stdio)
                          β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                  MCP Server (Node.js/TypeScript)                β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
β”‚  β”‚   Scaffold   β”‚  β”‚     RDP      β”‚  β”‚      Database        β”‚   β”‚
β”‚  β”‚  Integration β”‚  β”‚    Client    β”‚  β”‚      Reader          β”‚   β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                              β”‚ Firefox RDP (port 6100)
                              β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                      Zotero Application                         β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
β”‚  β”‚            MCP Bridge for Zotero                         β”‚   β”‚
β”‚  β”‚         Starts DevToolsServer on launch                  β”‚   β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
β”‚  β”‚              Firefox DevTools Server (built-in)          β”‚   β”‚
β”‚  β”‚           JS Execution β€’ DOM β€’ Console β€’ Screenshots     β”‚   β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
β”‚  β”‚                   Your Plugin (dev)                      β”‚   β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Why this approach?

  • βœ… Lightweight plugin β€” Just enables RDP, Firefox DevTools does the rest
  • βœ… Zero-config after install β€” Just open Zotero normally, no special flags
  • βœ… Rich AI context β€” Screenshots, DOM, and logs help the AI understand your plugin's state
  • βœ… Hot reload β€” Integrates with zotero-plugin-scaffold for instant feedback
  • βœ… Full Zotero access β€” Execute any Zotero API in the privileged context
  • βœ… Cross-platform β€” Works on Linux, Windows, macOS

πŸ”§ Environment Variables

Variable Description Default
ZOTERO_RDP_PORT Remote debugging port 6100
ZOTERO_RDP_HOST Debugging host 127.0.0.1
ZOTERO_DATA_DIR Path to Zotero data directory Auto-detect
ZOTERO_PROFILE_PATH Path to Zotero profile Auto-detect

πŸ“Έ Screenshot Examples

// Capture main Zotero window
await zotero_screenshot({ target: 'main-window' });

// Capture your plugin's panel with highlight
await zotero_screenshot({
  target: 'element',
  selector: '#my-plugin-panel',
  highlightSelector: '#my-plugin-button'
});

// Capture a specific window by ID (use zotero_list_windows to find IDs)
await zotero_screenshot({
  target: 'window',
  windowId: 12345
});

// Capture element after triggering UI action
await zotero_execute_js({ code: 'document.querySelector("#menu").click()' });
await zotero_screenshot({ target: 'element', selector: 'menupopup[state="open"]' });

πŸ§‘β€πŸ’» Development

# Clone and install
git clone https://github.com/introfini/mcp-server-zotero-dev.git
cd mcp-server-zotero-dev
npm install

# Build everything
npm run build

# Build individual packages
npm run build -w mcp-server
npm run build -w zotero-plugin-mcp-rdp

# Run tests
npm test

# Development mode (watch)
npm run dev -w mcp-server

<details> <summary><strong>Project Structure</strong></summary>

mcp-server-zotero-dev/
β”œβ”€β”€ packages/
β”‚   β”œβ”€β”€ mcp-server/               # MCP server (npm package)
β”‚   β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”‚   β”œβ”€β”€ index.ts          # MCP server entry
β”‚   β”‚   β”‚   β”œβ”€β”€ rdp/              # RDP client
β”‚   β”‚   β”‚   β”œβ”€β”€ tools/            # Tool implementations
β”‚   β”‚   β”‚   └── prompts/          # Slash commands
β”‚   β”‚   └── package.json
β”‚   β”‚
β”‚   └── zotero-plugin-mcp-rdp/    # Tiny Zotero plugin (.xpi)
β”‚       β”œβ”€β”€ src/
β”‚       β”‚   └── index.ts          # Starts RDP server
β”‚       β”œβ”€β”€ addon/
β”‚       β”‚   └── manifest.json
β”‚       └── package.json
β”‚
β”œβ”€β”€ docs/                         # Documentation
└── package.json                  # Monorepo root

</details>


πŸ“š Resources


🀝 Contributing

Contributions are welcome! Please:

  1. Follow existing code patterns
  2. Add tests for new features
  3. Update documentation
  4. Ensure npm test and npm run lint pass

πŸ“„ License

MIT Β© introfini


Acknowledgments

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured