foundry-mcp: Instructions file for Codex

AGENTS.md

foundry-mcp AGENTS.md is an instructions file for Codex, OpenCode from foundry-works/foundry-mcp. It costs 2,295 tokens per session, scanned A, original, MIT.

Repository instructions for working on foundry-mcp, an MCP project, including required reading, coding decisions, documentation, tests, and review checks.

In plain words
What is it for?
Starting work sessions, choosing the right development guidance, making MCP changes, and completing the required review checklist.
Why use it?
They give an agent the project's rules before it changes code. This helps keep related code, specifications, documentation, and tests aligned.

Instructions file for CodexOpenCode

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

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

Reuse

Borrowing it

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

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/foundry-works/foundry-mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/foundry-works/foundry-mcp/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,295 This file is loaded in full into every session.
When invoked 2,295 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.02295 $0.02295
Opus 5.5 $0.00918 $0.00918
Sonnet 5.5 $0.00459 $0.00459
Haiku 4.5 $0.00230 $0.00230

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

Security

Grade A, and why

foundry-mcp 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 2mo 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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

AGENTS.md · 50 lines

How it starts

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

Agent Operating Guide

This repository follows the MCP Tool Industry Best Practices located under dev_docs/mcp_best_practices. Treat this file as the root-level contract for how to work inside foundry-mcp.

Session Kickoff

  1. Always skim dev_docs/mcp_best_practices/README.md#L24-L77 when starting a session. This provides the index of authoritative guidance and the code-review checklist you must use before any PR.
  2. Map your planned edits to the decision matrix below and re-open the referenced documents before modifying code, specs, or tests.

Best-Practice Decision Matrix

Workstream Required Reads Non-Negotiable Actions
New tools, features, or contract tweaks dev_docs/codebase_standards/mcp_response_schema.md (canonical response contract), dev_docs/mcp_best_practices/01-versioned-contracts.md#L9-L127, dev_docs/mcp_best_practices/02-envelopes-metadata.md#L30-L285, dev_docs/mcp_best_practices/03-serialization-helpers.md#L29-L220, dev_docs/mcp_best_practices/04-validation-input-hygiene.md#L10-L223, dev_docs/mcp_best_practices/08-security-trust-boundaries.md#L10-L345 Tag every response with schema versions, build envelopes via helpers, validate inputs up front, and enforce security/rate limits before business logic. Document any contract change in specs and PR notes.
Pagination, streaming, batching, or bulk results dev_docs/mcp_best_practices/06-pagination-streaming.md#L32-L332 and dev_docs/mcp_best_practices/07-error-semantics.md#L11-L274 Use cursor-based pagination, mark partial results, expose meta.pagination, and emit actionable errors/warnings following the standard structure.
Observability, telemetry, resilience, or timeout logic dev_docs/mcp_best_practices/05-observability-telemetry.md#L12-L333 and dev_docs/mcp_best_practices/12-timeout-resilience.md#L12-L398 Prefer structured logging, propagate correlation IDs, add metrics/tracing hooks, document timeout budgets, and justify retries/circuit breakers.
Feature flags, staged rollouts, or gated experiments dev_docs/mcp_best_practices/14-feature-flags.md#L10-L330 Document flag lifecycle phases, expose flag status via capabilities, keep override controls ready for rollback, and test both enabled/disabled paths before shipping.
Concurrency, async orchestration, or parallel workloads dev_docs/mcp_best_practices/15-concurrency-patterns.md#L10-L420 and dev_docs/mcp_best_practices/12-timeout-resilience.md#L12-L398 Declare sync vs async execution in tool docs, enforce concurrency/rate limits, propagate cancellation, and avoid blocking the event loop—fall back to thread/process pools for CPU work.
AI-/LLM-facing ergonomics, tool metadata, or discovery flows dev_docs/mcp_best_practices/11-ai-llm-integration.md#L11-L352, dev_docs/mcp_best_practices/13-tool-discovery.md#L12-L505, and dev_docs/codebase_standards/naming-conventions.md Keep responses concise and structured, design for tool chaining, keep tool descriptions/schemas updated with usage examples, tags, and rate limits, and enforce the canonical prefixes from the naming conventions guide.
CLI runtime, naming, or output changes dev_docs/cli_best_practices/README.md, dev_docs/codebase_standards/cli-output.md Follow JSON-first output, reuse shared runtime helpers, and document namespace/prefix decisions alongside MCP counterparts.

Read the full file on GitHub · 50 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. 2mo ago First seen · 50 lines · 2,295 tokens per session scan A aa21a3ba32e6

Subscribe to this mod's changes

foundry-mcp AGENTS.md is an instructions file published in the GitHub repository foundry-works/foundry-mcp (4 stars, last pushed 7mo ago), licensed MIT. It adds 2,295 tokens to every session, about $0.0092 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-31.

Related

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

foundry-mcp AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
foundry-mcp AGENTS.mdfoundry-works/foundry-mcpInstructions file47mo agoMITA2,295Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,649GitHub Copilot
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
vscode ai-customization.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA1,907GitHub Copilot