doc2x-mcp: Instructions file for Codex

AGENTS.md

doc2x-mcp AGENTS.md is an instructions file for Codex, OpenCode from NoEdgeAI/doc2x-mcp. It costs 934 tokens per session, scanned C, original, MIT.

Repository instructions for NoEdgeAI/doc2x-mcp, a TypeScript server that connects tools to the Doc2x document-conversion API. They describe the source layout, build and test commands, runtime requirements, and coding conventions.

In plain words
What is it for?
Use them when developing, building, testing, or running the doc2x-mcp project, especially its PDF, image, conversion, download, and materialization modules.
Why use it?
They give an agent the project's expected structure and development workflow before it changes code. This helps avoid editing generated files or using inconsistent commands and styles.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md.

This is NoEdgeAI/doc2x-mcp's own configuration. It tells Codex and OpenCode how to work on doc2x-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 doc2x-mcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to NoEdgeAI/doc2x-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/NoEdgeAI/doc2x-mcp/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/NoEdgeAI/doc2x-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 doc2x-mcp AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/noedgeai/doc2x-mcp/agents-md/github.svg)](https://agentmods.dev/instructions/noedgeai/doc2x-mcp/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/noedgeai/doc2x-mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/noedgeai/doc2x-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 doc2x-mcp AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/noedgeai/doc2x-mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/noedgeai/doc2x-mcp/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 934 This file is loaded in full into every session.
When invoked 934 The same file — it is already loaded in full.
Security scan C 2 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.00934 $0.00934
Opus 5.5 $0.00374 $0.00374
Sonnet 5.5 $0.00187 $0.00187
Haiku 4.5 $0.00093 $0.00093

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

Security

Grade C, and why

doc2x-mcp AGENTS.md scanned grade C with 2 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 2mo ago.

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.

Downloads and executes remote codehighSupply chain

curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.

curl -fsSL https://raw.githubusercontent.com/NoEdgeAI/doc2x-mcp/main/scripts/install-skill.sh | sh

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -fsSL https://raw.githubusercontent.com/NoEdgeAI/doc2x-mcp/main/scripts/install-skill.sh | sh
AGENTS.md · 86 lines

How it starts

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

Repository Guidelines

Project Structure & Module Organization

  • src/: TypeScript source (ESM).
    • src/index.ts: MCP server entrypoint (stdio).
    • src/config/: runtime config parsing and defaults.
    • src/errors/: error model and error code definitions.
    • src/shared/: shared utilities.
    • src/mcp/: Tool registration and result shaping.
    • src/mcp/registerToolsShared.ts: Shared schemas, cache primitives, and atomic cache helpers.
    • src/doc2x/: Doc2x v2 API client logic (PDF/image/convert/download/materialize).
  • dist/: Build output (generated by tsc). Do not edit by hand.
  • .env.example: Sample env vars; .env is gitignored.

Build, Test, and Development Commands

  • npm install (or npm ci): Install dependencies.
  • npm run build: Compile TypeScript to dist/ via tsc -p tsconfig.json.
  • npm start: Run the MCP server (node dist/index.js).

Example local run:

DOC2X_API_KEY=sk-xxx npm run build && npm start

Coding Style & Naming Conventions

  • TypeScript (Node.js ESM, type: module); target Node >=18.
  • Prefer explicit errors and small modules; avoid over-abstraction.
  • Naming: camelCase for variables/functions, PascalCase for types/classes.
  • Formatting: keep diffs minimal; follow existing file style (no repo-wide formatter configured).

Testing Guidelines

  • Test runner: Node built-in test runner via node --test.
  • Available scripts:
    • npm run test:unit
    • npm run test:e2e
    • npm run test
  • Keep tests deterministic (no real network calls) and document new test entrypoints in package.json scripts.

Cache & Concurrency Guidelines

  • Keep cache access centralized in src/mcp/registerToolsShared.ts.
  • For UID caches, prefer shared atomic helpers (getSubmittedUidFromCache, setSubmittedUidCache, setFailedUidCache, deleteUidCache) instead of direct ctx.*Cache reads/writes in tool files.
  • For convert submit de-duplication, always go through runConvertSubmitAtomically; do not re-implement local in-flight maps.
  • Failed UID cache entries must use short TTL (failed state), successful/submitted entries use default TTL.
  • File signature strategy is stat-first plus digest reuse:
    • use size + mtimeMs as fast-path cache key for digest reuse
    • compute MD5 only on stat changes
    • keep sameSig as path/size precheck then digest confirm

Read the full file on GitHub · 86 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. 2mo ago First seen · 86 lines · 934 tokens per session scan C ab385e498806

Subscribe to this mod's changes

doc2x-mcp AGENTS.md is an instructions file published in the GitHub repository NoEdgeAI/doc2x-mcp (3 stars, last pushed 24d ago), licensed MIT. It adds 934 tokens to every session, about $0.0037 per session on Opus 5.5. A static security scan graded it C with 2 findings (downloads and executes remote code, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

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

doc2x-mcp AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
doc2x-mcp AGENTS.mdNoEdgeAI/doc2x-mcpInstructions file324d agoMITC934Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,649GitHub Copilot
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
vscode ai-customization.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA1,907GitHub Copilot