contextboundary-gw

contextboundary-gw

Self-hosted MCP gateway that applies deterministic, compiled policy to tool discovery, invocation, and outbound data flow, with no model in the enforcement path. Every decision emits a hash-chained receipt sealed with Ed25519 and verifiable using public keys only.

Category
访问服务器

README

contextboundary-gw

PR gate

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:r8
git 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:r8

TEST_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
test:conformance 21 normative policy scenarios Local Worker
test:interception 9 assertions for discovery and invocation interception Local Worker and local spy upstream
test:receipts 10 assertions for chained receipts and public-key verification Node-only
test:intent-envelope 28 assertions for frozen declared-intent envelopes Local Worker
test:r4 14 assertions for MODIFY and DEFER outcomes Local Worker and local spy upstream
test:r6 17 assertions for agent signatures, rotation, replay, and public-key verification Local Worker
test:r8 10 assertions for OpenTelemetry export Node-only with a local collector

Mediation boundary

  • tools/call is evaluated before forwarding; only an allow decision is proxied upstream.
  • tools/list is 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, with boundary-* 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.json

See 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

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选