Code Mode for Zotero
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| ZOTERO_BBT_DB | No | Path to better-bibtex.sqlite. Defaults to the location next to zotero.sqlite. | |
| ZOTERO_RAG_DB | No | Path to the passage index. | ~/.local/share/code-mode-for-zotero/rag.sqlite |
| ZOTERO_DB_PATH | No | Path to zotero.sqlite. Found automatically if not set. | |
| ZOTERO_MCP_LIBRARY | No | Which library to search: `all`, `0` (personal library) or a group id. Default is `all`. | all |
| ZOTERO_MCP_SANDBOX | No | `relaxed` runs scripts without full isolation. Default is `strict`. | strict |
| ZOTERO_RAG_EMBED_KEY | No | Bearer token, if the embeddings endpoint needs one. | |
| ZOTERO_RAG_EMBED_URL | No | OpenAI-compatible embeddings endpoint, e.g. `http://localhost:1234/v1`. If unset, passage search works on keywords only. | |
| ZOTERO_RAG_EMBED_MODEL | No | Embedding model name. Default is `nomic-embed-text`. | nomic-embed-text |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Read-only access to the user's Zotero library through Python. Call search_api once to see the available functions, then use execute. Do the filtering and summarising in the program: only what it prints returns to you.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| logging | {} |
| prompts | {
"listChanged": true
} |
| resources | {
"subscribe": false,
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| search_apiA | List the functions available inside execute(), with signatures and the fields of the records they return. Give a word to narrow the list; leave it empty for everything. |
| executeA | Run Python that reads the user's Zotero library. A global |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 2 tools
The two tools occupy clearly separate roles: search_api is pure introspection/documentation of the execute() surface, while execute runs code. There is no plausible way to confuse them, and the description of execute explicitly points at search_api for detail.
Both names are lowercase snake_case, but search_api follows a verb_noun pattern while execute is a bare verb. Minor deviation rather than a conflict, and both remain readable and predictable.
A code-mode server deliberately needs only an introspection tool and an execution tool, so the count is well-matched to the design rather than thin. A third convenience tool (e.g. a schema/help shortcut) is not needed but the 2-tool surface sits at the low end.
For read-only research workflows the surface is workable: search, get_item, fulltext, find, and passages cover discovery and retrieval. However, there are no write operations (adding items, notes, tags, collections) and no explicit collection/tag listing or export, so Zotero library management is only half-covered.