contextboundary-gw
Exports telemetry data to OpenTelemetry collectors as a non-authoritative mirror, while JSONL remains the system of record.
contextboundary-gw
contextboundary-gw is a self-hosted MCP gateway that applies deterministic, compiled policy to tool discovery, invocation, and outbound data flow. No model is in the enforcement path.
AARM-aligned strict-determinism profile. All Core requirements (R1–R6) are implemented and CI-verified. Independent conformance review has not been undertaken.
R7 is a designed deterministic divergence: envelope-drift counting replaces semantic-distance tracking to keep a model out of the enforcement path. R8 OpenTelemetry export is implemented as a non-authoritative mirror; JSONL remains the system of record.
Quickstart
The test suite runs locally. It does not require a deployed Worker or any network access after git clone and npm ci.
git clone https://github.com/kannanokannan/contextboundary-gw.git
cd contextboundary-gw
npm ci
export TEST_AUDIT_SEAL_KEY='local-test-value'
export TEST_INTENT_ENVELOPE_BOOTSTRAP_KEY='local-owner-bootstrap-value'
npm run test:conformance
npm run test:interception
npm run test:receipts
npm run test:intent-envelope
npm run test:r4
npm run test:r6
npm run test:r8git clone https://github.com/kannanokannan/contextboundary-gw.git
Set-Location contextboundary-gw
npm ci
$env:TEST_AUDIT_SEAL_KEY = 'local-test-value'
$env:TEST_INTENT_ENVELOPE_BOOTSTRAP_KEY = 'local-owner-bootstrap-value'
npm run test:conformance
npm run test:interception
npm run test:receipts
npm run test:intent-envelope
npm run test:r4
npm run test:r6
npm run test:r8TEST_AUDIT_SEAL_KEY and TEST_INTENT_ENVELOPE_BOOTSTRAP_KEY are arbitrary, non-empty values used only by local tests; they are not production secrets. test:conformance and test:intent-envelope require both values. test:interception requires TEST_AUDIT_SEAL_KEY. The other four suites create their own ephemeral test material.
Suite | Coverage | Local execution |
| 21 normative policy scenarios | Local Worker |
| 9 assertions for discovery and invocation interception | Local Worker and local spy upstream |
| 10 assertions for chained receipts and public-key verification | Node-only |
| 28 assertions for frozen declared-intent envelopes | Local Worker |
| 14 assertions for MODIFY and DEFER outcomes | Local Worker and local spy upstream |
| 17 assertions for agent signatures, rotation, replay, and public-key verification | Local Worker |
| 10 assertions for OpenTelemetry export | Node-only with a local collector |
Related MCP server: protect-mcp
Mediation boundary
tools/callis evaluated before forwarding; only anallowdecision is proxied upstream.tools/listis evaluated; a non-ALLOW result returns an empty list, and an allowed upstream list is filtered to permitted capabilities and envelope scope.All other MCP methods are proxied to
UPSTREAM_MCP_URL, withboundary-*identity and signature headers stripped before forwarding.
The gateway also handles boundary/evaluate, boundary/session.start, and boundary/deferred.resume locally.
Receipts and verification
Decision receipts are hash-chained and sealed with Ed25519. Verification uses public keys only, so a third party can verify a receipt without a private key. HMAC-SHA256 is used only for the intent-envelope bootstrap proof, not for the gateway receipt seal.
Run the verifier with a receipt and public-key bundle:
node audit/verify-receipt.mjs receipt.json --public-keys public-keys.jsonSee audit/verify-receipt.mjs and the runnable AMS ticket-change example.
Current limitations
This is a self-hosted reference implementation, not a hosted service; it is not deployed.
Independent conformance review has not been undertaken.
R6 proves that the key registered to agent X signed an action. It does not identify the human behind that agent.
R7 deliberately differs from AARM's semantic-distance approach by using deterministic envelope-drift counting.
Production operation requires deployment-specific Worker bindings, an agent public-key registry, and gateway signing material configured outside this repository.
Specifications and related projects
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
Alicense-qualityCmaintenancePolicy enforcement gateway for MCP tool calls, evaluating every tool invocation against declarative YAML policies (allow/deny/escalate-to-human), generating cryptographic hash-chained audit receipts, and including built-in content safety scanning.Last updated2MIT- AlicenseBqualityCmaintenanceSecurity gateway that wraps any MCP server with per-tool policies, approval gates, and optional Ed25519-signed decision receipts. Shadow mode logs every tool call without blocking; enforce mode applies block, rate-limit, and minimum-tier rules. Receipts are independently verifiable offline with no accounts needed.Last updated51,6119MIT
- Alicense-qualityBmaintenanceSecurity gateway for MCP servers. Wraps any MCP server with per-tool policies (Cedar + JSON), Ed25519-signed decision receipts, human approval gates, and trust tiers. Shadow mode by default — logs everything, blocks nothing.Last updated1,6119MIT
- AlicenseAqualityAmaintenanceA zero-dependency MCP gateway: host your own tools, forward and curate tools from other MCP servers, expose them leanly to cut agent token cost, and gate every call through your own policy hooks before it runs.Last updated4041794MIT
Related MCP Connectors
Static MCP manifest and tool-policy security preflight with signed input-redacted receipts
A paid remote MCP for ZeroLang, built to return verdicts, receipts, usage logs, and audit-ready JSON
A paid remote MCP for CLI tool MCP, built to return verdicts, receipts, usage logs, and audit-ready
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/kannanokannan/contextboundary-gw'
If you have feedback or need assistance with the MCP directory API, please join our Discord server