📖 中文版使用手册
llm-for-zotero is a plugin for Zotero that integrates Large Language Models directly into the Zotero PDF reader. Unlike tools that require uploading PDFs to a web portal, this plugin lets you chat with your papers without leaving Zotero. It sits quietly in the reader sidebar, ready whenever you need it.

Ask questions about any open PDF and jump from model citations back to the source passage.
OpenAI, Gemini, DeepSeek, local OpenAI-compatible models, and more.
An autonomous agent that manages your library, runs terminal commands, and accesses local files — with approval before changes are applied.
Use high-fidelity PDF parsing that preserves tables, equations, figures, and complex layouts.
gpt-5.4 without a separate API key.llm-for-zotero.Download the latest .xpi release
Go to the Releases Page and download the latest .xpi file.
Install the add-on in Zotero
Open Zotero → Tools → Add-ons → click the gear icon → Install Add-on From File → select the .xpi file.
Restart Zotero Restart Zotero to complete the installation. The plugin automatically checks for future updates on startup.
Open Preferences → navigate to the llm-for-zotero tab.

The plugin natively supports multiple provider protocols: responses_api, openai_chat_compat, anthropic_messages, gemini_native, and more.
| API URL | Model | Reasoning Levels | Notes |
|---|---|---|---|
https://api.openai.com/v1/responses |
gpt-5.4 | default, low, medium, high, xhigh | PDF uploads supported |
https://api.openai.com/v1/responses |
gpt-5.4-pro | medium, high, xhigh | PDF uploads supported |
https://api.deepseek.com/v1 |
deepseek-chat | default | |
https://api.deepseek.com/v1 |
deepseek-reasoner | default | |
https://generativelanguage.googleapis.com |
gemini-3-pro-preview | low, high | |
https://generativelanguage.googleapis.com |
gemini-2.5-flash | medium | |
https://generativelanguage.googleapis.com |
gemini-2.5-pro | default, low, high | |
https://api.moonshot.ai/v1 |
kimi-k2.5 | default |
You can also set up multiple providers, each with multiple models for different tasks, such as a multimodal model for figures and a text model for summaries. Cross-check answers across models when you want broader coverage.
You can set different reasoning levels per model in the conversation panel, such as default, low, medium, high, and xhigh, depending on model support. You can also adjust hyperparameters like temperature and max_tokens_output for more creative or more deterministic responses.
On the first message, the model loads the full paper content as context. Follow-up questions use focused retrieval from the same paper, keeping the conversation fast and relevant.
The plugin supports multiple conversation contexts:
| Mode | Description |
|---|---|
| Paper conversation | Chat about a specific open PDF. Context is drawn from that paper. |
| Global conversation | Library-wide chat, not tied to any specific paper. |
| Note conversation | Chat while editing a Zotero note, with note content as context. |

When you ask a question, the model generates answers grounded in the paper’s content. Click any citation to jump straight to the source passage in your Zotero library.

Get a concise summary of any paper in seconds. The summary is generated from the full text of the open PDF, and you can customize the prompt to focus on methodology, results, implications, or anything else.

Select any complex paragraph or technical term in the PDF and ask the model to explain it. You can add up to 5 pieces of context from the paper or previous answers to refine the explanation.
An optional pop-up automatically suggests adding selected text to the chat. This can be disabled in settings if you prefer manual control.

Take a screenshot of any figure, chart, or diagram and ask the model to interpret it. The plugin supports up to 10 screenshots at a time.

Open multiple papers in different tabs and compare them side by side. Type / in the chat input to cite another open paper as additional context. You can reference up to 10 papers in a single conversation, enabling rich cross-paper analysis.

Upload documents from your local drive as additional context. Supported formats include PDF, DOCX, PPTX, TXT, and Markdown.

Save any answer or selected text directly to your Zotero notes with one click. This integrates seamlessly with your existing note-taking workflow — no copy-pasting required.

Conversations are automatically saved locally and associated with the paper you’re reading. You can:

