zotero-mcp: Instructions file for Codex

AGENTS.md

zotero-mcp AGENTS.md is an instructions file for Codex, OpenCode from Robernetes/zotero-mcp. It costs 2,017 tokens per session, scanned A, original, MIT.

Repository instructions for zotero-mcp, a server that connects Claude to a local Zotero research library. They describe the project structure, its tools, its document editing support, and its testing commands.

In plain words
What is it for?
Use them when developing or testing Zotero search, citations, bibliographies, external source lookup, or document editing.
Why use it?
They give contributors a map of the code and clarify boundaries such as reading from Zotero, saving items, and editing Markdown or Word files.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions Claude Code.

This is Robernetes/zotero-mcp's own configuration. It tells Codex and OpenCode how to work on zotero-mcp itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything zotero-mcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to Robernetes/zotero-mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/Robernetes/zotero-mcp/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/Robernetes/zotero-mcp

Made for: Codex, OpenCode.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for zotero-mcp AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/robernetes/zotero-mcp/agents-md/github.svg)](https://agentmods.dev/instructions/robernetes/zotero-mcp/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/robernetes/zotero-mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/robernetes/zotero-mcp/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for zotero-mcp AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/robernetes/zotero-mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/robernetes/zotero-mcp/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,017 This file is loaded in full into every session.
When invoked 2,017 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.02017 $0.02017
Opus 5.5 $0.00807 $0.00807
Sonnet 5.5 $0.00403 $0.00403
Haiku 4.5 $0.00202 $0.00202

Measured yesterday against content hash b8fb2d6abc85, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

zotero-mcp AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 90 lines

How it starts

The opening of the file, as written. The whole thing — 90 lines — stays where its author put it; the contents beside it link to each section on GitHub.

zotero-mcp — instrucciones para agentes

Servidor MCP por stdio (Node ≥ 18, ESM, JavaScript sin compilar) para la biblioteca local de Zotero, empaquetado como plugin de Antigravity (plugin.json, mcp_config.json, skills/). Lee de la API local de Zotero, guarda items nuevos a través del conector de Zotero y edita documentos .md/.docx del usuario. Uso, herramientas y configuración para el usuario: README.md.

Mapa del repositorio

  • src/server.js: entrada stdio. src/app.js: createServer(ctx) registra todas las herramientas (los tests lo usan en memoria).
  • src/context.js: variables de entorno → config y clientes compartidos (ToolContext).
  • src/tools/: registro de herramientas por área (library, citations = Markdown, word = .docx, external); shared.js tiene ok/fail/run.
  • src/zotero-client.js (API local, lectura), src/zotero-connector.js (conector, guardar), src/external-search.js (OpenAlex/Crossref).
  • src/cite.js (citeproc y registro de citas en memoria), src/bib-section.js (sección de referencias en Markdown), src/docx.js (OOXML y campos ZOTERO_ITEM/ZOTERO_BIBL), src/file-io.js (escritura segura), src/workspace.js (carpetas permitidas).
  • src/csl/, src/locales/: estilos y locales CSL de terceros (CC-BY-SA 3.0); no editarlos a mano.
  • skills/zotero-research/SKILL.md: instrucciones para el agente que usa el MCP.
  • estructura-skills-mcp-plugins-antigravity.md: guía genérica de plugins de Antigravity con ejemplos ficticios (SQL, SAP); no describe este proyecto.

Límites de arquitectura

  • Solo src/server.js, src/app.js y src/tools/ importan @modelcontextprotocol/sdk o zod. Los clientes y la lógica de documentos no dependen de MCP.
  • Las herramientas reciben sus dependencias por ctx; no crean clientes ni leen process.env. Una variable nueva se lee en loadConfig con envValue (que ignora ${VAR} sin expandir) y se añade a .env.example, mcp_config.json y la tabla de configuración de ambos README.
  • Los handlers envuelven la lógica en run(...) y responden con ok(payload) / fail(mensaje); los errores son mensajes en español que dicen qué hacer.
  • stdout es el canal JSON-RPC: nada de console.log en src/; diagnóstico solo con console.error.
  • Toda ruta de documento pasa por workspace.resolve(filePath, { extensions }) antes de leerla.
  • Toda escritura de documento va dentro de withFileLock, lee con readFileForEdit/openDocx y escribe con writeFileAtomic/saveDocx (huella mtime/tamaño, .bak, renombrado atómico). Nunca fs.writeFile directo sobre un documento.
  • Las herramientas que escriben solo lo hacen con apply: true; sin él devuelven vista previa.
  • Biblioteca de Zotero: solo lectura por la API local; la única escritura es zotero_add_item (conector, apply: true). No añadir operaciones que editen o borren items.
  • src/docx.js parsea con preserveOrder y sin procesar entidades para que abrir → guardar reproduzca el documento: decodificar con decodeXml al leer y codificar con encodeXml al crear nodos. No cambiar XML_OPTS sin pruebas de ida y vuelta en tests/docx.test.js.
  • Las citas .docx siguen el formato del plugin de Word (URI del item, citationID aleatorio, noteIndex 0) y ensureDocumentPrefs nunca pisa preferencias existentes.
  • Estilos y locales: AVAILABLE_STYLES y LOCALES en src/cite.js se leen de src/csl/<nombre>.csl y src/locales/locales-<código>.xml al arrancar; no hay listas fijas que mantener.
  • La versión sale solo de package.json (src/version.js).

Read the full file on GitHub · 90 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 90 lines · 2,017 tokens per session scan A b8fb2d6abc85

Subscribe to this mod's changes

zotero-mcp AGENTS.md is an instructions file published in the GitHub repository Robernetes/zotero-mcp (1 stars, last pushed yesterday), licensed MIT. It adds 2,017 tokens to every session, about $0.0081 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-05.

Related

zotero-mcp AGENTS.md compared with instructions from other repositories

zotero-mcp AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
zotero-mcp AGENTS.mdRobernetes/zotero-mcpInstructions file1yesterdayMITA2,017Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode