zoty

zoty

A lightweight MCP server that connects AI agents to a local Zotero library for paper management and metadata retrieval. It enables users to search titles and abstracts, browse collections, and automatically ingest papers via arXiv ID or DOI with PDF attachments.

Category
访问服务器

README

zoty

Lightweight Zotero MCP server for AI agents.

What it does

MCP server that connects AI agents to your local Zotero library. Provides 6 tools: BM25-ranked search over titles and abstracts, collection browsing, item lookup, and paper ingestion by arXiv ID or DOI with automatic PDF attachment.

Requirements

  • Python 3.10+
  • Zotero 7 desktop running
  • Zotero local API enabled: Zotero Settings > Advanced > Config Editor > set extensions.zotero.httpServer.localAPI.enabled to true
  • Zoty Bridge plugin installed (for PDF attachment and collection assignment)

Add to Your Agent

Claude Code

Add from the command line:

claude mcp add zoty -- uvx zoty

Add to your .mcp.json or ~/.claude/settings.json:

{
  "mcpServers": {
    "zoty": {
      "command": "uvx",
      "args": ["zoty"]
    }
  }
}

Codex

Add from the command line:

codex mcp add zoty -- uvx zoty

Add to your ~/.codex/config.toml:

[mcp_servers.zoty]
command = "uvx"
args = ["zoty"]

Installation

Requires uv.

Run without installing (recommended for MCP setups):

uvx zoty

Install persistently:

uv tool install zoty

Upgrade an installed copy:

uv tool upgrade zoty

If you run zoty with uvx instead of installing it, refresh to the latest published version with:

uvx --refresh zoty

From a local checkout:

uv run zoty

# Or install from source as a tool
uv tool install .

PDF Reading Advice for Agents

For best results when coding agents open attachment filepaths from zoty, make sure poppler and the associated Poppler utilities are installed on the machine. In practice this usually means tools like pdftotext, pdfinfo, and pdftoppm are available on PATH.

This is especially important for Claude Code, which uses these utilities to read PDF pages efficiently. Without them, agents may still be able to open the PDF files themselves, but page extraction tends to be slower and less reliable.

Typical installs:

# macOS
brew install poppler

# Ubuntu / Debian
sudo apt-get install poppler-utils

Zoty Bridge Plugin

A tiny Zotero 7 plugin that lets zoty execute JavaScript inside Zotero's privileged context. This is needed for operations that can't go through the REST API: PDF attachment and collection assignment both require writing to Zotero's SQLite database, which locks out external processes. The bridge sidesteps this by running JS inside Zotero itself.

Install the plugin

  1. Download zoty-bridge.xpi from releases, or build it yourself:
    make build
    
  2. In Zotero: Tools > Add-ons > gear icon > Install Add-on From File > select the .xpi
  3. Restart Zotero

The bridge runs an HTTP server on localhost:24119 when Zotero is open. No configuration needed.

Tools

Tool Description
search_library BM25-ranked search over item titles and abstracts, including attachment filepaths
list_collections List all collections with keys, names, and item counts
list_collection_items List items in a specific collection
get_item Full metadata for a single item by key, including attachment filepaths
get_recent_items Recently added items, sorted by date
add_paper Add a paper by arXiv ID or DOI with automatic PDF download and collection-scoped duplicate prevention

How it works

Read operations go through pyzotero against Zotero's local API (localhost:23119). The BM25 search index builds in a background thread at startup so the MCP handshake completes immediately.

Write operations use the Zotero connector endpoint (/connector/saveItems) to create metadata items. PDF attachment and collection assignment go through the zoty-bridge plugin, which executes JavaScript in Zotero's privileged context. This two-path design exists because Zotero's SQLite database uses exclusive locking -- external processes can read it (immutable mode) but not write to it while Zotero is running.

arXiv traffic is throttled internally to respect arXiv's access policy. Concurrent add_paper calls queue transparently: metadata requests serialize with a 3-second gap, and arXiv PDF downloads are rate-limited separately.

Development

make build   # build zotero-plugin/dist/zoty-bridge.xpi
make test    # run Python unit tests

License

MIT

Rate Limiting Across Sessions

zoty rate-limits arXiv traffic inside the running MCP server process. If several add_paper calls reach the same server at once, zoty queues them and drains metadata requests at arXiv-safe speed.

That limiter is not shared across separate zoty processes. If you start one zoty instance per agent, session, or editor window, each process will enforce its own limit and the combined request rate can still exceed arXiv policy.

If you expect multiple sessions to pull papers at the same time, start one long-lived zoty server and point all clients at that same instance.

Start one shared local server:

zoty --transport streamable-http --host 127.0.0.1 --port 8000

The shared MCP endpoint will be:

http://127.0.0.1:8000/mcp

If you want a different endpoint path:

zoty \
  --transport streamable-http \
  --host 127.0.0.1 \
  --port 8000 \
  --streamable-http-path /zoty-mcp

Then point every client at the same URL:

http://127.0.0.1:8000/zoty-mcp

For clients that support remote MCP servers by URL, the config should look like this:

{
  "mcpServers": {
    "zoty": {
      "url": "http://127.0.0.1:8000/mcp"
    }
  }
}

Avoid this pattern when multiple sessions may import papers in parallel, because it starts a separate zoty process per client:

{
  "mcpServers": {
    "zoty": {
      "command": "zoty"
    }
  }
}

Recommended boot sequence:

  1. Boot Zotero and make sure the Zotero connector and zoty-bridge plugin are available.
  2. Start one shared zoty server with --transport streamable-http.
  3. Configure each agent or MCP client to connect to that existing server URL instead of launching its own copy.
  4. Let the shared server serialize arXiv metadata lookups and rate-limit arXiv PDF downloads for everyone.

This keeps the agent-side behavior simple: tool calls may take a bit longer under load, but they will queue naturally instead of hammering export.arxiv.org.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选