mcp: Instructions file for Codex

AGENTS.md

mcp AGENTS.md is an instructions file for Codex, OpenCode from fastly/mcp. It costs 1,360 tokens per session, scanned A, original, MIT.

Repository instructions for Fastly's MCP server, covering setup, testing, coding conventions, debugging, and how its tools should be used.

In plain words
What is it for?
Use them when developing, testing, formatting, or debugging the Fastly MCP server.
Why use it?
They provide the project's required workflow and prevent changes that would conflict with its public tool design.

Instructions file for CodexOpenCode

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

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

View source ↗ fastly/mcp
Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/fastly/mcp/ng/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/fastly/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 mcp AGENTS.md

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

agentmods 80×15 button for mcp AGENTS.md

Your own site · 80×15
<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>
Per session 1,360 This file is loaded in full into every session.
When invoked 1,360 The same file — it is already loaded in full.
Security scan A 1 finding. 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.01360 $0.01360
Opus 5.5 $0.00544 $0.00544
Sonnet 5.5 $0.00272 $0.00272
Haiku 4.5 $0.00136 $0.00136

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

Security

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
AGENTS.md · 33 lines

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, and FASTLY_MCP_ENCRYPT_TWEAK configure the server; do not enable an Inspector for --remote-http, including through NODE_OPTIONS or Bun options.

Conventions

  • Keep the public MCP surface to search, inspect, and execute. The intended assistant flow is search, inspect only when full call details are needed, then focused JavaScript execution.
  • execute snippets must use return; console output is separate from the result, and Fastly methods return values directly rather than through .result. Use pre-instantiated camel-case globals such as serviceApi, statsApi, purgeApi, and tlsCertificatesApi in project-facing examples and generated usage.
  • Preserve result contracts: search and inspect return { ok: true, ... } or { ok: false, error }, while execute returns { result, ... } or { error, outcome? }. Omit inapplicable optional fields instead of using null, and never expose the internal outcome field through the MCP execute response.
  • Keep discovery two-tiered: search returns a compact projection, including ready-to-run usage, while inspect supplies 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 sandbox fetch, and exposes the full index; --remote-http requires a caller Fastly-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 read process.env.FASTLY_API_TOKEN; pass validated request authority explicitly from main.js.
  • Preserve composition-root authority and factory injection. System dependencies, credentials, clocks, timers, fetch implementations, sinks, and test overrides enter through main.js or 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, port 8231, and /mcp; --http-json and --http-sse are mutually exclusive and affect only modern 2026-07-28 exchanges, while the 2025 fallback always uses SSE. Modern requests need Mcp-Protocol-Version, Mcp-Method, and Mcp-Name for tools/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.md is generated input for the runtime index, not executable sandbox guidance. Do not copy upstream apiInstance promise examples; regenerate documentation with bun run update-docs rather 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, and src/compression-advisor.js. All of them use src/api-adapter.js. An owned class that the SDK also exports has to be listed in its module's REPLACED_SDK_CLASSES, which drops the generated operations from the index. Any undeclared overlap fails at startup, in src/api-index.js and in src/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.js gives it a call(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 has synthetic: true and no HTTP route. It returns aggregated findings with a *_source next to every value, never raw log records, and it stops before the deadline with the unfinished work marked.

Read the full file on GitHub · 33 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. 26d ago Changed · +1 lines · +118 tokens per session 7b8f7f345f81
  2. 27d ago Changed · +1 lines · +121 tokens per session 1012d052dd01
  3. 1mo ago Changed · +7 tokens per session 7bcebea3223d
  4. 1mo ago Changed · +313 tokens per session 8aa5bed2887b
  5. 2mo ago First seen · 31 lines · 801 tokens per session scan A e9d13f183589

Subscribe to this mod's changes

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.

Related

mcp AGENTS.md compared with instructions from other repositories

mcp AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
mcp AGENTS.mdfastly/mcpInstructions file394d agoMITA1,360Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode