mcp-ms-office-documents: Instructions file for Codex

AGENTS.md

mcp-ms-office-documents AGENTS.md is an instructions file for Codex, OpenCode from ForLegalAI/mcp-ms-office-documents. It costs 3,569 tokens per session, scanned A, original, MIT.

Repository-specific instructions for an MCP server that creates Office files such as Word documents, spreadsheets, presentations, emails, and XML files. MCP is a standard way for AI tools to call services.

In plain words
What is it for?
Use them when developing or maintaining document-generation tools, upload backends, templates, middleware, or the server itself.
Why use it?
They explain the server's structure, conversion flow, templates, uploads, configuration, and authentication so changes fit the existing design.

Instructions file for CodexOpenCode

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

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

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/ForLegalAI/mcp-ms-office-documents/master/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/ForLegalAI/mcp-ms-office-documents

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 mcp-ms-office-documents AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/forlegalai/mcp-ms-office-documents/agents-md/github.svg)](https://agentmods.dev/instructions/forlegalai/mcp-ms-office-documents/agents-md)
Your own site
<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.

agentmods 80×15 button for mcp-ms-office-documents AGENTS.md

Your own site · 80×15
<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>
Per session 3,569 This file is loaded in full into every session.
When invoked 3,569 The same file — it is already loaded in full.
Security scan A 0 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.03569 $0.03569
Opus 5.5 $0.01428 $0.01428
Sonnet 5.5 $0.00714 $0.00714
Haiku 4.5 $0.00357 $0.00357

Measured 21d ago against content hash 012e9006ed62, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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.

AGENTS.md · 251 lines

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/)

Read the full file on GitHub · 251 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. 21d ago Changed 012e9006ed62
  2. 22d ago Changed · +3 lines · +68 tokens per session 551ed25ce6bd
  3. 1mo ago Changed · +12 lines · +187 tokens per session f89c0568ae29
  4. 1mo ago Changed · +3 lines · +40 tokens per session ba0d18069f32
  5. 1mo ago Changed · +54 lines · +939 tokens per session 28e4ac80d044
  6. 1mo ago Changed · +39 lines · +599 tokens per session 998c1693a2b5
  7. 1mo ago Changed · +5 lines · +76 tokens per session 93a7f425ff5a
  8. 1mo ago Changed · +62 lines · -659 tokens per session 30f446cd6455
  9. 1mo ago Changed · +1 lines · +237 tokens per session 5bb38617e4ea
  10. 2mo ago First seen · 72 lines · 2,082 tokens per session scan A 91bc7096046d

Subscribe to this mod's changes

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.

Related

mcp-ms-office-documents AGENTS.md compared with instructions from other repositories

mcp-ms-office-documents AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
mcp-ms-office-documents AGENTS.mdForLegalAI/mcp-ms-office-documentsInstructions file4414d agoMITA3,569Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,516GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
vscode model-prompts.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA2,022GitHub Copilot