Connecting Zotero to AI via MCP: A Complete Zero-Cost Guide to Generating Real Literature Reviews

Use MCP to bridge Zotero and AI for reliable, hallucination-free literature reviews at zero cost.
By connecting a local Zotero library to AI models via the MCP protocol, researchers can generate literature reviews grounded in real citations — eliminating the hallucination problem that plagues standard AI writing tools. This guide covers the full setup: installing the UV toolchain, enabling Zotero's local API, and configuring OpenCode with the free DeepSeek V4 Flash model.
For researchers and students, literature reviews are often the most time-consuming and error-prone part of academic work. The core pain point of traditional AI writing tools is that they "fabricate" references that look real but don't actually exist. By connecting your local Zotero library to AI models via the MCP protocol, we can finally let AI generate reliable reviews based on real literature. This article, based on a hands-on demonstration by a Bilibili creator, walks through the complete configuration process and real-world results.
Core Concept: How MCP Acts as a Bridge
The heart of this solution is MCP (Model Context Protocol). It acts as a bridge connecting your local Zotero library to AI models.
MCP is a standardized protocol proposed and open-sourced by Anthropic in late 2024, designed to solve the interoperability problem between AI models and external data sources and tools. Before MCP, every AI application that wanted to integrate an external tool (such as a database, file system, or API) required developers to write a custom adapter — costly and hard to reuse. MCP defines a unified server/client communication specification, allowing any MCP-compatible AI client to plug in and call any MCP server's capabilities out of the box. Its architecture has three layers: MCP Host (AI clients like Claude or OpenCode), MCP Client (the protocol communication layer), and MCP Server (the service that actually provides data or tool capabilities, such as a Zotero connector). This design is analogous to the USB standard — as long as a device conforms to the spec, no custom adaptation is needed.
Unlike asking AI to generate citations "from memory," once MCP is connected, the AI can directly read all the papers in your Zotero library — including metadata like titles, authors, abstracts, and keywords. This means every citation in the AI's output comes from your real literature library, fundamentally solving the AI hallucination problem.
AI hallucination refers to large language models generating content that appears plausible but is actually inaccurate or entirely fabricated. In academic citation scenarios, this is particularly serious: models have absorbed the writing patterns of academic papers during training, and can generate fake citations with high confidence — including invented author names, journal titles, volume numbers, and publication years — that are formatted and structured so convincingly they're hard to detect. At a technical level, hallucination stems from the very nature of language models: they are probability-based text completion systems, optimized to generate outputs that "sound reasonable" rather than outputs that are "guaranteed to be true." RAG (Retrieval-Augmented Generation) is the mainstream approach to solving this problem today, and its core idea aligns with the approach in this article: provide the model with a retrievable real knowledge base so that generated content is grounded in verifiable sources, rather than relying on the model's "memory" stored in its parameters.
The entire configuration process has three main steps: installing the Python toolchain, enabling Zotero's local permissions, and configuring the AI client. Let's break each one down.
Step 1: Install the UV Toolchain
First, you need to install a Python toolchain manager called UV. It manages the Python environment required to run MCP services.
UV is a next-generation Python package and environment management tool developed by the Astral team using Rust. Released in 2024, it quickly gained widespread attention in the developer community. Compared to traditional pip + virtualenv or conda setups, UV's core advantages are its extreme speed (typically 10–100x faster than pip) and its integrated Python version management. In MCP service deployment, UV's value lies in its ability to create isolated Python virtual environments for each MCP server and automatically manage dependencies, preventing package version conflicts between different tools. With the uvx command, users can fetch and run an MCP service in one step — no manual environment creation or dependency installation needed — greatly reducing deployment complexity. This is the main reason MCP's official documentation recommends UV as the Python runtime management tool.
The operation is straightforward: copy the official one-line installation command and run it directly in Windows PowerShell. Once the command completes, UV is installed.
After installation, there is one critical step — adding UV's path to your system environment variables — otherwise subsequent calls will fail. A practical tip: if you're not familiar with configuring environment variables, you can delegate this entirely to the AI model.
The way to do it: tell OpenCode the installation command and the requirement to "add to environment variables," and let it handle the configuration. Using AI to configure AI dramatically lowers the technical barrier.
Step 2: Enable Zotero's Local Communication Permission
Once the environment is set up, you need to tell Zotero to "open the door" and allow external programs to read its data.
Zotero is an open-source reference management tool developed by George Mason University, with over 9 million registered users and one of the most widely used academic reference managers in the world. Its Local API feature allows third-party programs running on the same computer to exchange data with the Zotero client via HTTP requests, listening on port 23119 by default. Once enabled, external programs can query library entries, read metadata (title, author, abstract, DOI, tags, etc.), access attachments, and perform write operations (such as adding new entries) through a standard REST interface. The Zotero MCP service is built on top of this local API — it serves as a middleware layer, translating natural language queries from the AI client into structured calls to the local API, then formatting the returned literature data and injecting it into the AI's context window. A key advantage of this architecture is that data always stays local — your private library never needs to be uploaded to any cloud service.
Open Zotero and navigate to: Edit → Preferences → Advanced. In the advanced settings, find the option "Allow other applications on this computer to communicate with Zotero", check it, then close the settings.

