mcp-server-zotero-dev
v1.1.5MCP server enabling AI assistants to build, test, and debug Zotero plugins
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
zotero_ping
Test connection to Zotero and get version info. Use this to verify that Zotero is running and the MCP Bridge for Zotero plugin is active.
zotero_execute_js
Execute JavaScript code in Zotero's privileged chrome context. Has full access to Zotero APIs (Zotero.*, ZoteroPane, etc.). Use for testing code snippets, inspecting state, or performing actions. Prefer a dedicated tool when one fits the question (zotero_db_query for library data, zotero_read_logs/zotero_read_errors for output, zotero_inspect_object for API discovery); reach for raw JS only when none does. Code with top-level 'return' statements is auto-wrapped in an IIFE. Tip: For complex objects, use JSON.stringify(obj) to get full data. IMPORTANT: Before calling unknown APIs, use zotero_ins…
| Parameter | Type | Description |
|---|---|---|
code * | string | JavaScript code to execute. Can be async (automatically awaited). You can use 'return' at top level - code will be auto-wrapped in IIFE. |
awaitPromise | boolean | Whether to await the result if it's a Promise (default: true) |
zotero_get_pref
Get a Zotero preference value. Common prefs: extensions.zotero.*, general.*, export.*
| Parameter | Type | Description |
|---|---|---|
key * | string | Preference key (e.g., 'extensions.zotero.debug.log') |
zotero_set_pref
Set a Zotero preference value. Use with caution - some preferences require restart.
| Parameter | Type | Description |
|---|---|---|
key * | string | Preference key |
value * | Value to set (string, number, or boolean) |
zotero_search_prefs
Search and list Zotero/Firefox preferences. Use to discover available preference keys before using zotero_get_pref/zotero_set_pref. Can filter by branch prefix (e.g., 'extensions.zotero.') and/or substring pattern.
| Parameter | Type | Description |
|---|---|---|
branch | string | Preference branch to list (e.g., 'extensions.zotero.', 'general.'). Defaults to 'extensions.zotero.' if not specified. |
limit | number | Maximum number of results to return (default: 50) |
pattern | string | Substring filter for preference names (case-insensitive) |
zotero_inspect_object
Inspect a Zotero/JavaScript object to discover its methods and properties. Use to explore APIs like Zotero.Items, ZoteroPane, Zotero.Prefs without manual JS execution. Returns methods with signatures and properties with their types/values.
| Parameter | Type | Description |
|---|---|---|
path * | string | Object path to inspect (e.g., 'Zotero', 'Zotero.Items', 'ZoteroPane', 'Zotero.Prefs') |
depth | number | Prototype chain depth to inspect (default: 2, max: 5) |
filter | string | What to include: 'all' (default), 'methods' only, 'properties' only, or 'own' (only own properties, not inherited) |
pattern | string | Filter member names by substring (case-insensitive) |
zotero_open_preferences
Open Zotero's preferences/settings window. Optionally navigate directly to a specific pane. For built-in panes, use: 'general', 'sync', 'export', 'cite', 'advanced'. For plugin panes, use the plugin ID (e.g., 'zotseek@zotero.org' or just 'zotseek').
| Parameter | Type | Description |
|---|---|---|
paneId | string | Optional pane ID to navigate to. Built-in: 'general', 'sync', 'export', 'cite', 'advanced'. For plugins: use the plugin ID (e.g., 'zotseek@zotero.org'). If omitted, opens to the last viewed pane. |
zotero_screenshot
Capture a screenshot of Zotero. Can capture the main window, a specific window, or a specific element by CSS selector. Optionally highlight an element with a red border.
| Parameter | Type | Description |
|---|---|---|
format | string | Image format (default: png) |
highlightSelector | string | CSS selector for element to highlight with red border before capture |
scale | number | Scale factor for the screenshot (default: 1) |
selector | string | CSS selector for element to capture (required if target='element') |
target | string | What to capture: main-window (default), specific window, or element |
windowId | number | Window outerWindowID (use zotero_list_windows to find). Required if target='window' |
zotero_inspect_element
Find DOM elements by CSS selector and return their details. Returns: tagName, id, className, attributes, text content, bounding rect, child count.
| Parameter | Type | Description |
|---|---|---|
selector * | string | CSS selector to find elements |
limit | number | Maximum number of elements to return (default: 10) |
windowId | number | Window outerWindowID (optional, defaults to main window) |
zotero_get_dom_tree
Get a simplified DOM tree structure. Shows tag names, IDs, classes, and child counts for navigation.
| Parameter | Type | Description |
|---|---|---|
depth | number | Maximum depth to traverse (default: 3) |
selector | string | CSS selector for root element (default: document.documentElement) |
windowId | number | Window outerWindowID (optional, defaults to main window) |
zotero_get_styles
Get computed CSS styles for an element. Useful for debugging layout and styling issues.
| Parameter | Type | Description |
|---|---|---|
selector * | string | CSS selector for the element |
properties | array | Specific CSS properties to return (default: common layout properties) |
windowId | number | Window outerWindowID (optional) |
zotero_list_windows
List all open Zotero windows with their IDs, types, and titles. Use the windowId in other tools to target specific windows.
zotero_click_element
Click an element in a Zotero window by CSS selector (toolbar/menu button, preference control, list row, etc.). Resolves light DOM first, then pierces open shadow roots (Zotero's XUL custom elements keep internals in shadow DOM). If the selector matches several elements, use index to pick one. By default calls element.click() (which fires the XUL command for buttons/menuitems); set mouseEvents=true to dispatch a synthesized mousedown/mouseup/click sequence for content that needs real mouse events. Cannot dismiss a BLOCKING native modal dialog (Services.prompt.confirmEx) — see the module note.
| Parameter | Type | Description |
|---|---|---|
selector * | string | CSS selector for the element to click |
index | number | Which match to click when the selector matches several (0-based, default 0) |
mouseEvents | boolean | Dispatch synthesized mousedown/mouseup/click instead of element.click() (default false). Use for HTML content that needs real mouse events. Note: these events are untrusted (isTrusted=false); some nat… |
windowId | number | Window outerWindowID (optional, defaults to main window) |
zotero_send_keys
Type text into an element in a Zotero window (an input/textarea or any contenteditable). If a selector is given the element is focused first (light DOM, then open shadow roots); otherwise the window's active element is used. Fires input/change events so listeners react. Optionally clear first and/or press Enter afterwards. Note: a few widgets (e.g. Zotero's quick-search) only fully react to their own command handler, not a raw input event — prefer a direct field where possible.
| Parameter | Type | Description |
|---|---|---|
text * | string | Text to type into the element |
clear | boolean | Clear the field before typing (default false) |
pressEnter | boolean | Dispatch an Enter keydown/keypress/keyup after typing (default false). Note: these events are untrusted (isTrusted=false) and some widgets ignore them — a direct input + change is more reliable wher… |
selector | string | CSS selector for the target field (optional; defaults to the active element) |
windowId | number | Window outerWindowID (optional, defaults to main window) |
zotero_read_logs
Read Zotero's debug log output. Shows recent debug messages from Zotero.debug() calls.
| Parameter | Type | Description |
|---|---|---|
filter | string | Filter logs containing this string (case-insensitive) |
level | string | Filter by log level (default: all) |
lines | number | Number of recent lines to return (default: 100) |
zotero_read_errors
Read errors from Zotero's error console. Returns JavaScript errors with stack traces and source locations.
| Parameter | Type | Description |
|---|---|---|
lines | number | Number of recent errors to return (default: 20) |
zotero_clear_logs
Clear the debug log buffer and error console.
zotero_watch_logs
Start/stop watching for new log messages. Use action='start' to begin collecting, 'get' to retrieve collected logs, 'stop' to end.
| Parameter | Type | Description |
|---|---|---|
action * | string | Action to perform |
zotero_scaffold_build
Build a Zotero plugin project using zotero-plugin-scaffold. Runs 'npm run build' or 'npm run build:dev' in the project directory.
| Parameter | Type | Description |
|---|---|---|
mode | string | Build mode (default: development) |
projectPath | string | Path to plugin project (default: current working directory) |
zotero_scaffold_serve
Start/stop the zotero-plugin-scaffold dev server with hot reload. This watches for changes and automatically rebuilds/reloads the plugin.
| Parameter | Type | Description |
|---|---|---|
action * | string | Action to perform |
projectPath | string | Path to plugin project (default: current working directory) |
zotero_scaffold_lint
Run ESLint on a Zotero plugin project.
| Parameter | Type | Description |
|---|---|---|
fix | boolean | Automatically fix problems (default: false) |
projectPath | string | Path to plugin project (default: current working directory) |
zotero_scaffold_typecheck
Run TypeScript type checking on a Zotero plugin project.
| Parameter | Type | Description |
|---|---|---|
projectPath | string | Path to plugin project (default: current working directory) |
zotero_plugin_reload
Reload a Zotero plugin. If a plugin ID is provided, reloads that specific plugin. Otherwise attempts to reload based on the current project.
| Parameter | Type | Description |
|---|---|---|
pluginId | string | Plugin ID to reload (e.g., 'my-plugin@example.com'). Use zotero_plugin_list to find IDs. |
zotero_plugin_list
List all installed Zotero plugins/add-ons with their IDs, names, versions, and status.
zotero_plugin_install
Install a Zotero plugin from a local XPI file. The plugin will be installed and Zotero may need to be restarted.
| Parameter | Type | Description |
|---|---|---|
path * | string | Path to the XPI file to install |
zotero_db_query
Execute a SELECT query on Zotero's database. Only SELECT queries are allowed for safety. Note: Database may be locked if Zotero is running - a copy may be used.
| Parameter | Type | Description |
|---|---|---|
query * | string | SQL SELECT query to execute |
limit | number | Maximum rows to return (default: 100, max: 1000) |
params | array | Query parameters for prepared statements |
zotero_db_schema
Get database schema information. If table is specified, returns columns for that table. Otherwise returns list of all tables.
| Parameter | Type | Description |
|---|---|---|
table | string | Table name to get schema for (optional) |
zotero_db_stats
Get database statistics: item counts, file size, etc.