Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add instructions/trsdn/mistraldocai-mcp/agents-mdgit clone --depth 1 https://github.com/trsdn/MistralDocAI-mcpWrote 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.
[](https://agentmods.dev/instructions/trsdn/mistraldocai-mcp/agents-md)<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="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.01552 | $0.01552 |
| Opus 5 | $0.00776 | $0.00776 |
| Sonnet 5 | $0.00310 | $0.00310 |
| Haiku 4.5 | $0.00155 | $0.00155 |
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 5d 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 How it starts
The opening of the file, as written. The whole thing — 147 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.
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. |
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.
- 5d ago First seen · 147 lines · 1,552 tokens per session scan A 17c1fb6eb2b9
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,552 tokens to every session, about $0.0078 per session on Opus 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.
Other instructions, from other repositories
liteparse AGENTS.md
AGENTS.md instructions for run-llama/liteparse, covering liteparse - agent documentation, project overview, key capabilities, directory structure and data flow.
neurostack CLAUDE.md
Instructions for raphasouthall/neurostack, covering neurostack - claude code guide, quick reference, installation, mcp server (recommended for claude code) and openai-compatible api.
kafka-schema-reg-mcp AGENTS.md
AGENTS.md instructions for aywengo/kafka-schema-reg-mcp, covering development guidelines, prerequisites, quick setup, install dependencies and install dev dependencies (optional but recommended).
zen CLAUDE.md
Claude Code instructions for sheshbabu/zen, covering claude.md, development commands, build commands, dependencies and go build tags.
ls-mcp AGENTS.md
AGENTS.md instructions for lirantal/ls-mcp, covering agents.md, start here, documentation, prs and issues and releases.
ocr-mcp AGENTS.md
AGENTS.md instructions for sandraschi/ocr-mcp, covering ocr-mcp — agent guide, entry points, quick ref, standards and key files.