This step is critical to whether the entire solution works. Only with this permission enabled can the MCP service actually access your Zotero library. Once checked, the Zotero setup is complete.
Step 3: Configure the AI Client
The final step is to configure your AI client. This solution is quite compatible, supporting multiple mainstream tools including OpenCode, the Claude client, and AntiGravity.
Using OpenCode as an Example
The demo primarily covers OpenCode configuration. The approach continues the "let AI do the configuring" philosophy: copy the MCP installation command directly to OpenCode and let it automatically set up the environment. After configuration, you can verify that the relevant entries have been correctly written to OpenCode's configuration directory.

Configuring Other Clients
If you use the Claude client, you'll need to locate the corresponding configuration file path and edit it manually. For AntiGravity, similarly paste the MCP command to it and let it automatically modify the configuration file.
The core principle is simple: whichever AI you want to call Zotero, give that AI the configuration command. Once configured, you can call your literature library directly through natural language conversation.
Real-World Results: Generating a Real Literature Review for Free
With everything configured, the demo creator ran an actual test. He created a new folder, selected papers from his library on the topic of "Physical Activity," opened OpenCode in the terminal, and started a conversation.
Model Choice: The Free DeepSeek V4 Flash
One highlight worth noting: the creator chose the DeepSeek V4 Flash model because it is completely free in OpenCode.
DeepSeek is a large language model series developed by DeepSeek (Hangzhou) Artificial Intelligence Co., Ltd. It has attracted widespread attention in the global AI community for its strong reasoning performance and relatively low cost. The "Flash" series typically refers to a lightweight, fast-inference variant that significantly reduces computational cost while retaining core capabilities, which is why some platforms offer it free of charge or at low cost. Context window is a key concept for understanding a model's capability limits: it refers to the maximum amount of text the model can "see" and process in a single conversation, usually measured in tokens (one Chinese character is roughly 1.5–2 tokens). For literature review tasks, a larger context window means the model can reference more papers at once, resulting in more comprehensive coverage.
According to the creator, the free version is nearly identical in functionality to the official version, with fast response times. The only difference is that the context length is reduced to one-quarter. But for literature retrieval and review drafting in academic contexts, this context length is already practical. Users can work around the limitation through batch retrieval and segmented review strategies, or switch to the full-context paid model when handling large-scale literature.
Retrieval and Review Capabilities
In practice, you can ask the AI to retrieve literature in natural language — for example, "search for papers on [keyword]" or find papers by author name. The demo creator asked the AI to write a review on the topic of "Physical Activity."

The AI automatically searched all relevant papers in the Zotero library and compiled them into a coherent piece. Beyond calling local literature, it can also search for related articles online when connected to the internet and save them directly to your Zotero library — and these newly added papers are all real, verifiable sources.
Output Quality Verification
The quality of the generated review was impressive. The article comprehensively covered multiple research dimensions related to physical activity — from urban space and air quality to psychological factors — synthesizing existing literature into a complete narrative.

Most importantly, the verification of citation authenticity held up. The creator cross-checked the citations in the text one by one — for example, "Worldwide 2020" and "The Effect of Video Activity" — and confirmed they all genuinely exist in the Zotero library with accurate citation content. This is the greatest value of this approach compared to ordinary AI writing tools.
Summary and Usage Recommendations
The combination of Zotero + MCP + OpenCode provides a low-cost, highly reliable solution for academic writing. Its three core advantages are:
- Authentic, reliable citations: All references come from your local Zotero library, eliminating AI fabrication at the source
- Completely free to run: Using the DeepSeek V4 Flash model in OpenCode, the entire workflow costs nothing
- Extremely low configuration barrier: Even environment variable setup can be delegated to the AI, making it accessible to non-technical users
Note that the free model's context length is reduced to one-quarter, which may be limiting when handling very large literature libraries or very long reviews. In those cases, you can switch to a paid model with a full context window.
For researchers who regularly conduct literature surveys and need to quickly produce draft reviews, this setup is already highly practical. It represents a pragmatic direction for academic AI applications — not having AI write your paper for you, but letting AI build on your real accumulated knowledge to become an efficient and reliable research assistant.
Key Takeaways
Related articles

Grok 4.5 Feels Weaker in Cursor? A Deep Dive into AI Coding Tool Integration Differences
Users report Grok 4.5 underperforms in Cursor vs. the official terminal. We analyze how system prompts, context management, parameters, and tool calling create AI coding tool integration gaps.

Carta: Pandoc Rewritten in Rust — 45x Faster, 20x Smaller
Carta is a Rust reimplementation of Pandoc with a 9MB binary (1/20th of Pandoc) and up to 45x faster conversion. Supports Markdown, DOCX, LaTeX, and Pandoc JSON filters.

A Beginner's Guide to AI Agents: Core Principles and Learning Paths Explained
Learn AI Agent core principles from scratch: understand how Agents differ from LLMs, their execution mechanisms, why rule design matters, and find the right learning path for your goals.