Borrowing it
Nothing to install: this file belongs to ForLegalAI/mcp-ms-office-documents. 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/ForLegalAI/mcp-ms-office-documents/master/AGENTS.mdgit clone --depth 1 https://github.com/ForLegalAI/mcp-ms-office-documentsWrote 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/forlegalai/mcp-ms-office-documents/agents-md)<a href="https://agentmods.dev/instructions/forlegalai/mcp-ms-office-documents/agents-md"><img src="https://agentmods.dev/badge/instructions/forlegalai/mcp-ms-office-documents/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/forlegalai/mcp-ms-office-documents/agents-md"><img src="https://agentmods.dev/badge/instructions/forlegalai/mcp-ms-office-documents/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.03569 | $0.03569 |
| Opus 5.5 | $0.01428 | $0.01428 |
| Sonnet 5.5 | $0.00714 | $0.00714 |
| Haiku 4.5 | $0.00357 | $0.00357 |
Grade A, and why
mcp-ms-office-documents 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 21d 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.
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.
How it starts
The opening of the file, as written. The whole thing — 251 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md
Operational brief for coding agents and humans alike. Rules here, reasons in
docs/development/.
What this is
An MCP server (FastMCP 4, Python 3.12) that turns Markdown or structured
input into Office files. Runs in Docker on port 8958, endpoint /mcp,
streamable-HTTP. Entry point main.py. Six static tools (Word, Excel,
PowerPoint, template listing, email, XML) plus dynamic tools registered from
YAML templates.
Commands
pip install -r requirements-dev.txt
ruff check . # lint (CI)
pytest -m "not network" # tests (CI); plain `pytest` includes network tests
pytest tests/test_docx_base.py # one module
python main.py # run locally, no .env needed
Layout
main.py tool handlers, startup order, health routes, server launch
config.py the only module that reads os.environ; get_config() singleton
async_runner.py run_blocking(): bounded thread pool for every blocking call
librechat_integration.py request-header user context; upload_and_format_response()
upload_tools/ upload_file() / upload_file_async() dispatch; backends/<strategy>.py
template_utils.py template file resolution (custom → default, container → local)
template_registry.py YAML merging (master + *.d/) for specs and for the
kind-wide _global.yaml; live tool removal
inline_markdown.py the inline-emphasis grammar shared by Word and PowerPoint
warning_channel.py DocumentWarning + WarningChannel: what a build worked around
image_utils.py image download/decode with the SSRF guard
metrics.py in-process counters for the admin Status page
docx_tools/ xlsx_tools/ pptx_tools/ email_tools/ xml_tools/ one package per type
admin/ optional FastHTML admin UI (ADMIN_ENABLED); app.py holds
routes only — components.py (markup + theme),
sections.py (the product areas and their tabs), kinds.py
(dynamic kinds), base_templates.py (static base
templates), forms.py, views/ (views/sections.py = the
tabbed shell, Overview and the dashboard;
views/settings.py = the Word style mapping)
docs/ user reference (docs/*.md) and development docs (docs/development/)
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.
- 21d ago Changed 012e9006ed62
- 22d ago Changed · +3 lines · +68 tokens per session 551ed25ce6bd
- 1mo ago Changed · +12 lines · +187 tokens per session f89c0568ae29
- 1mo ago Changed · +3 lines · +40 tokens per session ba0d18069f32
- 1mo ago Changed · +54 lines · +939 tokens per session 28e4ac80d044
- 1mo ago Changed · +39 lines · +599 tokens per session 998c1693a2b5
- 1mo ago Changed · +5 lines · +76 tokens per session 93a7f425ff5a
- 1mo ago Changed · +62 lines · -659 tokens per session 30f446cd6455
- 1mo ago Changed · +1 lines · +237 tokens per session 5bb38617e4ea
- 2mo ago First seen · 72 lines · 2,082 tokens per session scan A 91bc7096046d
mcp-ms-office-documents AGENTS.md is an instructions file published in the GitHub repository ForLegalAI/mcp-ms-office-documents (44 stars, last pushed 14d ago), licensed MIT. It adds 3,569 tokens to every session, about $0.0143 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-08-30.
mcp-ms-office-documents AGENTS.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| mcp-ms-office-documents AGENTS.mdForLegalAI/mcp-ms-office-documents | Instructions file | 44 | 14d ago | MIT | A | 3,569 | Codex, OpenCode |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 9,719 | GitHub Copilot |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 5,516 | 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 | today | MIT | A | 4,680 | Codex, OpenCode |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 3,093 | GitHub Copilot |
| vscode model-prompts.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 2,022 | GitHub Copilot |