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.
curl -O https://raw.githubusercontent.com/trsdn/MistralDocAI-mcp/main/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/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.
<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>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.01602 | $0.01602 |
| Opus 5.5 | $0.00641 | $0.00641 |
| Sonnet 5.5 | $0.00320 | $0.00320 |
| Haiku 4.5 | $0.00160 | $0.00160 |
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 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. |
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.
- 1mo ago Changed · +5 lines · +50 tokens per session 2467b26a6bbc
- 2mo 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,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.
MistralDocAI-mcp AGENTS.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| MistralDocAI-mcp AGENTS.mdtrsdn/MistralDocAI-mcp | Instructions file | 2 | 2d ago | MIT | A | 1,602 | Codex, OpenCode |
| md-feedback copilot-instructions.mdyeominux/md-feedback | Instructions file | 5 | 7mo ago | none | A | 309 | GitHub Copilot |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | today | MIT | A | 7,461 | Codex, OpenCode |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 149k | yesterday | MIT | A | 4,680 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 5,516 | GitHub Copilot |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 3,093 | GitHub Copilot |