Skip to main content
Glama
ReproGate

ReproGate

by adimalkar

ReproGate

CI CodeQL M8ven Verified License

ReproGate is an action-contract layer for MCP tool execution. Its intended contract binds a policy decision or human approval to the exact tool, schema, arguments, authority, policy, and observed workspace state, then makes that binding available to an execution receipt. The current configured path does not yet enforce all of those fields at a durable write boundary.

The goal is narrower than “another MCP gateway”: make a tool action independently inspectable and make approval invalid as soon as the proposed action changes.

Current status: Phase 2 reference path and Phase 3 Git promotion

This repository contains the action-contract kernel, a plan-only MCP server by default, and the first opt-in Phase 2 execution boundary. It can:

  • discover tools through a small stable façade;

  • build deterministic, digest-bound action envelopes from an operator-controlled catalog;

  • return explainable allow, approval_required, or deny decisions;

  • issue and validate one-use capability tokens bound to an exact envelope;

  • create tamper-evident, hash-chained decision records.

  • persist plans and atomically consume approvals in SQLite;

  • re-check a live downstream MCP schema before one stdio call;

  • recover interrupted calls as indeterminate;

  • emit and independently verify signed Execution Receipt v1 records.

  • load a strict execution configuration with environment-referenced secrets;

  • bind and verify a downstream artifact before process spawn;

  • hash bounded filesystem manifests without retaining file contents.

  • bind a proposed patch digest to a read-only, clean Git worktree witness and exact path list.

  • stage a Git patch in a disposable index and record a host-side, revocable approval of its reviewed effect.

  • bind that approval to a persisted exact-action Git intent, current catalog, policy, and repository configuration.

  • authenticate operator-key decisions about an exact staged Git effect and atomically record linked approval evidence or a durable denial.

  • bind explicit V2 intents to a distinct unchecked-out destination without reinterpreting V1 approvals;

  • prepare exact candidate commit objects without moving protected refs, HEAD, index or worktree;

  • retain a cooperative host ownership fence across worker death, with exact-owner quiescent release.

  • permanently reserve one linked signed Git approval as immutable prepared intent in the existing SQLite ledger, with guarded raw revocation.

  • promote that exact candidate to the destination branch through a final gate with a durable admission and an expected-old compare-and-swap, recording confirmed, failed or indeterminate, with conservative recovery, through host-only git-review commands.

Execution is deliberately disabled in the default server and requires explicit executor wiring. The configured path is not a sandbox or a production authorization boundary. Git review authenticates a configured signing key and exact decision, not human presence or inspection. The host owns configuration, databases and key isolation. Protected-ref promotion runs only through the host-only git-review promote path with a version 2 configuration, and its claim is limited to that Git ref. See the Git change contract and limits.

Related MCP server: Vizier

Try it

Requirements: Node.js 22.13 or newer; Git workflows require Git 2.45 or newer. CI tests the maintained Node.js 22 and 24 release lines on Linux, macOS, and Windows.

npm install
npm run check
npm run demo

Run the MCP server over stdio:

npm run build
node dist/src/cli.js serve

The Phase 2 APIs are exported for explicit application wiring:

  • SqliteExecutionStore for durable plans, one-use approvals, and execution state;

  • StdioMcpConnector for configured downstream processes;

  • ReproGateExecutor for the fail-closed execution sequence;

  • signExecutionReceipt and verifyExecutionReceipt for receipt handling.

Approval issuance is intentionally out of band and reads its secret from the environment rather than command-line arguments:

REPROGATE_CAPABILITY_SECRET='<at-least-32-byte-secret>' \
  node dist/src/cli.js approve --config /absolute/path/reprogate.json '<action-id>'

REPROGATE_RECEIPT_SECRET='<at-least-32-byte-secret>' \
  node dist/src/cli.js verify-receipt --config /absolute/path/reprogate.json ./receipt.json

Do not treat these HMAC keys or filesystem observation as OS-level enforcement. See the threat model before enabling action.execute.

The separate host-only git-review CLI prepares an exact staged-effect request, signs an explicit operator-key decision, imports linked evidence, checks current authorization, and revokes ledger approval. Signing reads a protected key file only after staging and displays the full safely escaped diff; no default MCP approval tool is added. See the operator review guide for configuration, commands, limits and deployment separation.

The Git promotion foundations provide exact candidate objects and a cooperative ownership fence. Candidate preparation permits object/scratch writes and possible unreachable objects. The fence requires private host storage, cooperative writers and trusted-host child quiescence; it is not an OS sandbox. The prepared promotion journal permanently consumes an exact linked signed approval in the existing SQLite ledger and guards raw revocation. Prepared records and status reads grant no dispatch authority. A final gate rechecks authority under the fence and ledger lock, records a durable admission, and promotes with an expected-old compare-and-swap; outcomes are confirmed, failed or indeterminate, with conservative recovery. The host-only git-review promote, resume, status and recover commands drive it with a version 2 review configuration. See promoting a reviewed Git change.

