MistralDocAI-mcp: Instructions file for Codex

AGENTS.md

MistralDocAI-mcp AGENTS.md is an instructions file for Codex, OpenCode from trsdn/MistralDocAI-mcp. It costs 1,602 tokens per session, scanned A, original, MIT.

Repository instructions for an MCP server that converts documents and images to Markdown using Mistral AI models. They explain its Node.js command-line wrapper, Python server, layout, setup, and communication rules.

In plain words
What is it for?
Use them when changing the server, its command-line program, Python code, package contents, setup process, or process communication.
Why use it?
They help coding agents avoid breaking startup, the tool interface, the published package, or the communication stream used by MCP clients.

Instructions file for CodexOpenCode

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

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

Reuse

Borrowing it

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

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/trsdn/mistraldocai-mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/trsdn/mistraldocai-mcp/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,602 This file is loaded in full into every session.
When invoked 1,602 The same file — it is already loaded in full.
Security scan A 1 finding. 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.01602 $0.01602
Opus 5.5 $0.00641 $0.00641
Sonnet 5.5 $0.00320 $0.00320
Haiku 4.5 $0.00160 $0.00160

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

Security

Grade A, and why

MistralDocAI-mcp AGENTS.md scanned grade A with 1 finding 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 1mo 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.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

interface, never on `child_process` directly, so tests can substitute
AGENTS.md · 152 lines

How it starts

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

Agent instructions

Read this before changing anything in this repository.

What this repository is

An MCP (Model Context Protocol) server that converts documents and images to Markdown using Mistral AI's OCR and vision models. It ships as the npm package @trsdn/mistraldocai-mcp-server and is consumed by MCP clients such as Claude Desktop, which launch it over stdio and call its tools. A change that breaks start-up, the tool contract, or the published tarball breaks every client that has it configured, silently, until someone restarts their client.

The package is a thin Node.js wrapper around a Python server. Node owns the CLI, the managed virtual environment under ~/.mistraldocai-mcp/, and the process lifecycle. Python owns the actual MCP protocol handling and the Mistral calls.

What this repository is not

It is not a general-purpose OCR library, and it is not the Mistral SDK. It has no HTTP surface: MCP clients speak to it over stdin and stdout, which is why every diagnostic message goes to stderr. Writing to stdout corrupts the protocol stream.

Nothing third-party is bundled or vendored. Node dependencies are resolved by npm from the registry at install time, and Python dependencies by pip into the managed virtual environment at first run; the published tarball carries only this project's own code.

Layout

Path Purpose
src/ TypeScript CLI and process supervision. Compiled to dist/.
src/python-environment.ts Interpreter discovery, virtual environment, dependency install. The seam that makes start-up testable.
python/mcp_server.py The MCP server itself: tool definitions and dispatch.
python/docmistral.py Document conversion and all Mistral API calls.
python/mcp_requirements.txt Python runtime dependencies. Every entry needs an upper bound.
python/requirements-dev.txt Python dev tooling (Ruff). Pinned exactly, and not shipped in the tarball.
scripts/setup.js npm postinstall hook. Must stay non-fatal; clients install without it.
scripts/verify_python_server.py Asserts the Python tool contract. The regression guard for the 1.0.4 breakage.
tests/ Jest unit tests. tests/support/ holds test doubles.
docs/self-assessment.md Per-criterion evidence behind .github/conformance.yml.

Read the full file on GitHub · 152 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. 1mo ago Changed · +5 lines · +50 tokens per session 2467b26a6bbc
  2. 2mo ago First seen · 147 lines · 1,552 tokens per session scan A 17c1fb6eb2b9

Subscribe to this mod's changes

MistralDocAI-mcp AGENTS.md is an instructions file published in the GitHub repository trsdn/MistralDocAI-mcp (2 stars, last pushed 2d ago), licensed MIT. It adds 1,602 tokens to every session, about $0.0064 per session on Opus 5.5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

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

MistralDocAI-mcp AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
MistralDocAI-mcp AGENTS.mdtrsdn/MistralDocAI-mcpInstructions file22d agoMITA1,602Codex, OpenCode
md-feedback copilot-instructions.mdyeominux/md-feedbackInstructions file57mo agononeA309GitHub Copilot
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,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