mcp-zotero
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| ZOTERO_API_KEY | Yes | API key for Zotero Web API v3. Create one at zotero.org/settings/keys with library read/write and file access permissions. | |
| ZOTERO_USER_ID | Yes | Your Zotero numeric user ID. Retrieve it with curl -H 'Zotero-API-Key: KEY' https://api.zotero.org/keys/current. | |
| UNPAYWALL_EMAIL | No | Email for Unpaywall API requests. Enables OA PDF lookup in add_items_by_doi and find_and_attach_pdfs. | |
| UNSAFE_OPERATIONS | No | Controls destructive operations (deletion). Values: 'none' (default, all deletions blocked), 'items' (allow item deletion but not collection deletion), 'all' (allow both). Case-insensitive. | none |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Zotero library management and citation injection for Word documents.
CITATION WORKFLOW:
Collect item keys: use add_items_by_doi for items with DOIs, add_items for items without DOIs (or search_library for existing items)
Generate the document: create a .docx (Word) or .odt (LibreOffice) with placeholders where citations should appear. Each must be in its own run.
Call inject_citations with the file path — it fetches metadata from Zotero automatically and picks the format from the extension (.docx or .odt; pass format to override). The file must be on the machine where this server runs.
Tell the user to open it in Word or LibreOffice with the Zotero plugin → Zotero → Add/Edit Bibliography, then Zotero → Refresh.
To write a whole document from scratch (not fill placeholders in an existing one), use create_cited_document: give it Markdown with pandoc-style citations ([@KEY], [@K1; @K2], [see @KEY, p. 12], -@KEY) and an output .docx/.odt path. It never overwrites an existing file.
KEY NOTES:
add_items_by_doi auto-attaches open-access PDFs found via Unpaywall (needs UNPAYWALL_EMAIL in the server settings; uses the user's Zotero storage). Do not disable auto_attach_pdf unless it causes errors.
find_duplicates is read-only. Call it with dois before add_items_by_doi to skip DOIs already in the library, and without dois to list duplicate groups (same DOI, or same normalized title and year) in the library or a collection. It never merges or deletes; let the user choose which item to keep.
For IEEE/Vancouver (numbered) citation styles, every MUST include a num attribute. num is the citation number assigned in order of first appearance in the text (first cited = num="1", second = num="2", etc.). For multi-item citations use comma-separated values: keys="KEY1,KEY2" num="1,2". Without num, citations render as [?].
If the .docx is in a sandbox or cloud workspace this server cannot see (code execution in Claude.ai or Claude Desktop), use the zotero-mcp-integrations skill instead of inject_citations. If it is not installed, recommend zotero-skill-mcp-integrations.zip from https://github.com/Xevos117/mcp-zotero/releases/latest.
get_user_id is only needed by the skill script (inject.js), not by the inject_citations tool.
To edit an existing item, call get_items_details first (it returns each item's version), then update_item with that version; if it returns version_conflict, re-read and retry. Use create_note to attach a plain-text note to an item.
To check whether items have been retracted, flagged with an expression of concern, or corrected, use check_retractions with item_keys (up to 50) or a collection_key: it looks up each DOI on Crossref (read-only) and returns a status per item. Rerun only the items that come back lookup_failed.
Deleting is off unless the server setting UNSAFE_OPERATIONS ("Deletions allowed" in the Claude Desktop extension) allows it ('items': delete_items; 'all': also delete_collection). delete_items moves items to the Zotero trash by default (recoverable); pass permanent: true to delete for good. delete_collection is always permanent (collections have no trash). Never work around a blocked deletion with other tools.
Errors carry a hint with the next step. When it says the fix is on the user's side (API key, server settings), tell the user instead of retrying.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| prompts | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| get_collectionsA | List all collections (folders) in your Zotero library. Returns an array of collection keys, names, and parent relationships (an empty array [] when the library has no collections — items can still be found with search_library, and create_collection makes one). Use collection keys with get_collection_items or as parent_collection in create_collection. Trashed collections are excluded by default. |
| get_collection_itemsA | Get all items in a specific Zotero collection (only items directly in it, not those in its subcollections). Returns item keys, titles, authors, and dates. Use the collectionKey from get_collections. Use the returned item keys with get_items_details, get_item_fulltext, or inject_citations. |
| get_items_detailsA | Get metadata for multiple Zotero items in a single call. Accepts an array of item keys and returns a map of key → metadata. Use this instead of one call per item. Returns all type-specific fields (e.g. bookTitle for bookSection, proceedingsTitle for conferencePaper, university for thesis). Each entry also carries its current |
| search_libraryA | Search your Zotero library or list items sorted by a field. When 'query' is provided, matches it against titles, creator names and years (not abstracts, tags or full text). When 'query' is omitted — or is empty / only whitespace — it is treated as no query: the tool lists items sorted by the chosen field (default: dateAdded, descending), up to 'limit'. Examples:
Use the returned item keys with get_items_details, get_item_fulltext, or inject_citations. |
| create_collectionA | Create a new collection (folder) in your Zotero library. Optionally nest it under a parent collection. Returns the new collection key and name. Use the key as collection_key in add_items_by_doi or add_items to organize imported papers. |
| add_items_by_doiA | Add items to your Zotero library by resolving DOIs. Works with ANY item type that has a DOI — journal articles, books, datasets, preprints, conference papers, reports, etc. For each DOI, resolves metadata via content negotiation and creates the item in Zotero with the correct type automatically. Returns a list of successfully added items (with item_key and title) and any failures. WHEN TO USE vs add_items:
WORKFLOW TIPS:
|
| inject_citationsA | Replace citation placeholders in a .docx (or .odt) file with native Zotero field codes that Zotero can recognize and manage. The tool fetches item metadata from Zotero automatically — you only need to provide the file. PLACEHOLDER SYNTAX — two kinds, recognized automatically (no flag):
WORKFLOW — how to create a Word document with live Zotero citations:
CITATION STYLES — ask the user which style they want before generating:
ZCITE TAG FORMAT: Supported attributes (any order):
OUTPUT: A new .docx file (original filename with _cited suffix) with Zotero field codes and a ZOTERO_BIBL bibliography at the end. A cited key that is not in the library, or that is not a Zotero key (8 characters from 23456789ABCDEFGHIJKLMNPQRSTUVWXYZ), is an error and no file is written. WHERE THE FILE LIVES: this tool reads and writes files on the machine where this MCP server runs. If you create the .docx in a sandbox or cloud workspace that the server cannot see (for example code execution in Claude.ai or Claude Desktop, paths like /mnt/user-data/...), do not call this tool: use the zotero-mcp-integrations skill, which injects the citations inside the sandbox with metadata from get_items_details. If that skill is not installed, recommend it to the user: zotero-skill-mcp-integrations.zip from https://github.com/Xevos117/mcp-zotero/releases/latest. |
| create_cited_documentA | Create a Word (.docx) or LibreOffice (.odt) document from Markdown with native Zotero citations and a bibliography, ready for the Zotero plugin's Refresh. Unlike inject_citations (which fills placeholders in an existing file), this writes a new document from Markdown text. WORKFLOW:
MARKDOWN SUBSET: headings (#…), paragraphs, bold (…), italic (…), one-level bullet lists (-). Anything else is kept as text, with a warning. CITATIONS (pandoc style): [@KEY] one item; [@KEY1; @KEY2] several; [see @KEY, p. 12] with prefix and locator; -@KEY to suppress the author. KEY is a Zotero item key. For IEEE/Vancouver the numbers follow the order of first citation automatically. OUTPUT: a new .docx or .odt (format from the extension, or the format argument). A cited key that is not in the library, or is not a Zotero key, is an error and nothing is written. If the output file already exists it is an error (never overwritten). |
| get_item_fulltextA | Get the text of a Zotero item's stored PDF from Zotero's full-text index. Works for PDFs indexed by Zotero desktop and synced, or imported with import_pdf_to_zotero / find_and_attach_pdfs; not for linked URLs or web pages. Use this to read the full content of papers instead of relying on abstracts. |
| get_user_idA | Returns the Zotero library configured in the server environment: user_id, library_type, library_id and library_path ("users/" or "groups/"). Pass library_path to the zotero-mcp-integrations skill script (inject.js) to generate Zotero field code URIs. Not needed when using the inject_citations MCP tool, which reads the library internally. |
| add_linked_url_attachmentA | Attach a linked URL to an existing Zotero item, or create a standalone linked-URL attachment. Use this to link external PDFs, web pages, or other resources to items already in your library. If parent_item is provided, the attachment is added as a child; otherwise it is standalone. A linked URL stores no file and no full text (get_item_fulltext cannot read it): to store a PDF in Zotero use import_pdf_to_zotero. |
| add_itemsA | Add items to Zotero by providing metadata directly. Supports ALL 37 Zotero item types. WHEN TO USE:
BATCH: Pass multiple items in the 'items' array (one tool call). COMMON FIELDS (available for most types): title, date, abstractNote, url, DOI, publisher, place, pages, volume, language, extra ITEM TYPE QUICK REFERENCE:
CREATORS: Array of {firstName, lastName, creatorType} or {name, creatorType} for institutional. Default creatorType is "author". Some types use different primary types (e.g., "director" for film, "inventor" for patent, "artist" for artwork). Invalid fields or creatorTypes for a given type are rejected with helpful error messages listing the valid options. |
| update_itemA | Update the metadata of an existing Zotero item: change field values and/or replace its creators. Pass the item's current |
| create_noteA | Add a child note to an existing Zotero item. Provide the note as PLAIN TEXT (no HTML or Markdown): blank lines become separate paragraphs and single line breaks are preserved. The parent must be a regular item (not a note or attachment). Use this to attach a summary, annotation, or reading note to a reference. For top-level, item-wide editing of fields use update_item; to add references use add_items or add_items_by_doi. |
| import_pdf_to_zoteroA | Download a PDF from a URL and upload it to Zotero storage as an imported_url attachment. Unlike linked URL attachments, imported files are stored in Zotero's storage and become fulltext-indexed (searchable via get_item_fulltext). Use this when you need the PDF content to be indexed by Zotero. The URL must lead straight to the PDF file (no login, paywall or HTML landing page); files up to 100 MB, counted against the user's Zotero file storage. For items with a DOI, find_and_attach_pdfs finds open-access PDFs by itself. |
| find_and_attach_pdfsA | For each Zotero item, check Unpaywall for open access PDFs and attach them. Items must have a DOI; needs UNPAYWALL_EMAIL in the server settings. Uploads use the user's Zotero file storage; dry_run only reports what is available. Uses the same source as Zotero Desktop's 'Find Available PDFs'. |
| find_duplicatesA | Find duplicate items in your Zotero library. Read-only: it never merges, edits or deletes anything — it only reports candidates for the user to resolve. Two modes:
Only regular items are scanned: notes, attachments and the trash are skipped, up to 5000 items (in both modes). The result reports 'scanned' (regular items examined) and 'truncated' (true if the cap was hit before the end; in 'dois' mode a DOI past the cap may then be missed). Pass 'collection_key' to limit the scan to one collection. |
| delete_collectionA | Permanently delete a collection (folder) from your Zotero library; confirm with the user first. Unlike delete_items, this cannot be undone: the Zotero Web API has no trash for collections, so a deleted collection is not recoverable. Items inside the collection are NOT deleted — they remain in your library. Disabled unless the server setting UNSAFE_OPERATIONS is 'all'. |
| delete_itemsA | Delete one or more items from your Zotero library. By default they are moved to the Zotero trash (recoverable by the user from Zotero → Trash); pass permanent: true to delete them for good (not recoverable), which is the old behaviour — confirm with the user first for a permanent delete. Moving an item to the trash does not move its child notes or attachments to the trash (they stay in the library), matching the Zotero app; a permanent delete also removes an item's children. A key already in the trash is reported in already_in_trash (use permanent: true to erase it). Accepts up to 50 item keys per call. Disabled unless the server setting UNSAFE_OPERATIONS is 'items' or 'all' (the same setting gates both trash and permanent deletion). |
| check_retractionsA | Check whether Zotero items have been retracted, flagged with an expression of concern, or corrected. Pass EITHER item_keys (up to 50) OR collection_key, exactly one. Read-only: it never changes the library. For each item it reads the DOI (the DOI field, or a 'DOI: …' line in Extra) and looks it up on Crossref (Retraction Watch data), then reports a status: retracted, expression_of_concern, corrected, ok, no_doi (no DOI to check), not_in_crossref (the DOI is unknown to Crossref), or lookup_failed (a transient error — rerun just those). The response opens with a summary of the counts and then lists, per item, its key, title, doi, status and any notices (type, date, source, the notice's own DOI). A failed lookup never fails the rest; rerun the lookup_failed items. At most 200 distinct DOIs are looked up per call: if the response has truncated=true, call again with start=next_start to continue (useful for a large collection). |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| cite_word_document | Turn the <zcite> placeholders in an existing .docx (or .odt) into live Zotero citations and a bibliography. |
| write_cited_document | Draft a document on a topic with inline Zotero citations and a bibliography, saved as .docx or .odt. |
| import_references | Add one or more references to Zotero from their DOIs, attaching open-access PDFs when available. |
| note_from_item | Read an existing Zotero item and attach a concise summary as a child note. |
| check_bibliography | Check a Zotero collection for retracted items and duplicates before using it in a document. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 20 tools
Most tools target clearly distinct resources and actions, and the descriptions proactively cross-reference near-neighbours (add_items vs add_items_by_doi, find_and_attach_pdfs vs import_pdf_to_zotero). The one real ambiguity is inject_citations vs create_cited_document, which both produce a Word file with Zotero field codes and differ only in input format; descriptions disambiguate but an agent must read carefully.
Every tool uses consistent snake_case with a leading verb and a noun object (get_collections, delete_items, add_items_by_doi, find_and_attach_pdfs). Variants like _by_doi and _to_zotero follow a predictable qualification pattern rather than breaking convention.
20 tools is on the heavy side of the suggested 3-15 band, but the surface maps to genuinely separate capabilities (library reads, ingestion, attachments/fulltext, collections, curation, citation writing). No tool looks redundant enough to remove, so it is slightly over rather than bloated.
Core lifecycle is well covered: items can be created (two paths), read, updated and deleted, collections created and deleted, notes created, attachments added, plus duplicates/retractions/citation authoring. Gaps remain around collections update (rename/move), note editing or deletion, listing a note/item's children and tags management, and trash restore/emptying — workable but notable absences.