MCP-gateway enforcement surface: raise MCP-capable agents above advisory
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 28/100
Research direction
Start by reading compile/surfaces.py and docs/enforcement-surfaces.md to settle how mcp-gateway relates to the existing gateway reservation. For P3a, audit which agents support project-scoped MCP configuration and produce the gate-kind-by-surface mapping before any emitter work. Done means the naming, witnessable agent slice, and honest enforcement mapping are documented; the issue describes later implementation phases separately.
Written by the indexing model from the issue text.
Description
The gap
Pre-tool-use blocking covers two agents today (Claude Code, Cursor). Most of the remaining eleven cannot be hooked natively -- but many of them speak MCP. Their MCP tool calls can route through a local, Chock-governed proxy that evaluates each call against the repo's compiled gates before forwarding it.
This is also the enforcement vehicle for the Agent Plugins open standard: that format packages only skills and MCP servers, so today our agent-plugins tree is advisory-only. A gateway shipped as the package's MCP server upgrades the open format to carry deterministic enforcement -- agent-agnostically, without waiting for the spec to grow a hook API.
Naming: mcp-gateway, not gateway
Surface.GATEWAY already exists in compile/surfaces.py, reserved in docs/enforcement-surfaces.md for budget/egress backstop controls. This surface is a different thing: call it mcp-gateway. (Alternative: merge the two reservations -- decide before P3b, not after.)
Honest scope -- what actually rises
The gateway governs MCP-routed tool calls only. The agent's native tools (Copilot's shell, Gemini's file edits) never cross it. Consequences:
- Shell-text guards (block-destructive-commands, block-no-verify, protect-agent-config) do NOT rise for agents without native hooks. Claiming otherwise fails the do-not-claim list.
- What rises: policies expressible as MCP-call predicates -- file writes through MCP filesystem servers, network egress through fetch-type servers, tool-scope restriction, parameter inspection on MCP-backed databases/APIs.
- First deliverable is therefore a gate-kind x surface mapping: which compiled gate kinds can honestly bind at
mcp-gateway. No emitter work before that table exists. - Per-package claim vocabulary: enforced for MCP tool traffic, advisory for native tools -- stated in every emitted description, same convention as the Cursor caveat.
Two shapes, only one is enforcement
- A policy packaged as an MCP tool the agent may call (
verify_compliance) is advisory-plus: the agent can decline to call it. Not this issue. - A gateway: the client's MCP config lists the proxy as its server; the proxy wraps the real downstream servers (aggregator -- one proxy, many upstreams) and vetoes calls against compiled gates. That is the surface.
Witness rule (coverage honesty)
enforced requires BOTH: the gateway verifiably installed AND the committed MCP client config routes through it exclusively -- a config listing other servers alongside the gateway has an ungoverned route and stays advisory. User-level config outside the repo can still add direct servers; that boundary is stated, same as the git-hooks arm-on-clone boundary.
Fail posture
A stdio proxy spawned by the client fails closed by nature: proxy dead means MCP calls error. First surface where fail-closed comes free -- document it as such, plus the availability consequence.
Implementation notes (P3b)
- Stdlib-only Python, vendored like the gate runner; reuses the compiled gate evaluators -- no fresh string matching (position-blind token parsing is exactly catalog#11's bug class).
- JSON-RPC interception over stdin/stdout; line buffering (
bufsize=1) + explicit flush, or the pipe deadlocks. - Aggregator from day one: the exclusivity witness requires wrapping multiple downstream servers.
Phasing
- P3a (spec, no code): settle the name; audit which of the 13 agents are MCP-capable with project-scoped MCP config (the witnessable slice); write the gate-kind mapping.
- P3b: stdio proxy MVP governing 2-3 honest gate kinds, evals included.
- P3c: per-agent config emitters + witnesses; tiers rise agent-by-agent. Agent-plugins packages gain an
mcpServersgateway entry; marketplace descriptions carry the split claim.
Distribution follow-on
Once shipped, submit Chock to the MCP ecosystem registries/directories as governance middleware -- a channel the launch plan does not yet cover.
- Dominant language
- Python
- Stars
- 8
- Forks
- 1
- Avg merge
- 2h 48m
- Merged PRs (30d)
- 114
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from open-coder-ai/chock
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
open-coder-ai/chock#238 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
open-coder-ai/chock#231 ·
Maintainers usually reply within 1 day
-
good first issue help wanted
Difficulty 2/5 Half a day Newbie friendliness 85/100
open-coder-ai/chock#133 ·
Maintainers usually reply within 1 day
-
good first issue
Difficulty 3/5 Half a day Newbie friendliness 68/100
open-coder-ai/chock#132 ·
Maintainers usually reply within 1 day
-
good first issue
Difficulty 5/5 Over a week Newbie friendliness 45/100
open-coder-ai/chock#131 ·
Maintainers usually reply within 1 day
All issues in open-coder-ai/chock
Similar issues
-
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
gradio-app/gradio#13964 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 93/100
BSData/horus-heresy-3rd-edition#3232 · 1 comment ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
jbacalso24/mimry#123 ·
Maintainers usually reply within 1 day
-
p:3-mid pydanty:bug pydanty:is-working
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
pydantic/pydantic-ai#10153 · 1 comment ·
Maintainers usually reply within 1 day
-
good first issue priority: medium size: S testing
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
cubrid-lab/cubrid-cookbook-python#316 ·
Maintainers usually reply within 1 day