gh-aw-mcpg: Instructions file for Codex

AGENTS.md

gh-aw-mcpg AGENTS.md is an instructions file for Codex, OpenCode from github/gh-aw-mcpg. It costs 8,608 tokens per session, scanned A, original, MIT.

A project guide for coding agents working on a Go-based MCP Gateway, a proxy that connects applications to MCP services. It lists common commands, project structure, and configuration examples.

In plain words
What is it for?
Use it when installing dependencies, building the gateway, running unit or integration tests, checking coverage, formatting code, linting, or starting the gateway with a configuration file.
Why use it?
It gives an agent the project-specific rules and commands needed to work consistently without guessing how to build, test, lint, or run the software.

Instructions file for CodexOpenCode ✓ vendor

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

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

About the project

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.

github/gh-aw-mcpg · 181 stars · on GitHub

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/github/gh-aw-mcpg/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/github/gh-aw-mcpg

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 gh-aw-mcpg AGENTS.md

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

agentmods 80×15 button for gh-aw-mcpg AGENTS.md

Your own site · 80×15
<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>
Per session 8,608 This file is loaded in full into every session.
When invoked 8,608 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.08608 $0.08608
Opus 5.5 $0.03443 $0.03443
Sonnet 5.5 $0.01722 $0.01722
Haiku 4.5 $0.00861 $0.00861

Measured yesterday against content hash 1c41e79d7716, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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.

AGENTS.md · 587 lines

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 middleware
  • internal/cmd/ - CLI (Cobra)
  • internal/config/ - Config parsing (TOML/JSON) with validation; the package is split across multiple files
    • config_core.go - Core Config, GatewayConfig, and ServerConfig types plus TOML loading
    • config_stdin.go - JSON stdin structs and stdin→internal config conversion
    • config_env.go, config_feature.go, config_tracing.go - Environment- and feature-specific config helpers
    • validation.go, validation_env.go, validation_schema.go - Fail-fast field, environment, and schema validation
    • validation_test.go - Comprehensive validation tests
  • internal/delegation/ - Delegation envelope, capability, and audit logic
  • internal/difc/ - Decentralized Information Flow Control
  • internal/enclavegithub/ - Enclave-scoped GitHub capability/policy/route handling for delegation
  • internal/envutil/ - Environment variable and Docker env-arg utilities
  • internal/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 helpers
  • internal/httputil/ - Generic HTTP helper utilities (server, proxy)
  • internal/jqutil/ - Shared gojq compiler options (security: $ENV access disabled)
  • internal/launcher/ - Backend process management
  • internal/logger/ - Debug logging framework (micro logger)
  • internal/mcp/ - MCP protocol types with enhanced error logging
  • internal/mcpresult/ - MCP result text content helpers
  • internal/middleware/ - HTTP middleware (jq schema processing)
  • internal/mountspec/ - Container bind-mount declaration parsing
  • internal/oidc/ - GitHub Actions OIDC token provider and caching
  • internal/proxy/ - Filtering HTTP proxy for the GitHub API with DIFC enforcement
  • internal/reposelector/ - Canonical/legacy GitHub owner and repository selector validation shared by guard policies, enclave policies, and delegated identities
  • internal/restroute/ - Shared REST path-matching helpers
  • internal/sanitize/ - Sensitive data redaction utilities (SanitizeString, SanitizeJSON, RedactSecret) for safe log output
  • internal/server/ - HTTP server (routed/unified modes)
  • internal/util/ - String, formatting, randomness, and JSON deep-clone utilities
  • internal/syncutil/ - Concurrency utilities
  • internal/sys/ - System utilities
  • internal/testutil/ - Test utilities and helpers
  • internal/tracing/ - OpenTelemetry tracing setup and OTLP export
  • internal/tty/ - Terminal detection utilities
  • internal/urlutil/ - URL hostname extraction utilities (used by guard and middleware for domain audit logging)
  • internal/version/ - Version management

Read the full file on GitHub · 587 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. yesterday Changed · +7 lines · +119 tokens per session 1c41e79d7716
  2. 3d ago Changed f4aa11eee632
  3. 1mo ago Changed · +20 lines · +439 tokens per session bf25919093e3
  4. 1mo ago Changed · +5 lines · +95 tokens per session 6a94df932edf
  5. 1mo ago Changed · +6 lines · +221 tokens per session 063527fb6a0b
  6. 1mo ago Changed · -7 tokens per session 049029737599
  7. 1mo ago First seen · 549 lines · 7,741 tokens per session scan A 08e446b64b72

Subscribe to this mod's changes

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.

Related

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).

microsoft/vscode · 9,715 tokens

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.

vercel/next.js · 7,581 tokens

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).

microsoft/vscode · 5,262 tokens

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.

langchain-ai/langchain · 4,680 tokens

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.

deepseek-ai/deepseek-harness · 4,261 tokens

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).

microsoft/vscode · 2,731 tokens