MCP Gateway is a gateway that routes Model Context Protocol requests from GitHub Agentic Workflows to configured MCP servers. It gives AI agents running in sandboxed environments access to MCP tools through a containerized or directly run service. The catalogue add-ons support operating and configuring the gateway in agent workflows.
Borrowing it
Nothing to install: this file belongs to github/gh-aw-mcpg. 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/github/gh-aw-mcpg/main/AGENTS.mdgit clone --depth 1 https://github.com/github/gh-aw-mcpgWrote 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/github/gh-aw-mcpg/agents-md)<a href="https://agentmods.dev/instructions/github/gh-aw-mcpg/agents-md"><img src="https://agentmods.dev/badge/instructions/github/gh-aw-mcpg/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/github/gh-aw-mcpg/agents-md"><img src="https://agentmods.dev/badge/instructions/github/gh-aw-mcpg/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.08608 | $0.08608 |
| Opus 5.5 | $0.03443 | $0.03443 |
| Sonnet 5.5 | $0.01722 | $0.01722 |
| Haiku 4.5 | $0.00861 | $0.00861 |
Grade A, and why
gh-aw-mcpg 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 yesterday.
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.
How it starts
The opening of the file, as written. The whole thing — 587 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md
Quick reference for AI agents working with MCP Gateway (Go-based MCP proxy server).
Quick Start
Install: make install (install toolchains and dependencies)
Build: make build (builds awmg binary)
Test: make test (run unit tests, no build required)
Test-Unit: make test-unit (run unit tests only)
Test-Integration: make test-integration (run binary integration tests, auto-builds binary if not present)
Test-All: make test-all (run both unit and integration tests; always builds the binary first)
Test-CI: make test-ci (unit tests with coverage and JSON output for CI)
Lint: make lint (runs go vet, gofmt checks, and golangci-lint)
Coverage: make coverage (unit tests with coverage report)
Format: make format (auto-format code with gofmt)
Clean: make clean (remove build artifacts)
Agent-Finished: make agent-finished (run format, build, lint, and all tests (unit, integration, Rust guard) - ALWAYS run before completion)
Run: ./awmg --config config.toml
Run sequentially: ./awmg --config config.toml --sequential-launch
Run with Custom Log Directory: ./awmg --config config.toml --log-dir /path/to/logs
Run with Custom Payload Directory: ./awmg --config config.toml --payload-dir /path/to/payloads
Project Structure
internal/auth/- Authentication header parsing and middlewareinternal/cmd/- CLI (Cobra)internal/config/- Config parsing (TOML/JSON) with validation; the package is split across multiple filesconfig_core.go- CoreConfig,GatewayConfig, andServerConfigtypes plus TOML loadingconfig_stdin.go- JSON stdin structs and stdin→internal config conversionconfig_env.go,config_feature.go,config_tracing.go- Environment- and feature-specific config helpersvalidation.go,validation_env.go,validation_schema.go- Fail-fast field, environment, and schema validationvalidation_test.go- Comprehensive validation tests
internal/delegation/- Delegation envelope, capability, and audit logicinternal/difc/- Decentralized Information Flow Controlinternal/enclavegithub/- Enclave-scoped GitHub capability/policy/route handling for delegationinternal/envutil/- Environment variable and Docker env-arg utilitiesinternal/githubhttp/- GitHub API-specific HTTP helpers (auth headers, collaborator permission, rate-limit parsing)internal/guard/- Security guards (NoopGuard, WasmGuard, WriteSinkGuard)internal/hmacutil/- HMAC-SHA256 request signing and verification helpersinternal/httputil/- Generic HTTP helper utilities (server, proxy)internal/jqutil/- Shared gojq compiler options (security: $ENV access disabled)internal/launcher/- Backend process managementinternal/logger/- Debug logging framework (micro logger)internal/mcp/- MCP protocol types with enhanced error logginginternal/mcpresult/- MCP result text content helpersinternal/middleware/- HTTP middleware (jq schema processing)internal/mountspec/- Container bind-mount declaration parsinginternal/oidc/- GitHub Actions OIDC token provider and cachinginternal/proxy/- Filtering HTTP proxy for the GitHub API with DIFC enforcementinternal/reposelector/- Canonical/legacy GitHub owner and repository selector validation shared by guard policies, enclave policies, and delegated identitiesinternal/restroute/- Shared REST path-matching helpersinternal/sanitize/- Sensitive data redaction utilities (SanitizeString,SanitizeJSON,RedactSecret) for safe log outputinternal/server/- HTTP server (routed/unified modes)internal/util/- String, formatting, randomness, and JSON deep-clone utilitiesinternal/syncutil/- Concurrency utilitiesinternal/sys/- System utilitiesinternal/testutil/- Test utilities and helpersinternal/tracing/- OpenTelemetry tracing setup and OTLP exportinternal/tty/- Terminal detection utilitiesinternal/urlutil/- URL hostname extraction utilities (used by guard and middleware for domain audit logging)internal/version/- Version management
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.
- yesterday Changed · +7 lines · +119 tokens per session 1c41e79d7716
- 3d ago Changed f4aa11eee632
- 1mo ago Changed · +20 lines · +439 tokens per session bf25919093e3
- 1mo ago Changed · +5 lines · +95 tokens per session 6a94df932edf
- 1mo ago Changed · +6 lines · +221 tokens per session 063527fb6a0b
- 1mo ago Changed · -7 tokens per session 049029737599
- 1mo ago First seen · 549 lines · 7,741 tokens per session scan A 08e446b64b72
gh-aw-mcpg AGENTS.md is an instructions file published in the GitHub repository github/gh-aw-mcpg (181 stars, last pushed today), licensed MIT. It adds 8,608 tokens to every session, about $0.0344 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.
Other instructions, from other repositories
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
next.js AGENTS.md
AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
deepseek-harness AGENTS.md
AGENTS.md instructions for deepseek-ai/deepseek-harness, covering agents.md, pre-stable apis and released session data, repository layout, commands and host sandbox failures.
vscode copilot-instructions.md
Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).