Back to Browse

Docsagent MCP Server

Developer ToolsLow Risk9.3MCP RegistryLocal
Free

Server data from the Official MCP Registry

Give AI agents instant, private access to your personal knowledge base. First source: Zotero.

About

Give AI agents instant, private access to your personal knowledge base. First source: Zotero.

Security Report

9.3
Low Risk9.3Low Risk

Valid MCP server (2 strong, 1 medium validity signals). 2 known CVEs in dependencies Package registry verified. Imported from the Official MCP Registry.

9 files analyzed ยท 4 issues found

Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.

Permissions Required

This plugin requests these system permissions. Most are normal for its category.

file_system

Check that this permission is expected for this type of plugin.

HTTP Network Access

Connects to external APIs or services over the internet.

What You'll Need

Set these up before or after installing:

Path to the shared docsagent config file (default: ~/.docsagent/config.json)Optional

Environment variable: DOCSAGENT_CONFIG

How to Install

Add this to your MCP configuration file:

{
  "mcpServers": {
    "io-github-docsagent-docsagent": {
      "env": {
        "DOCSAGENT_CONFIG": "your-docsagent-config-here"
      },
      "args": [
        "-y",
        "@docsagent/mcp-zotero"
      ],
      "command": "npx"
    }
  }
}

Documentation

View on GitHub

From the project's GitHub README.

DocsAgent MCP โ€” Zotero MCP Server ๐Ÿ“šโšก

DocsAgent gives AI agents instant, private access to your personal knowledge base. @docsagent/mcp-zotero is the spec-driven MCP (Model Context Protocol) server (Zotero is the first supported source) that lets any AI agent โ€” Claude Desktop, Cursor, Cline, Qwen Code, or any MCP client โ€” search, read, and write your Zotero library through a resident C++ search engine. BM25 full-text search + query-ranked passage retrieval over 1,000+ PDFs at ~15 ms, fully local (RAG-ready knowledge base).

  • ๐Ÿ”’ Local-first & private โ€” the engine reads your Zotero library directly on your machine. Your PDFs never leave it.
  • โšก Native C++ search core โ€” inverted-index BM25 + passage ranking, millisecond lookup, low memory footprint (160โ€“227 MB for a 1,500-paper library).
  • ๐Ÿงฉ 8 MCP tools โ€” 5 read + 3 write, with JSON-schema validated arguments, token budgets, result dedup, and a three-layer write safety gate.
  • ๐ŸŒ Two transports โ€” stdio for local MCP clients, Streamable HTTP for remote deployment (origin checks, API-key / OAuth 2.0 token introspection, per-request RBAC, /health probe).
  • ๐Ÿ Two shells, one core โ€” this TypeScript package and a feature-equal Python wrapper ship the same tools over the same JSON-RPC contract.

Architecture

MCP Client (Claude Desktop / Cursor / Cline / Qwen Code / any MCP host)
        โ”‚  stdio (local)   or   Streamable HTTP  /mcp  (remote)
        โ–ผ
MCP shell  โ† this package (@docsagent/mcp-zotero / docsagent-mcp-zotero)
   ยท tool schemas (spec-driven), argument validation, token budget, dedup
   ยท write orchestration via the Zotero local API, write safety gate, RBAC
   ยท group-library sync via the Zotero Web API
        โ”‚  JSON-RPC 2.0 over HTTP ({coreHost}:{httpPort}/rpc, cpp-httplib)
        โ–ผ
DocsAgent Core (resident C++ engine, papersgpt-agent)
   ยท reads ~/Zotero/zotero.sqlite + storage/ directly on your machine
   ยท builds & serves the full-text index (BM25 + passage ranking)

The shell never spawns the core during tool calls and never touches your Zotero files. The core runs as a background service and stays available across MCP client restarts. Tool schemas and error codes: spec/.


Quick Start

1. Start the core

npx @docsagent/mcp-zotero start           # spawn the bundled core for your platform
npx @docsagent/mcp-zotero status          # pid / endpoint / version

Python shell (same verbs, under the core subcommand):

pip install ./python                      # build the wheel locally (PyPI upload pending)
docsagent-mcp-zotero core start

