Borrowing it
Nothing to install: this file belongs to fastly/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/fastly/mcp/ng/AGENTS.mdgit clone --depth 1 https://github.com/fastly/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/fastly/mcp/agents-md)<a href="https://agentmods.dev/instructions/fastly/mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/fastly/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/fastly/mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/fastly/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.01360 | $0.01360 |
| Opus 5.5 | $0.00544 | $0.00544 |
| Sonnet 5.5 | $0.00272 | $0.00272 |
| Haiku 4.5 | $0.00136 | $0.00136 |
Grade A, and why
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 26d 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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
- debug: Use Bun and keep Node.js 24.12.0 or newer installed. `FASTLY_API_TOKEN=your-token bun run start`; `FASTLY_API_TOKEN=your-token bun run start:node`; `FASTLY_API_TOKEN=your-token bun run start:http`; `FASTLY_API_T How it starts
The opening of the file, as written. The whole thing — 33 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Workflow
- install:
bun install --frozen-lockfile - test all:
bun test - test file:
bun test <test-file> - test case:
bun test --test-name-pattern '<test-name>' <test-file> - lint:
bun run lint - format:
bun run format; lint and format fixes:bun run lint:fix - after every edit:
bun test && bun run lint - debug: Use Bun and keep Node.js 24.12.0 or newer installed.
FASTLY_API_TOKEN=your-token bun run start;FASTLY_API_TOKEN=your-token bun run start:node;FASTLY_API_TOKEN=your-token bun run start:http;FASTLY_API_TOKEN=your-token FASTLY_MCP_HTTP_AUTH_TOKEN=dev-token bun run src/index.js --transport http;bun src/index.js --help;bun src/index.js --version;curl http://127.0.0.1:8231/healthz.FASTLY_MCP_TRANSPORT,FASTLY_MCP_HTTP_PORT,FASTLY_MCP_HTTP_ALLOW_ORIGIN,FASTLY_MCP_HTTP_AUTH_TOKEN,FASTLY_MCP_ENCRYPT_SECRETS,FASTLY_MCP_ENCRYPT_KEY, andFASTLY_MCP_ENCRYPT_TWEAKconfigure the server; do not enable an Inspector for--remote-http, including throughNODE_OPTIONSor Bun options.
Conventions
- Keep the public MCP surface to
search,inspect, andexecute. The intended assistant flow is search, inspect only when full call details are needed, then focused JavaScript execution. executesnippets must usereturn; console output is separate from the result, and Fastly methods return values directly rather than through.result. Use pre-instantiated camel-case globals such asserviceApi,statsApi,purgeApi, andtlsCertificatesApiin project-facing examples and generated usage.- Preserve result contracts:
searchandinspectreturn{ ok: true, ... }or{ ok: false, error }, whileexecutereturns{ result, ... }or{ error, outcome? }. Omit inapplicable optional fields instead of usingnull, and never expose the internaloutcomefield through the MCP execute response. - Keep discovery two-tiered:
searchreturns a compact projection, including ready-to-runusage, whileinspectsupplies full descriptions, parameters, return types, constraints, and examples. A valid search with no matches still succeeds with an empty result and guidance. - Local and remote HTTP modes are distinct security and capability models. Local mode uses the process
FASTLY_API_TOKEN, permits sandboxfetch, and exposes the full index;--remote-httprequires a callerFastly-Key, derives mandatory per-caller secret protection, disallows fetch and file access, and must not be used to isolate mutually untrusted users. - Keep remote policy consistent across discovery and execution by updating
src/method-policy.js; a remotely denied operation must be hidden and refused. In remote mode, lower layers must not readprocess.env.FASTLY_API_TOKEN; pass validated request authority explicitly frommain.js. - Preserve composition-root authority and factory injection. System dependencies, credentials, clocks, timers, fetch implementations, sinks, and test overrides enter through
main.jsor factory options, never through caller-controlled flags, request data, or hidden global state. - Every external-work path needs a bound and cleanup for success, failure, timeout, and cancellation. Preserve byte, size, deadline, concurrency, and queue limits, and release timers, abort listeners, permits, streams, child processes, and cached in-flight state on every path.
- HTTP defaults are loopback
127.0.0.1, port8231, and/mcp;--http-jsonand--http-sseare mutually exclusive and affect only modern 2026-07-28 exchanges, while the 2025 fallback always uses SSE. Modern requests needMcp-Protocol-Version,Mcp-Method, andMcp-Namefortools/call; preserve the matching header/body validation and CORS allow-list entries. - Remote tests inject fake Fastly endpoints and host checks through code-only
runCli({ overrides })seams. Never add a CLI flag or environment variable that weakens those checks; macOS skips Linux hardening coverage, so execution-profile release qualification also needs Linux/Docker coverage. docs/*Api.mdis generated input for the runtime index, not executable sandbox guidance. Do not copy upstreamapiInstancepromise examples; regenerate documentation withbun run update-docsrather than editing generated API docs by hand.- Methods this server implements itself live in
src/ngwaf.js,src/log-explorer.js,src/observability-timeseries.js, andsrc/compression-advisor.js. All of them usesrc/api-adapter.js. An owned class that the SDK also exports has to be listed in its module'sREPLACED_SDK_CLASSES, which drops the generated operations from the index. Any undeclared overlap fails at startup, insrc/api-index.jsand insrc/sandbox.js. Verify an adapter against the live API before writing its guidance, and say in the description which claims are unverified. - A synthetic API, such as
compressionAdvisorApi, runs a whole analysis instead of one request.src/sandbox.jsgives it acall(apiClass, method, options)function that goes through the same operation and remote-policy checks as a snippet's calls, along with the execution deadline. Its index entry hassynthetic: trueand no HTTP route. It returns aggregated findings with a*_sourcenext to every value, never raw log records, and it stops before the deadline with the unfinished work marked.
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.
- 26d ago Changed · +1 lines · +118 tokens per session 7b8f7f345f81
- 27d ago Changed · +1 lines · +121 tokens per session 1012d052dd01
- 1mo ago Changed · +7 tokens per session 7bcebea3223d
- 1mo ago Changed · +313 tokens per session 8aa5bed2887b
- 2mo ago First seen · 31 lines · 801 tokens per session scan A e9d13f183589
mcp AGENTS.md is an instructions file published in the GitHub repository fastly/mcp (39 stars, last pushed 4d ago), licensed MIT. It adds 1,360 tokens to every session, about $0.0054 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
mcp AGENTS.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| mcp AGENTS.mdfastly/mcp | Instructions file | 39 | 4d ago | MIT | A | 1,360 | Codex, OpenCode |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | yesterday | 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 |
| deepseek-harness AGENTS.mddeepseek-ai/deepseek-harness | Instructions file | 274k | 2d ago | MIT | A | 4,313 | Codex, OpenCode |