Mcp Server Zotero Dev

io.github.introfini由 GitHub 账号 introfini 发布v1.1.4更新于 Oct 24, 2026

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

概览

AI 生成的概览

本地 MCP 服务器,让 AI 助手通过 Firefox 远程调试协议操控运行中的 Zotero,以构建、测试和调试 Zotero 7+ 插件。

可以做什么
  • 连接 Zotero,在其特权上下文中执行 JavaScript,读取和设置首选项,检查对象并打开首选项窗口
  • 检查界面:截图、按 CSS 选择器查找 DOM 元素、读取 DOM 树和计算样式、列出已打开窗口
  • 读取、监视和清空 Zotero 调试日志与错误控制台信息
  • 使用 zotero-plugin-scaffold 构建插件、启动热重载开发服务器、运行 ESLint 和 TypeScript 类型检查
  • 列出插件、从本地 XPI 安装插件并重新加载插件
  • 对 Zotero 数据库执行只读 SELECT 查询,查看表结构与统计信息
适用场景
适合在开发或维护 Zotero 7+ 插件时使用,让助手直接检查运行中的 Zotero 界面、执行代码、读取日志与错误,并完成构建和重载步骤,无需切换工具。
运行要求
通过 npx 或全局 npm 安装后本地运行;需要 Node.js 20 或更高版本、正在运行的 Zotero 7+,以及单独安装的 MCP Bridge for Zotero 插件,使 DevTools 服务监听 6100 端口。可选环境变量 ZOTERO_RDP_HOST、ZOTERO_RDP_PORT、ZOTERO_DATA_DIR 和 ZOTERO_PROFILE_PATH 可覆盖默认值。
安装前请注意
助手可在 Zotero 的特权 chrome 上下文中执行任意 JavaScript、修改首选项、从 XPI 文件安装插件并清空日志,因此操作会影响真实的 Zotero 配置和文库。数据库访问被描述为只读 SELECT 查询。RDP 端口默认无身份验证,应仅绑定本机。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Mcp Server Zotero Dev,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

MCP Server for Zotero Plugin Development

An MCP (Model Context Protocol) server that enables AI assistants to build, test, and debug Zotero 7+ plugins. It provides 25 tools for UI inspection, JavaScript execution, build integration, logging, database access, and plugin management.

How it works: Zotero 7+ is built on Firefox ESR, so this server communicates with Zotero through Firefox's built-in Remote Debugging Protocol (RDP). A small companion plugin (MCP Bridge for Zotero) starts the DevTools server inside Zotero, and this MCP server connects to it.

AI Assistant (Claude, Cursor, Windsurf, etc.)         | MCP Protocol (stdio)         v    MCP Server (this package)         | Firefox RDP (TCP port 6100)         v    Zotero + MCP Bridge Plugin

Prerequisites

  • Node.js >= 20
  • Zotero 7+ (release, beta, or dev build)
  • MCP Bridge for Zotero plugin installed in Zotero — download the latest XPI

Installing the MCP Bridge plugin

  1. Download zotero-mcp-bridge-*.xpi from GitHub Releases
  2. In Zotero: Tools > Add-ons > gear icon > Install Add-on From File...
  3. Select the downloaded .xpi file
  4. Restart Zotero

The plugin automatically starts a DevTools server on port 6100 when Zotero launches.

Setup

Claude Desktop

Add to your claude_desktop_config.json:

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

Claude Code

bash
claude mcp add zotero-dev -- npx -y @introfini/mcp-server-zotero-dev

Cursor / Windsurf / Other MCP clients

Configure the MCP server with:

  • Command: npx
  • Arguments: -y @introfini/mcp-server-zotero-dev

Or install globally:

bash
npm install -g @introfini/mcp-server-zotero-dev

Tools (25)

JavaScript Execution & Inspection

ToolDescription
zotero_pingTest connection to Zotero and get version info
zotero_execute_jsExecute JavaScript in Zotero's privileged chrome context
zotero_get_prefGet a Zotero preference value
zotero_set_prefSet a Zotero preference value
zotero_search_prefsSearch and list Zotero/Firefox preferences
zotero_inspect_objectInspect a JavaScript object to discover methods and properties
zotero_open_preferencesOpen Zotero's preferences window, optionally navigating to a pane

UI Inspection

ToolDescription
zotero_screenshotCapture a screenshot of Zotero (main window, specific window, or element)
zotero_inspect_elementFind DOM elements by CSS selector
zotero_get_dom_treeGet a simplified DOM tree structure
zotero_get_stylesGet computed CSS styles for an element
zotero_list_windowsList all open Zotero windows

Logging & Debugging

ToolDescription
zotero_read_logsRead Zotero's debug log output
zotero_read_errorsRead errors from Zotero's error console
zotero_clear_logsClear the debug log buffer and error console
zotero_watch_logsStart/stop watching for new log messages

Build Integration

ToolDescription
zotero_scaffold_buildBuild a Zotero plugin using zotero-plugin-scaffold
zotero_scaffold_serveStart/stop the dev server with hot reload
zotero_scaffold_lintRun ESLint on a plugin project
zotero_scaffold_typecheckRun TypeScript type checking

Plugin Management

ToolDescription
zotero_plugin_reloadReload a Zotero plugin
zotero_plugin_listList all installed plugins
zotero_plugin_installInstall a plugin from a local XPI file

Database Access (Read-only)

ToolDescription
zotero_db_queryExecute a SELECT query on Zotero's database
zotero_db_schemaGet database schema information
zotero_db_statsGet database statistics

Prompts (5)

PromptDescription
setup-devSet up Zotero plugin development environment from scratch
debug-pluginConnect to Zotero and start debugging your plugin
fix-errorsFind and fix errors from Zotero's error console
inspect-apiInteractive exploration of Zotero's JavaScript APIs
migrate-z7Help migrate a plugin from Zotero 6 to Zotero 7

Configuration

Environment variables (all optional):

VariableDefaultDescription
ZOTERO_RDP_PORT6100RDP port to connect to
ZOTERO_RDP_HOSTlocalhostRDP host address
ZOTERO_DATA_DIRauto-detectedZotero data directory path
ZOTERO_PROFILE_PATHauto-detectedZotero profile path

Troubleshooting

"Cannot connect to Zotero"

  1. Make sure Zotero is running
  2. Verify the MCP Bridge plugin is installed (Tools > Add-ons)
  3. Restart Zotero after installing the plugin
  4. Check port 6100 is not blocked: lsof -i :6100

"Port already in use"

  • Another Zotero instance may be running, or Zotero was started with the -debugger flag (which uses port 6000). The MCP Bridge uses port 6100 to avoid conflicts.

License

MIT

来源:packages/mcp-server/README.md,提交 24f8f50

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

2
  1. v1.1.4最新Sep 20, 2026
  2. v1.1.3Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分