Labsco
PiaoyangGuohai1 logo

cli-anything-zotero

β˜… 102

from PiaoyangGuohai1

CLI & MCP server for Zotero 7/8 β€” 52 tools to let AI manage your research library locally. Search, import, export, PDF, notes, and more.

πŸ”₯πŸ”₯πŸ”₯βœ“ VerifiedAccount requiredNeeds API keys

cli-anything-zotero

PyPI Python 3.10+ License GitHub release GitHub stars

Let AI manage your Zotero library.

δΈ­ζ–‡ζ–‡ζ‘£ | English

MCP legacy notice: v0.9.5 is the final release with the zotero-mcp command and cli-anything-zotero[mcp] extra. New releases are CLI/SDK-first. Existing MCP users should pin pip install "cli-anything-zotero[mcp]==0.9.5" or use the legacy/mcp branch.


For Non-Programmers

This tool is designed to be used by AI, not memorized by you. After a simple install (~3 minutes), just talk to your AI assistant in plain language:

"Find papers about diabetes and kidney disease in my Zotero library"

"Import this DOI into my CKM collection: 10.1038/s41586-024-07871-6"

"Export all papers in my thesis collection as BibTeX"

"Find PDFs for items in my review collection that are missing them"

All you need to do:

  1. Follow the Installation steps below
  2. Tell your AI assistant (Claude Code, Cursor, etc.) what you need
  3. That's it

What It Does

Built on CLI-Anything by HKUDS, this tool gives AI agents full access to your local Zotero library through a JS Bridge β€” a lightweight Zotero plugin that exposes a privileged JavaScript endpoint.

Key capabilities:

  • Search & browse β€” keyword search, full-text PDF search, collection tree, tags
  • Import β€” from DOI, PMID, RIS/BibTeX files, or JSON
  • Export β€” BibTeX, CSL-JSON, RIS, CSV, formatted citations
  • PDF management β€” attach files, auto-find PDFs online, search annotations
  • Write operations β€” update metadata, manage tags, add notes, trigger sync
  • Advanced β€” execute arbitrary Zotero JS, semantic search with local embeddings, AI analysis

All write operations run locally through the JS Bridge β€” no API key or internet connection required.


Optional Features

These require extra services. Everything else works without them.

Semantic Search

Any OpenAI-compatible /v1/embeddings endpoint (Ollama, LM Studio, OpenAI, etc.).

zotero-cli item build-index                            # one-time
zotero-cli item semantic-search "cardiovascular risk"
zotero-cli item similar ITEM_KEY
VariableDefaultDescription
ZOTERO_EMBED_APIhttp://127.0.0.1:8080/v1/embeddingsEmbedding API endpoint
ZOTERO_EMBED_MODELnomic-embed-textModel name
ZOTERO_EMBED_KEY(empty)API key (if needed)

AI Analysis

export OPENAI_API_KEY=sk-...
zotero-cli item analyze ITEM_KEY --question "What are the main findings?"

Legacy MCP Users

MCP support is frozen at v0.9.5. To keep using the previous MCP server, install:

pip install "cli-anything-zotero[mcp]==0.9.5"

You can also use the legacy/mcp branch for source installs. Starting with v1.0.0, the maintained package installs only CLI/SDK surfaces and no longer provides the zotero-mcp command.

Related Projects

There are several great tools in the Zotero ecosystem. Each has different strengths depending on your use case:

cli-anything-zoterozotero-mcpzotero-cli-ccpyzotero-cli
ApproachLocal JS BridgeWeb API + MCPWeb API + CLIWeb API + CLI
Best forLocal-first, full controlMCP-native workflowsAgent-driven researchScripting & automation
Write opsLocal (no API key)Via Web APIVia Web APIVia Web API
MCP supportLegacy via v0.9.5Yes45 toolsNo
Terminal CLIYesNoYesYes
Zotero JS accessYesNoNoNo
LicenseApache 2.0MITCC BY-NC 4.0MIT

License

Apache 2.0