The default server exposes exactly five tools, each with an output schema and conservative annotations:

  • catalog.search: names, descriptions and effects only

  • catalog.describe: one tool's input schema and the schemaDigest a plan binds

  • action.plan: a compact summary (actionId, decision, reasonCodes, nextStep) by default; pass detail: "full" for the full envelope

  • action.inspect: the complete persisted plan for one actionId

  • policy.explain

When an executor is explicitly supplied, the server also registers action.execute. With an opt-in mediation configuration, it also registers action.run, which runs policy-allow read-only plans, or plans an operator approved on the host with approve --hold, using a host-issued capability and returns redacted, bounded output. reprogate catalog import turns a configured backend's live tool list into reviewed catalog entries; see proxying a code graph. The CLI does this only after serve --config <absolute-path> successfully validates Runtime Configuration v1. See the configuration guide. The included default catalog remains a deterministic, plan-only demo fixture.

A host can also opt in to the advisory handoff_status and handoff_update tools with serve --handoff-config <absolute-path>. They keep durable, caller-asserted session context for one configured workspace and project it to .agent/handoff.md. They never authorize actions. See the handoff guide.

reprogate bench facade measures what the façade returns, in agent-visible bytes, on a published fixture, against stated baselines. See benchmarks for the numbers, their limits, and the manual two-host protocol.

reprogate research-server is an optional backend that fetches a public page and returns its most relevant passages within an estimated token budget, with server-side request forgery protections. You configure it like any other backend, so fetches are planned and receipted. See research.

Core invariant

An approval is valid for one exact action, not for a server or tool name in general:

tool identity + schema + arguments + policy + authority + workspace + expiry
                                  │
                                  ▼
                       canonical action digest
                                  │
                     one-use approval capability
                                  │
                                  ▼
                        execution receipt

Arguments are hashed and not stored raw in decision evidence. Tool schemas and effects come from an operator-controlled catalog, not from model-provided metadata. Workspace identity is reserved for gateway-observed values; the agent cannot label its own context as observed.

Why this wedge

MCP gateways, policy engines, audit proxies, replay tools, and provenance systems already exist. ReproGate is designed to integrate with those systems, not rebuild all of them. Its differentiator is the portable contract spanning pre-execution authority and post-execution verification.

See idea validation, the phased roadmap, the improvement backlog, and the threat model.

Contributing and security

Read CONTRIBUTING.md before opening a pull request. Security vulnerabilities should be reported privately according to SECURITY.md, never in a public issue.

License

Apache-2.0.

Available Tools

3 tools
action.planB

Create a digest-bound action envelope and evaluate deterministic policy; this Phase 1 tool never executes the action

Inputs: toolRef (required), arguments (required).

catalog.searchC

Search the trusted downstream tool catalog without exposing every schema

Inputs: limit, query.

policy.explainA

Explain the deterministic decision for a previously planned action

Inputs: actionId (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 3 tools

    Disambiguation5/5

    Each tool targets a distinct action: creating an action envelope with policy evaluation, searching the tool catalog, and explaining previous decisions. There is no overlap or ambiguity in their purposes.

    Naming Consistency5/5

    All tool names follow the same domain.verb lowercase pattern (action.plan, catalog.search, policy.explain). The naming is uniform, predictable, and clearly groups tools by their domain.

    Tool Count5/5

    Three tools is within the ideal range, and each tool serves a necessary and distinct function in the planning-and-policy workflow. The small set feels intentionally scoped rather than sparse.

    Completeness5/5

    The toolset covers the core workflow: discover actionable capabilities, plan an action with deterministic policy evaluation, and explain the resulting decision. As a Phase 1 non-executing gate, no obvious missing operations are present.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      B
      maintenance
      Retired snapshot of the former 15-tool Apache-2.0 beta. Use Living Stack Community for the free seven-tool proof edition; Complete Local is the paid runtime with memory, recovery, signed traces, release verification, and multi-agent workflows.
      14
      Apache 2.0
    • A
      license
      A
      quality
      B
      maintenance
      Owner-signed authorization before agent actions. Hosted Vizier v0.5.13 MCP: https://vizier.agendamcp.dpdns.org/mcp. ALLOW/BLOCK/REVIEW; anonymous calls never ALLOW. Your integration enforces the decision. SDK v0.5.13: https://www.npmjs.com/package/@agenda-intelligence/vizier-sdk. Grants are signed; legacy receipts are unsigned. Python stdio is a separate catalog.
      3
      MIT
    • A
      license
      C
      quality
      C
      maintenance
      Enables an AI agent to preflight concrete tool calls by recording principal, destination, scope, authority evidence, and relations, allowing only formed actions to execute and producing inspectable evidence receipts.
      1
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Provides a governed execution boundary for AI agents, enforcing deterministic policy, one-shot human approvals, and signed receipts for MCP tool effects.
      MIT