Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
ZOTERO_API_KEYYesAPI key for Zotero Web API v3. Create one at zotero.org/settings/keys with library read/write and file access permissions.
ZOTERO_USER_IDYesYour Zotero numeric user ID. Retrieve it with curl -H 'Zotero-API-Key: KEY' https://api.zotero.org/keys/current.
UNPAYWALL_EMAILNoEmail for Unpaywall API requests. Enables OA PDF lookup in add_items_by_doi and find_and_attach_pdfs.
UNSAFE_OPERATIONSNoControls 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:

  1. Collect item keys: use add_items_by_doi for items with DOIs, add_items for items without DOIs (or search_library for existing items)

  2. Generate the document: create a .docx (Word) or .odt (LibreOffice) with placeholders where citations should appear. Each must be in its own run.

  3. 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.

  4. 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

CapabilityDetails
tools
{
  "listChanged": true
}
prompts
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
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 version: pass it to update_item to edit the item safely (update_item rejects a stale version). Set include_abstract to include abstracts (excluded by default to keep responses lightweight). Keys not found in the library are listed in not_found (present only when some are missing).

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:

  • Search: { "query": "deep learning" }

  • Recent items: { "sort": "dateAdded", "limit": 10 }

  • Recent with search: { "query": "transformers", "sort": "dateAdded", "limit": 5 }

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:

  • Use add_items_by_doi when the item HAS a DOI — it auto-resolves all metadata and attaches open-access PDFs (when the server has UNPAYWALL_EMAIL set).

  • Use add_items when the item does NOT have a DOI, or when you need to override specific metadata fields (add_items_by_doi does not allow metadata overrides).

  • Mixed batch: if some items have DOIs and others don't, make two separate calls — add_items_by_doi for the DOIs and add_items for the rest.

WORKFLOW TIPS:

  • To collect metadata for all added items, call get_items_details with the returned item_keys (single batch call).

  • To create a cited Word document, use the returned item_keys as placeholders in a .docx, then call inject_citations. See inject_citations description for the full workflow.

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):

  • tags (see ZCITE TAG FORMAT below). If the document has any tag, it is handled as a zcite document.

  • Pandoc citation markers when there are no tags: bracketed [@KEY], [@K1; @K2], [see @KEY, p. 12], -@KEY to suppress the author, or inline @KEY. KEY may be a Zotero 8-character key or a Better BibTeX citation key (e.g. [@rossi2020]); citation keys are case-sensitive and resolved against each item's citationKey field or a "Citation Key: " line in Extra. Prefer the bracketed form [@KEY] — it is the reliable one: an inline @word that does not resolve (a handle, an email, code like @media or @angular/core, or a marker Word split across runs) is left as plain text with a warning, never an error, whereas an unknown or ambiguous key in a bracketed [@…] IS an error and nothing is written. A document that mixes and [@…] is treated as zcite, and the Pandoc markers are reported so you can call the tool again on the output.

WORKFLOW — how to create a Word document with live Zotero citations:

  1. Collect item keys: use add_items_by_doi or add_items (or search_library for existing items)

  2. Generate .docx: create a Word document (e.g. with the "docx" npm package) with placeholders where citations should appear. Each MUST be in its own dedicated TextRun — do NOT mix it with surrounding text.

  3. Call this tool with the .docx file path. It replaces every zcite tag with a Zotero field code and appends a bibliography.

  4. Tell the user to open the file in Word with the Zotero plugin, click Zotero → Add/Edit Bibliography, then Zotero → Refresh.

CITATION STYLES — ask the user which style they want before generating:

  • apa (default): author-year — (Smith, 2023)

  • harvard / chicago: author-date — (Smith, 2023) / (Smith 2023)

  • ieee / vancouver: numbered — [1], [2] WARNING: for numbered styles every MUST include a num="N" attribute with the sequential citation number. Without num, citations render as [?].

ZCITE TAG FORMAT: Supported attributes (any order):

  • keys (required): item key or comma-separated keys — "ABC12345" or "ABC12345,DEF67890"

  • num: citation number for IEEE/Vancouver — "1" or "1,2" (required for numbered styles)

  • locator: page reference — "12-15" (shown as "pp. 12–15"; other labels explicit, e.g. "chap. 3")

  • prefix: text before citation — "see"

  • suffix: text after citation — ", emphasis added"

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:

  1. Collect item keys with add_items_by_doi, add_items or search_library.

  2. Write the body as Markdown, with pandoc-style citations where they belong.

  3. Call this tool with the Markdown and an output path. It fetches metadata from Zotero, renders the document and appends the bibliography. It never overwrites an existing file.

  4. Tell the user to open it in Word or LibreOffice with the Zotero plugin → Add/Edit Bibliography, then Refresh.

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:

  • For items that do not have a DOI (books, theses, reports, etc.)

  • When you need full control over metadata (e.g., override a title, set a specific itemType, add custom fields) — even if a DOI exists, use add_items when the auto-resolved metadata would be incorrect or incomplete

  • Mixed batch: if some items have DOIs and others don't, call add_items_by_doi for the DOIs and add_items for the rest (two separate calls)

  • Prefer add_items_by_doi when DOIs are available AND you don't need to override metadata (it auto-resolves everything and attaches OA PDFs)

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:

  • journalArticle: publicationTitle, volume, issue, pages, DOI, ISSN

  • book: publisher, ISBN, edition, numPages, series, seriesNumber

  • bookSection: bookTitle, publisher, pages, ISBN, edition

  • conferencePaper: proceedingsTitle, conferenceName, publisher, DOI

  • thesis: thesisType ("PhD thesis"|"Master's thesis"), university

  • report: reportType, reportNumber, institution

  • webpage: websiteTitle, websiteType, accessDate

  • preprint: repository, archiveID, genre ("Preprint")

  • patent: patentNumber, assignee, issuingAuthority, filingDate

  • computerProgram: versionNumber, company, system, programmingLanguage

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 version (from get_items_details) — the update is rejected as a version_conflict if the item changed since you read it, so re-read and retry in that case. fields are Zotero field names valid for the item's type (e.g. title, date, publicationTitle, volume, pages, DOI, url, publisher). itemType cannot be changed, and key/version/collections/parentItem/relations/dateAdded/dateModified are managed by Zotero and rejected. Use add_items for new items, create_note for notes, and delete_items to remove items.

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:

  • With 'dois' (up to 50): checks which of those DOIs are ALREADY in the library. Returns, per DOI, the matching items (item_key, title, year, first author, type). Run this before add_items_by_doi and skip the DOIs that already have an entry, to avoid creating duplicates.

  • Without 'dois': scans the library (or a single collection) for duplicate groups — items that share a normalized DOI, or a normalized title (ignoring case, accents and punctuation; same year required when both items have one; very short/generic titles skipped). Each group lists its items so the user decides which to keep.

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

NameDescription
cite_word_documentTurn the <zcite> placeholders in an existing .docx (or .odt) into live Zotero citations and a bibliography.
write_cited_documentDraft a document on a topic with inline Zotero citations and a bibliography, saved as .docx or .odt.
import_referencesAdd one or more references to Zotero from their DOIs, attaching open-access PDFs when available.
note_from_itemRead an existing Zotero item and attach a concise summary as a child note.
check_bibliographyCheck a Zotero collection for retracted items and duplicates before using it in a document.

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A4.2/5.0

Scored across 20 tools

Disambiguation4/5

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.

Naming Consistency5/5

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.

Tool Count4/5

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.

Completeness4/5

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.

Maintenance

ActivityActive
ResponsivenessLimited data