Introduction

It is not difficult to let the model help organize the main text when writing academic papers; the hard part is citations: the model doesn’t know which literature is in your library, so the DOIs and years it casually gives are often fabricated. Existing solutions either require manually organizing a .bib file or pasting literature metadata into the context piece by piece, both of which break the workflow.

The zotero-mcp-dsh introduced below is a DSH plugin maintained by LiJunfeng000000000000, version 0.1.0, under the MIT license. It connects your local Zotero library to DSH, allowing the model to search for literature, read basic information and full PDF text, and export BibTeX directly within the session for constructing a LaTeX reference library and inserting \cite{}.

What is this

zotero-mcp-dsh is a DSH bundle (npm package format), declared in package.json with "dsh": { "bundle": { "patch": "./cordis.patch.yml" } }, and installed to the DSH profile via pnpm from GitHub.

After installation, it registers a @deepseek-ai/dsh-mcp-client plugin instance (stdio transport), spawning server.mjs inside the package. server.mjs is a zero-dependency MCP server (requires Node ≥ 18), working via Zotero Desktop’s local HTTP API (http://127.0.0.1:23119). This API is read-only and requires no API key, so the plugin itself does not modify your Zotero library.

One thing to note: changes to cordis.patch.yml in the profile are hot-loaded via HMR, but new or upgraded bundles require a DSH restart to take effect.

Core Features

After installation, a set of mcp__zotero__* tools appear on the model side, totaling five:

Tool Function
zotero_search Search literature by keywords/collections/years, returns itemKey, citekey, title, authors, year, journal, DOI
zotero_get_item Get complete metadata for a single item (abstract, keywords, attachment list) by itemKey
zotero_get_fulltext Read full PDF text of literature (based on Zotero full-text index), maxChars controls length
zotero_export_bibtex Export BibTeX text (with citekey) in Better BibTeX style by query/collection/itemKeys
zotero_list_collections List all collections in the library (categories)

Installation and Enablement

First, do the prerequisites: Zotero Desktop must be open on the local machine (the local API is on by default). It is recommended to install Better BibTeX for stable citekeys, but this is not required.

Then install from GitHub:

dsh plugin --profile web add github:LiJunfeng000000000000/zotero-mcp-dsh

The README also mentions that you can specify a tag or branch for installation, for example:

dsh plugin --profile web add github:LiJunfeng000000000000/zotero-mcp-dsh#v0.1.0

Note that the README states this tag syntax is only available after the tag is published; it is unclear if it is currently published, so please check the repository before using.

After installation, restart DSH, and the mcp__zotero__* tools will appear in the model’s tool list.

If you want to test the MCP server directly bypassing DSH, you can run:

node server.mjs

Then send MCP JSON-RPC messages to stdin.

Typical Usage

The README provides a reproducible writing workflow consisting of four steps:

  1. Find literature. Call mcp__zotero__zotero_search, for example specifying collection: "Joints", query: "numerical manifold", and select suitable literature from the results.
  2. Verify content. Use zotero_get_fulltext on key literature to read the full PDF and confirm that the methods, formulas, and conclusions match the text.
  3. Construct .bib. Use zotero_export_bibtex to obtain BibTeX text and write it to docs/latex/references.bib or other target libraries.
  4. Insert citations. Write \cite{citekey} after the relevant sentence in the text, and compile in the order: XeLaTeX—BibTeX—XeLaTeX—XeLaTeX.

Uninstalling is also straightforward:

dsh plugin --profile web remove zotero-mcp-dsh

Boundaries and Notes

Before proceeding through the above steps, there are a few boundaries to be clear about:

  • The MCP server is read-only and will not modify the Zotero library. BibTeX text is written to .bib files by the model; file writing goes through DSH sandbox auditing.
  • Full-text PDFs depend on the full-text index established by Zotero. Unindexed literature will return a prompt; you can select “Re-index” in Zotero.
  • When searching by collection, PDF attachment entries without citekeys are skipped because they are not citable literature entries.
  • It depends on @deepseek-ai/dsh-mcp-client ^0.1.0-rc.6 (peerDependencies), requiring Node ≥ 18 locally.

Like installing any third-party plugin, the plugin runs with the permissions of the current dsh process. It is recommended to read the source code and license (MIT) before installation to confirm there are no issues before adding it to your common profile.

Conclusion

If you use Zotero to manage literature and DSH to assist in writing LaTeX, this plugin saves the process of moving information back and forth between the library, editor, and model: search, verification, and BibTeX generation are all completed within the session, and citation DOIs and years come from your own library rather than the model’s memory.

Directory: https://www.skillhub.cn/plugins/LiJunfeng000000000000/zotero-mcp-dsh

GitHub: https://github.com/LiJunfeng000000000000/zotero-mcp-dsh