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.
curl -O https://raw.githubusercontent.com/foundry-works/foundry-mcp/main/AGENTS.mdgit clone --depth 1 https://github.com/foundry-works/foundry-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/foundry-works/foundry-mcp/agents-md)<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.
<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>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.02295 | $0.02295 |
| Opus 5.5 | $0.00918 | $0.00918 |
| Sonnet 5.5 | $0.00459 | $0.00459 |
| Haiku 4.5 | $0.00230 | $0.00230 |
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.
Copies of this mod
1 near-identical copy found in the catalogue:
- foundry-mcp CLAUDE.md — 95% identical, 68 lines differ
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
- 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.
- 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. |
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.
- 2mo ago First seen · 50 lines · 2,295 tokens per session scan A aa21a3ba32e6
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.
foundry-mcp AGENTS.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| foundry-mcp AGENTS.mdfoundry-works/foundry-mcp | Instructions file | 4 | 7mo ago | MIT | A | 2,295 | Codex, OpenCode |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | today | MIT | A | 7,461 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 5,649 | GitHub Copilot |
| 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 ai-customization.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 1,907 | GitHub Copilot |