protoc-gen-go-mcp: Instructions file for Codex

AGENTS.md

protoc-gen-go-mcp AGENTS.md is an instructions file for Codex, OpenCode from stablekernel/protoc-gen-go-mcp. It costs 715 tokens per session, scanned B, original, Apache-2.0.

Repository instructions for a Go code generator that turns gRPC service definitions into MCP server code. It documents the project layout, required checks, and contribution conventions.

In plain words
What is it for?
Use it when modifying the generator or its example protocol files, and run formatting, vetting, building, and tests before opening a pull request.
Why use it?
It gives coding agents and developers the context needed to change the repository consistently and verify that generated code still builds and works.

Instructions file for CodexOpenCode

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

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

Reuse

Borrowing it

Nothing to install: this file belongs to stablekernel/protoc-gen-go-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/stablekernel/protoc-gen-go-mcp/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/stablekernel/protoc-gen-go-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 protoc-gen-go-mcp AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/stablekernel/protoc-gen-go-mcp/agents-md/github.svg)](https://agentmods.dev/instructions/stablekernel/protoc-gen-go-mcp/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/stablekernel/protoc-gen-go-mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/stablekernel/protoc-gen-go-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 protoc-gen-go-mcp AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/stablekernel/protoc-gen-go-mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/stablekernel/protoc-gen-go-mcp/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 715 This file is loaded in full into every session.
When invoked 715 The same file — it is already loaded in full.
Security scan B 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.00715 $0.00715
Opus 5.5 $0.00286 $0.00286
Sonnet 5.5 $0.00143 $0.00143
Haiku 4.5 $0.00072 $0.00072

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

Security

Grade B, and why

protoc-gen-go-mcp AGENTS.md scanned grade B 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 29d 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.

Strips warnings and disclaimersmediumAnti-refusal

Omitting safety caveats hides risk from the user and is a common jailbreak preamble.

- Generated code must compile without warnings from `go vet`, and its
AGENTS.md · 65 lines

How it starts

The opening of the file, as written. The whole thing — 65 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AGENTS.md

Guidance for coding agents (and humans) working in this repository. See docs/GOAL.md for what we're building and what's out of scope, and CONTRIBUTING.md for the human process.

What this is

protoc-gen-go-mcp is a protoc plugin. For each gRPC service in a .proto file it generates <file>_mcp.pb.go: an MCP (Model Context Protocol) server that exposes each non-streaming RPC as an MCP tool and forwards tool calls to a gRPC client.

  • cmd/protoc-gen-go-mcp/: the plugin. main.go is the protogen entry point, and mcp.go emits the generated code (with g.P calls, not templates).
  • examples/protos/example.proto: the example VibeService.
  • examples/gen/example/v1/: the code generated from it, committed. example_mcp.pb.go is this plugin's output.
  • cmd/mcp-vibe/: a demo MCP server over stdio, backed by an in-process gRPC server for the example service.

Checks

Run all of these before opening a pull request, and paste the commands and their results in the PR:

gofmt -l .                # must print nothing
go vet ./...
go build ./...
go test ./...

If you changed the generator (cmd/protoc-gen-go-mcp/**) or the example proto, regenerate the committed examples and commit the result:

make generate   # needs protoc 29.3, protoc-gen-go v1.36.6, protoc-gen-go-grpc v1.5.1 on PATH
git status      # the regenerated files belong in the same PR

Once the golden-file test exists, update it with go test ./cmd/protoc-gen-go-mcp -run Golden -update and review the diff; an unexpected change in generated code is a bug until explained.

Conventions

  • Pull request titles must be Conventional Commits (enforced by CI; release-please builds the changelog from them): feat:, fix:, docs:, test:, ci:, refactor:, perf:, chore:, revert:. Use feat!: or fix!: and a BREAKING CHANGE: paragraph in the body for breaking changes to the generated API.
  • Reference the issue in the PR body (Closes #N).
  • Never edit generated files by hand (*.pb.go); change the generator or the proto and regenerate.
  • Don't touch CHANGELOG.md, .release-please-manifest.json or release-please-config.json, and don't bump versions: release-please owns them.
  • Don't change .github/workflows/** unless the issue asks for it.
  • Keep dependencies minimal; prefer the standard library, google.golang.org/protobuf and the MCP SDK. Pin versions in go.mod and commit go.sum.
  • Generated code must compile without warnings from go vet, and its exported API is public API: document any change to it in the PR.

Read the full file on GitHub · 65 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. 29d ago First seen · 65 lines · 715 tokens per session scan B c0f8a3bb914c

Subscribe to this mod's changes

protoc-gen-go-mcp AGENTS.md is an instructions file published in the GitHub repository stablekernel/protoc-gen-go-mcp (37 stars, last pushed 29d ago), licensed Apache-2.0. It adds 715 tokens to every session, about $0.0029 per session on Opus 5.5. A static security scan graded it B with 1 finding (strips warnings and disclaimers). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-09.

Related

protoc-gen-go-mcp AGENTS.md compared with instructions from other repositories

protoc-gen-go-mcp AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
protoc-gen-go-mcp AGENTS.mdstablekernel/protoc-gen-go-mcpInstructions file3729d agoApache-2.0B715Codex, 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