io.github.introfini/mcp-server-zotero-dev

平台与服务

by introfini

MCP server enabling AI assistants to build, test, and debug Zotero plugins

什么是 io.github.introfini/mcp-server-zotero-dev

MCP server enabling AI assistants to build, test, and debug Zotero plugins

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

CategoryCapabilities
🎯 UI InspectionScreenshots, DOM tree, element finding, computed styles
💻 JS ExecutionRun code in Zotero context, inspect APIs, test snippets
🔧 Build ToolsScaffold integration for build, serve, hot reload
📋 Logs & ErrorsStream debug output, error console, watch for issues
🗃️ DatabaseRead-only access to zotero.sqlite for debugging
🔌 Plugin ManagementInstall, 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:

bash
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>
bash
npx -y install-mcp @introfini/mcp-server-zotero-dev --client claude-code
</details> <details> <summary><strong>Cursor</strong></summary>
bash
npx -y install-mcp @introfini/mcp-server-zotero-dev --client cursor
</details> <details> <summary><strong>VS Code / Copilot</strong></summary>
bash
npx -y install-mcp @introfini/mcp-server-zotero-dev --client vscode
</details> <details> <summary><strong>Windsurf</strong></summary>
bash
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:

json
{
  "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>
ToolDescription
zotero_screenshotCapture window, element, or region screenshots
zotero_inspect_elementFind elements by CSS selector
zotero_get_dom_treeGet DOM structure of a window/panel
zotero_get_stylesGet computed CSS styles for element
zotero_list_windowsList 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>
ToolDescription
zotero_execute_jsExecute JavaScript in Zotero's privileged context. Auto-wraps code with top-level return statements in IIFE.
zotero_inspect_objectExplore Zotero APIs - list methods and properties of any object (e.g., Zotero.Items)
zotero_open_preferencesOpen Zotero's settings window, optionally to a specific pane (built-in or plugin)
zotero_search_prefsSearch/discover preferences by pattern (e.g., find all prefs containing "debug")
zotero_get_prefGet a preference value
zotero_set_prefSet 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>
ToolDescription
zotero_scaffold_buildBuild plugin (dev or production mode)
zotero_scaffold_serveStart dev server with hot reload
zotero_scaffold_lintRun ESLint on plugin source
zotero_scaffold_typecheckRun TypeScript type checking
</details> <details> <summary><strong>Logs & Debugging</strong> — Error console and debug output</summary>
ToolDescription
zotero_read_logsRead debug output (Zotero.debug)
zotero_read_errorsRead error console entries
zotero_watch_logsStream logs in real-time
zotero_clear_logsClear log buffer
</details> <details> <summary><strong>Plugin Management</strong> — Install, reload, inspect</summary>
ToolDescription
zotero_plugin_reloadHot reload your dev plugin
zotero_plugin_installInstall plugin from XPI path
zotero_plugin_listList installed plugins with version/status
</details> <details> <summary><strong>Database Access</strong> — Read-only SQLite access</summary>
ToolDescription
zotero_db_queryExecute SELECT query on zotero.sqlite
zotero_db_schemaGet table schema information
zotero_db_statsGet 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

code
┌─────────────────────────────────────────────────────────────────┐
│                        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

VariableDescriptionDefault
ZOTERO_RDP_PORTRemote debugging port6100
ZOTERO_RDP_HOSTDebugging host127.0.0.1
ZOTERO_DATA_DIRPath to Zotero data directoryAuto-detect
ZOTERO_PROFILE_PATHPath to Zotero profileAuto-detect

📸 Screenshot Examples

typescript
// 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

bash
# 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>
code
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

常见问题

io.github.introfini/mcp-server-zotero-dev 是什么?

MCP server enabling AI assistants to build, test, and debug Zotero plugins

相关 Skills

MCP构建

by anthropics

Universal
热门

聚焦高质量 MCP Server 开发,覆盖协议研究、工具设计、错误处理与传输选型,适合用 FastMCP 或 MCP SDK 对接外部 API、封装服务能力。

想让 LLM 稳定调用外部 API,就用 MCP构建:从 Python 到 Node 都有成熟指引,帮你更快做出高质量 MCP 服务器。

平台与服务
未扫描111.8k

Slack动图

by anthropics

Universal
热门

面向Slack的动图制作Skill,内置emoji/消息GIF的尺寸、帧率和色彩约束、校验与优化流程,适合把创意或上传图片快速做成可直接发送的Slack动画。

帮你快速做出适配 Slack 的动图,内置约束规则和校验工具,少踩上传与播放坑,做表情包和演示都更省心。

平台与服务
未扫描111.8k

MCP服务构建器

by alirezarezvani

Universal
热门

从 OpenAPI 一键生成 Python/TypeScript MCP server 脚手架,并校验 tool schema、命名规范与版本兼容性,适合把现有 REST API 快速发布成可生产演进的 MCP 服务。

帮你快速搭建 MCP 服务与后端 API,脚手架完善、扩展顺手,尤其适合想高效验证服务能力的开发者。

平台与服务
未扫描9.8k

相关 MCP Server

Slack 消息

编辑精选

by Anthropic

热门

Slack 是让 AI 助手直接读写你的 Slack 频道和消息的 MCP 服务器。

这个服务器解决了团队协作中需要 AI 实时获取 Slack 信息的痛点,特别适合开发团队让 Claude 帮忙汇总频道讨论或发送通知。不过,它目前只是参考实现,文档有限,不建议在生产环境直接使用——更适合开发者学习 MCP 如何集成第三方服务。

平台与服务
83.1k

by netdata

热门

io.github.netdata/mcp-server 是让 AI 助手实时监控服务器指标和日志的 MCP 服务器。

这个工具解决了运维人员需要手动检查系统状态的痛点,最适合 DevOps 团队让 Claude 自动分析性能数据。不过,它依赖 NetData 的现有部署,如果你没用过这个监控平台,得先花时间配置。

平台与服务
78.3k

by d4vinci

热门

Scrapling MCP Server 是专为现代网页设计的智能爬虫工具,支持绕过 Cloudflare 等反爬机制。

这个工具解决了爬取动态网页和反爬网站时的头疼问题,特别适合需要批量采集电商价格或新闻数据的开发者。不过,它依赖外部浏览器引擎,资源消耗较大,不适合轻量级任务。

平台与服务
34.9k

评论