(core stop / core restart also available. The core reads your Zotero data directory, builds the full-text index, and serves JSON-RPC on http://0.0.0.0:23120/rpc.)

2. Configure your MCP client

Claude Desktop / Cursor / Cline / Qwen Code (mcpServers):

{
  "mcpServers": {
    "docsagent-zotero": {
      "command": "npx",
      "args": ["-y", "@docsagent/mcp-zotero"]
    }
  }
}

Python shell (same tools, same contract, installed from this repo) โ€” mcpServers:

{
  "mcpServers": {
    "docsagent-zotero-py": {
      "command": "docsagent-mcp-zotero"
    }
  }
}

Install the Python package first (step 1) so docsagent-mcp-zotero is on your PATH.

On startup the shell connects to the core, loads sources, and checks index status. If the core is not running it fails fast with startup instructions โ€” it never spawns anything.


MCP Tools (external API)

8 tools, 5 read + 3 write. Schemas are the single-sourced contract in spec/tools/*.json (mirrored into both packages); arguments are validated before handlers run and failures map to typed docsagent error codes.

list_sources

Every searchable source with capabilities, supported targets/includes/browse modes, filters, and document counts. Call this first.

search

Cross-entry search over the whole library.

ParameterTypeNotes
querystring, requiredplain keywords or phrases
target"items" | "annotations" | "notes" or arraydefault items
depthids | snippets | fullsnippets by default (BM25-ranked passages)
filtersobjecttags, yearFrom/yearTo, itemType, authors, colors, containerId, titleContains
k, snippetsPerResult, max_tokensnumbersranking depth and token budget

Returns results[] with global ids (zotero:KEY), titles, relevance, snippets; multi-target searches group by target. Results are deduped (id, then normalized title + year) and packed under a token budget.

get_content

Read one entry. mode=passages (query-ranked passages, k) or mode=fulltext (offset pagination with nextOffset). Notes return their body with tags and metadata.

get_metadata

include: metadata, abstract, annotations, notes, citation (bibtex / csljson / formatted via citationFormat/citationStyle). Notes are packed under the token budget.

list_library

Browse modes: collections (drill-down via parentId), items (by containerId), tags, saved_searches, standalone_notes.

Write tools (three-layer safety gate)

ToolWhat it doesKey arguments
import_itemImport local PDFs or resolve DOI / ISBN / arXiv IDs (via the Zotero translation server); optional autoClassify suggests collectionspaths | identifiers, containerId, autoClassify, confirmed
add_noteAdd a Markdown child note to an item (converted to Zotero note HTML), with orphan verification and rollbackid, content, tags, confirmed
batch_modifyBulk add_to_collection / remove_from_collection / add_tags / remove_tags on up to 200 items in batches of 50action, ids, containerId, tags, confirmed

Write safety gate (spec/algorithms/write-gate.md): layer 1 write tools are not registered unless enableWrites=true; layer 2 confirmed=false returns a preview and consumes no rate-limit quota; layer 3 confirmed writes consume a per-hour rate limit (default 30/h). Anything above 20 items in batch_modify additionally reports requiresConfirmation in the preview.


Engine performance

The C++ engine powers PapersGPT โ€” the same index and retrieval stack ships in this MCP server. Benchmark on a real Zotero installation (full write-up):

MetricMac (Intel i9)Windows VM (4C8G)
Library size1,506 PDFs (4.5 GB on disk)500+ PDFs
Index build time141 sa few seconds
Memory (agent process)227 MB160 MB
Average retrieval latency~15 ms~15 ms
  • Indexing cost scales roughly linearly with library size; retrieval latency stays constant โ€” a 10,000-paper library (~30 GB) indexes in about 15โ€“20 minutes, and everyday search stays at ~15 ms.
  • For comparison: a typical web page load takes 1,000โ€“3,000 ms; a blink of an eye is 100โ€“150 ms. PapersGPT answers in ~15 ms, fully offline.
  • Privacy: your library never leaves your machine.

Configuration

Config lives at ~/.docsagent/config.json (or $DOCSAGENT_CONFIG) โ€” one file shared by the JS shell, the Python wrapper, and the C++ core. Validated against spec/config.json.

KeyDefaultDescription
coreHost0.0.0.0Address the core binds and the shell dials
httpPort23120Core HTTP port (POST /rpc)
coreBinary""Optional explicit path to the core binary
zoteroDataDir~/ZoteroZotero data directory
zoteroApiUrlhttp://localhost:23119/apiZotero local API (write orchestration)
zoteroGroups[]Group libraries to sync from zotero.org
enableWritesfalseRegister the three write tools
writeRateLimitPerHour30Confirmed-write rate limit
maxTokensPerTool4000Token budget per tool result
defaultSourcezoteroSource used when an id omits the prefix
transportstdiostdio or streamable-http
httpListenAddr0.0.0.0:8080Listen address for streamable-http (/mcp)
authMode / authConfignoneapi-key or oauth2 (RFC 7662) + allowedOrigins
rbacRoles{}role โ†’ allowed tool names (per-request RBAC on HTTP)
logLevelinfodebug / info / warn / error

Distribution

ChannelPackageBundled coreSize
npm (JS/TS shell)@docsagent/mcp-zoteroall platforms in bin/~70 MB tarball
PyPI (Python shell)docsagent-mcp-zotero (pip install ./python)same binaries in the wheel~65 MB wheel

Both shells read the same config and talk to the same core โ€” pick either (or both) as your MCP distribution channel. Core lifecycle (start / stop / restart / status) is available from both CLIs.

Links

License

Apache-2.0

Reviews

No reviews yet

Be the first to review this server!