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

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
get_collectionsA

List all collections (folders) in your Zotero library. Returns collection keys, names, and parent relationships. 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. 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 calling get_item_details multiple times. Returns all type-specific fields (e.g. bookTitle for bookSection, proceedingsTitle for conferencePaper, university for thesis). Set include_abstract to include abstracts (excluded by default to keep responses lightweight).

search_libraryA

Search your Zotero library or list items sorted by a field.

When 'query' is provided, searches by title, author, or any field. When 'query' is omitted, lists items sorted by the chosen field (default: dateAdded, descending) — this replaces the old get_recent tool.

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 with add_items_by_doi 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 OA PDFs.

  • 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 placeholder tags in a .docx file with native Zotero field codes that Zotero for Word can recognize and manage. The tool fetches item metadata from Zotero automatically — you only need to provide the .docx file.

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

  1. Collect item keys: use add_items_by_doi (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 and click Zotero → Refresh.

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

  • apa (default): author-year — (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 — "pp. 12-15"

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

NOTE: If the inject-citations skill is available, prefer the skill workflow (runs in sandbox, no filesystem dependency). This tool serves as the primary path when the skill is not available.

get_item_fulltextA

Get the full text content of a Zotero item's PDF attachment via Zotero's fulltext index. Zotero desktop automatically indexes PDFs when synced. Use this to read the full content of papers instead of relying on abstracts.

get_user_idA

Returns the Zotero user ID configured in the server environment. Needed by the standalone inject-citations skill script (inject.js) to generate Zotero field code URIs. Not needed when using the inject_citations MCP tool, which reads the userId 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.

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 (single API 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.

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.

find_and_attach_pdfsA

For each Zotero item, check Unpaywall for open access PDFs and attach them. Items must have a DOI. Uses the same source as Zotero Desktop's 'Find Available PDFs'.

delete_collectionA

Delete a collection (folder) from your Zotero library. Items inside the collection are NOT deleted — they remain in your library. Requires UNSAFE_OPERATIONS environment variable set to 'all'.

delete_itemsA

Delete one or more items from your Zotero library permanently (moves to trash). Accepts up to 50 item keys per call. Requires UNSAFE_OPERATIONS environment variable set to 'items' or 'all'.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Xevos117/mcp-zotero'

If you have feedback or need assistance with the MCP directory API, please join our Discord server