Customize quick-action presets to match your research workflow. Built-in presets include:
When enabled, the LLM becomes an autonomous agent that can read, search, and write within your Zotero library — and beyond. In addition to library operations, the agent can execute terminal commands and access files on your local machine, functioning like a coding agent inside Zotero. All write operations require your explicit approval before execution.
These tools let the agent explore your library and the scholarly web without modifying anything.
| Tool | Description |
|---|---|
query_library |
Search and list Zotero items, collections, related papers, and duplicates. Supports multiple query modes (list, search, duplicates, unfiled, untagged) with filtering by collection, PDF status, and tags |
read_library |
Read structured item state: metadata, notes, annotations, attachments (all types), and collection membership |
inspect_pdf |
Advanced PDF operations: read front matter, search pages, retrieve evidence, render pages, capture the active reader view, and read specific chunks or full documents |
search_literature_online |
Search live scholarly sources (OpenAlex, arXiv, EuropePMC) or fetch external metadata (CrossRef, Semantic Scholar). Modes: recommendations, references, citations, search, metadata |
All write tools require human confirmation before changes take effect.
| Tool | Description |
|---|---|
apply_tags |
Add or remove tags on one or more papers, with batch support |
update_metadata |
Update metadata fields (title, authors, DOI, journal, abstract, etc.) on items |
move_to_collection |
Move items between Zotero collections |
manage_collections |
Create or delete collections (folders) with optional nesting |
edit_current_note |
Create or edit Zotero notes, with local image import support |
import_identifiers |
Import papers by DOI, arXiv ID, or other identifiers — Zotero auto-retrieves metadata |
import_local_files |
Import local files (PDFs, documents) from the filesystem into Zotero |
manage_attachments |
Add or remove attachments (PDFs, supplementary files) on items |
merge_items |
Merge duplicate items: keeps master, moves all children from duplicates, then trashes duplicates |
trash_items |
Move items to trash |
undo_last_action |
Revert the last approved write batch |
The agent includes two system-level tools that turn it into a coding agent capable of running scripts and processing data — all from within Zotero.
| Tool | Description |
|---|---|
run_command |
Execute shell commands on your local machine (zsh on macOS, bash on Linux, cmd.exe on Windows). Pipes, redirects, globbing, and all shell features work. 300-second timeout per command |
file_io |
Read and write files on your local filesystem. Supports UTF-8 and other encodings |
Example use cases:
pandoc, ffmpeg, pdftotext) as part of an agent workflow.The agent provides high-level actions for common library workflows. These chain multiple tools together automatically.
| Action | What it does |
|---|---|
| Audit Library | Scan your library (or a collection) for items with incomplete metadata — missing abstract, DOI, tags, or PDF attachment. Optionally saves the report as a Zotero note |
| Auto-Tag | Find all papers without tags and open a batch tag-assignment dialog for your review |
| Discover Related | Find related papers to a seed paper through recommendations, references, or citations from scholarly sources |
| Sync Metadata | Fetch external metadata (CrossRef, Semantic Scholar) and apply updates across items |
| Organize Unfiled | Find unfiled items and organize them into collections via an interactive review workflow |
The plugin runs a built-in Model Context Protocol (MCP) server, allowing external AI agents and tools to interact with your Zotero library programmatically.
http://localhost:23119/llm-for-zotero/mcpinitialize, tools/list, tools/callThis means you can connect any MCP-compatible AI agent (e.g. Claude Desktop, Cursor, custom agents) to your Zotero library and use all the tools listed above.
The agent can chain multiple tools together to accomplish complex tasks, such as finding a paper, reading its metadata, searching for related work, and writing a summary note.






All write operations go through a human-in-the-loop confirmation workflow:
undo_last_action to revert.WebChat mode sends your questions directly to chatgpt.com through a browser extension — no API key needed. Queries are relayed from Zotero to the ChatGPT web interface, and responses stream back into the plugin.
1. Download the browser extension:
Go to github.com/yilewang/sync-for-zotero → Releases, download the latest sync-for-zotero-extension.zip, and unzip it to a folder on your computer.
2. Install the extension (sideload):
chrome://extensions3. Configure the plugin:
In Zotero → Preferences → llm-for-zotero:
| Setting | Value |
|---|---|
| Auth Mode | WebChat |
| Model | (auto-set to chatgpt.com) |
4. Start chatting:
Open a ChatGPT tab in your browser and keep it open. In Zotero, the plugin panel shows a “chatgpt.com” indicator with a connection dot (green = connected, red = not detected). Type a question and send.
/), and the reference picker (@) are disabled in WebChat mode.If you have a ChatGPT Plus subscription, you can use Codex auth to access models like gpt-5.4 without a separate API key. The plugin reuses your ChatGPT login via the Codex CLI.
Special thanks to @jianghao-zhang for contributions to this feature.
1. Install the Codex CLI (one-time):
# macOS / Linux (requires Node.js 18+)
npm install -g @openai/codex
# macOS alternative (no Node.js needed)
brew install --cask codex
2. Log in with your ChatGPT account:
codex login
A browser window opens — sign in with your ChatGPT Plus account. Credentials are saved to ~/.codex/auth.json.
3. Configure the plugin:
In Zotero → Preferences → llm-for-zotero:
| Setting | Value |
|---|---|
| Auth Mode | codex auth |
| API URL | https://chatgpt.com/backend-api/codex/responses |
| Model | e.g. gpt-5.4 |
Click Test Connection to verify.

~/.codex/auth.json (or $CODEX_HOME/auth.json)./files upload + file_id attachment flow is not supported yet.MinerU is an advanced PDF parsing engine that extracts high-fidelity Markdown from PDFs while preserving tables, equations, figures, and complex layouts that standard text extraction often mangles.

When enabled, the plugin sends your PDF to the MinerU API for parsing and caches the result locally. All later interactions with that paper reuse the MinerU-parsed content, giving the model richer and more accurate context.
The plugin provides a shared community proxy so MinerU works out of the box without an API key, but the shared quota is limited. For heavier usage:
When a personal API key is provided, the plugin calls the MinerU API directly at https://mineru.net/api/v4. Without a key, it uses the community proxy.
Is it free to use?
Yes, the plugin is completely free and open source (AGPL v3). You only pay for API calls to your chosen provider. With Codex auth, ChatGPT Plus subscribers can use their existing subscription without a separate API key.
Does it work with local models?
Yes. As long as the local model provides an OpenAI-compatible HTTP API, you can connect it by entering the appropriate API Base URL and key in settings.
Is my data used to train models?
No. You use your own API key, so data privacy is governed by the terms of your chosen provider.
How do I report a bug or request a feature?
Please open an issue on GitHub.
Contributions are welcome! Whether it’s bug reports, feature requests, or pull requests — feel free to open an issue or submit a PR on GitHub.
If you find this plugin helpful, consider:
