cMCP (Confidential MCP) 标志

cMCP (Confidential MCP)

组织
agentrust-io

cMCP: Confidential MCP Gateway. Hardware-attested policy enforcement for MCP tool calls.

发布者agentrust-io
代码仓库cmcp
语言Python
复刻数
21
星标数
30
可用工具
0
传输类型stdio
分类
许可协议MIT
链接
  • 将工具接入 AI 工作流

    cMCP (Confidential MCP) 提供 MCP 功能,可供兼容的 AI 客户端和智能体使用。

  • 0 个可用工具

    浏览下方可调用的操作;如果服务器提供了名称和描述,也会一并显示。

  • 可直接复制的配置

    使用安装配置片段,在您首选的 MCP 客户端中配置此服务器。

  • 开源社区热度

    关联的代码仓库有 30 个 Star 和 21 个 Fork。

cMCP: Confidential MCP Runtime

Community updates and contributor highlights: AgenTrust on LinkedIn.

Enforce MCP tool policy inside a TEE, where the agent it governs cannot reach it

CI License: MIT PyPI OpenSSF Scorecard Discord

Developer Preview - launched at the Confidential Computing Summit, June 23 2026. May have breaking changes before v1.0. See STATUS.md for exactly what ships today versus what is on the roadmap.

cMCP (Confidential MCP Runtime) is the secure, confidential way to run MCP: an open-source gateway that enforces MCP tool-call policy inside a hardware Trusted Execution Environment (TEE). Every tool call is intercepted, evaluated against a Cedar policy bundle, and enforced where the process it governs cannot reach it. Each session produces a signed TRACE Claim that a verifier checks without trusting the operator, hardware-attested when the gateway runs in a TEE and signed-only in software mode. If you are looking for a secure version of MCP, this is the AgenTrust runtime for it.

TL;DR - Point your agent at the cMCP Gateway. It evaluates every tool call against a Cedar policy inside a TEE, blocks or redacts what the policy denies, and emits a tamper-evident TRACE Claim as proof. Run pip install cmcp-runtime and start in software mode with no hardware required.

Your agent calls Snowflake, Salesforce, a dozen APIs. What stops it from leaking a customer's data on one of those calls? If a regulator asks, could you prove it didn't?


The problem

An agent calls a tool. The policy engine says allow. The tool call goes through.

None of that proves the policy engine itself was not compromised. Software-only MCP governance cannot guarantee:

  • The Cedar policy on disk is the one that ran. A rogue admin can swap the bundle after approval; the hash check runs inside the same OS the admin controls.
  • The allow/deny decision was not flipped in memory. A supply chain CVE in the evaluator runs in the same address space as the attacker.
  • The audit log reflects what actually happened. Any party holding the software signing key can reconstruct a valid audit chain after the fact.

The control plane that governs tool calls must run where it cannot be reached by the process it governs.

Hardware-attested policy enforcement for MCP tool calls. Every tool call is intercepted, evaluated against a Cedar policy bundle, and enforced by a policy engine running inside a Trusted Execution Environment (TEE). Before it serves a single tool call, the gateway measures its installed code, policy bundle and config into the hardware attestation report, and re-attests whenever the bundle reloads.

In a hardware deployment, the cMCP Runtime processes tool-call payloads inside the TEE. What the host and connectivity provider can read also depends on the egress policy, and the upstream tool server is a separate component outside the TEE. Software mode (CMCP_DEV_MODE) provides no hardware isolation. LIMITATIONS.md lists what cMCP does not prevent.


Quick Start

bash
pip install cmcp-runtime

Create cmcp-config.yaml:

yaml
attestation:
  provider: auto
  enforcement_mode: advisory   # advisory eases first-run tuning; the default is `enforcing`
listen_addr: "127.0.0.1:8443"  # pin loopback: dev mode runs without a bearer token
policy_bundle_path: ./policies/
catalog_path: ./catalog.json

listen_addr is not optional here. CMCP_DEV_MODE=1 deliberately skips the bearer token requirement so you can try things quickly, and the default bind is still 0.0.0.0:8443. On 0.3.0 that combination stood up an unauthenticated gateway on every interface on your machine. From 0.4.0 it is refused: tokenless dev mode may only bind a loopback address, and a non-loopback bind requires CMCP_BEARER_TOKEN. Pin listen_addr explicitly and the config is correct on both.

Start the gateway:

bash
CMCP_DEV_MODE=1 cmcp start --config cmcp-config.yaml

Make a tool call:

bash
curl -X POST http://localhost:8443/mcp \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"salesforce.contacts","arguments":{"query":"Acme Corp"},"_cmcp":{"session_id":"s1","workflow_id":"demo-agent"}}}'

Prefer a guided version? agentrust-io.com/quickstart walks the same path in about ten minutes on a laptop, with no hardware and no signup: install, write one Cedar forbid rule, watch a tool call return 403 POLICY_DENY before it reaches an upstream, then verify the signed receipt.

See docs/quickstart.md for the full walkthrough: Cedar policy, tool catalog, first TRACE Claim, and verification (no hardware TEE required).


How it works

  1. The agent sends every tool call to the cMCP Gateway instead of directly to MCP servers.
  2. At startup, before it serves traffic, the gateway measures its installed code, Cedar policy bundle and config. On SEV-SNP, TDX and Azure CVM the digest is bound into report_data; on the TPM tier it is extended into a certified NV index. A policy reload triggers a fresh attestation.
  3. Each incoming tool call is evaluated by the Cedar policy engine running inside the TEE. The result is allow, deny, or redact. The call and its decision are appended to the hardware-sealed audit chain.
  4. At the end of the session the gateway produces a TRACE Claim: a signed, hardware-attested artifact that records which tools ran, which policy decided each call, and the full audit chain. A verifier checks this without trusting the operator.
Agent -> cMCP Runtime -> Cedar Policy Engine (TEE) -> Tool
                     |
               GatewayClaim (TRACE Profile)
               +-- trace.eat_profile
               +-- trace.runtime.platform + measurement
               +-- trace.policy.bundle_hash
               +-- trace.cnf.jwk  (Ed25519 confirmation key)
               +-- gateway.audit_chain (root/tip/length)
               +-- signature (Ed25519 over canonical JSON)

Hardware providers

ProviderPlatformAssuranceNotes
tpmTPM 2.0 / vTPM (Azure, AWS, GCP Trusted Launch)MediumLocal TPM quote
sev-snpAMD SEV-SNP (Azure DCasv5, AWS C6a Nitro)HighAMD KDS
tdxIntel TDX (Azure DCedsv5, GCP C3)HighIntel PCS
gpu-cc (v0.2)NVIDIA H100/H200/Blackwell (CC mode)HighNVIDIA Remote Attestation Service (NRAS)
opaque (opt-in)OPAQUE Confidential Runtimen/a (not yet implemented)Placeholder: excluded from auto-detect; selecting it explicitly raises a not-implemented error

Provider auto-detect probe order: azure-cvm -> tpm -> sev-snp -> tdx. The first provider whose detect() succeeds is selected. opaque is a not-yet-implemented placeholder: it is excluded from auto-detect, and selecting it explicitly raises ATTESTATION_PROVIDER_NOT_IMPLEMENTED rather than falling through silently. If no hardware provider is detected, the gateway starts only under CMCP_DEV_MODE=1 (a non-attested software-only fallback) and otherwise refuses to start.

python
from cmcp_runtime.config import TEEProvider

# Auto-detect (default)
# attestation.provider: auto  ->  azure-cvm -> tpm -> sev-snp -> tdx
# (software-only is used only under CMCP_DEV_MODE=1)

# Explicit hardware selection
# attestation.provider: sev-snp

# OPAQUE Managed Runtime (opt-in only; not yet implemented)
# OPAQUE_ATTESTATION_URL=https://... cmcp start --config cmcp-config.yaml

Enforcement modes

ModeBehaviorUse case
enforcingPolicy denies return HTTP 403; call is not forwardedProduction
advisoryPolicy denies are logged; call proceedsFirst deployment, policy tuning
silentPolicy is evaluated but nothing is logged or blockedBaselining

Default is enforcing. Set enforcement_mode: advisory in cmcp-config.yaml to use advisory mode.


Configuration

cmcp-config.yaml full reference:

yaml
attestation:
  provider: auto                    # auto | tpm | sev-snp | tdx | opaque | software-only
  enforcement_mode: enforcing       # enforcing | advisory | silent
  validity_seconds: 86400           # attestation freshness window (default: 24 hours)
  staleness_policy: fail_closed     # fail_closed | warn_only
  expected_measurement: ~           # pin a specific PCR/measurement (optional)

policy_bundle_path: policies/       # directory containing .cedar files and manifest.json
catalog_path: catalog.json          # approved tool catalog

listen_addr: "127.0.0.1:8443"     # tokenless dev mode is loopback-only; set CMCP_BEARER_TOKEN before binding wider
max_response_size_bytes: 2097152    # 2 MB default
policy_reload_interval_seconds: 0   # >0 with a pinned CMCP_POLICY_HASH refuses to start, see docs/spec/policy-hot-reload.md

Environment variables:

VariableEffect
CMCP_DEV_MODE=1Use software-only TEE provider; no hardware required
CMCP_BEARER_TOKENRequire this bearer token on all inbound requests
OPAQUE_ATTESTATION_URLEnable OPAQUE Managed Runtime attestation (explicit opt-in)

CLI reference

CommandFlagsDescription
cmcp start--config PATH (required)Start the gateway
cmcp validate-config--config PATH (required)Validate cmcp-config.yaml without starting
cmcp validate-bundle--bundle-path PATH (required), --expected-hash sha256:<hex> (required)Verify a Cedar bundle hash before deployment
cmcp verifyCLAIM_FILE (required); --policy-hash, --catalog-hash, --max-age, --trusted-key, --trusted-tpm-ca, --audit-bundle, --agent-manifest, --agent-manifest-trust-anchorVerify a signed TRACE Claim (signature, schema, freshness, audit chain, pinned hashes, and trust anchors)

TRACE Claims

A GatewayClaim is the unit of proof handed to an auditor, regulator, or downstream verifier. It is produced per session (or per call, configurable) and signed with a key that never leaves the TEE.

FieldDescription
trace.eat_profileEAT profile URI: tag:agentrust-io.com,2026:trace-v0.2
trace.runtimeTEE platform and hardware measurement recorded at enclave boot
trace.policy.bundle_hashSHA-256 of the Cedar bundle loaded at startup; changing any policy file changes this value
trace.cnf.jwkEd25519 public key bound to the TEE signing key
trace.tool_transcriptAudit-chain-derived per-call view: hash (binds to the audit chain tip), call_count, and privacy-preserving entries (tool name, data class, decision)
gateway.audit_chainHash-chained audit log root and tip; verifiable without replaying individual entries
signatureEd25519 over canonical JSON of the full claim body (RFC 8785)

(This table is a summary of the most-used fields.)

Verification with the cmcp_verify library does not require trusting the operator. The verifier checks the signature against the TEE-bound key, the policy bundle hash against the approved value, and the audit chain for internal consistency.

The normative schema is schemas/trace-claim.schema.json, and docs/quickstart.md shows a complete example. See docs/spec/verification-library.md and the TRACE specification for the full verification protocol.


Standards alignment

StandardCoverage
OWASP Agentic AI Top 10MCP10 (data leakage via tool calls), MCP02 (unsanctioned tools), MCP08 (provable governance), MCP04 (supply chain)
NIST SP 800-207Policy decision point inside TEE; no implicit trust in workload identity
EU AI Act Art. 12, 15Per-decision audit records (Art. 12); TEE-backed cybersecurity controls (Art. 15)
DORA Art. 9Attestation chain; audit log retention via gateway.audit_chain
RATS/EAT RFC 9711GatewayClaim is an EAT; eat_profile field identifies the TRACE profile

Security

ToolWhat it checks
ruffStyle and import linting on every PR
banditPython security linting on every PR
pip-auditDependency vulnerability scan on every PR
mypyStatic type checking on every PR
CodeQLPython SAST, security-extended queries, weekly
OpenSSF ScorecardWeekly scoring, SARIF upload

See SECURITY.md for vulnerability reporting and response SLAs. See LIMITATIONS.md for explicit scope boundaries, including residual risks for APM payload capture, runtime config injection, and P4.1 supply chain (typosquat) that Phase 1 does not close.


Documentation

PageDescription
docs/quickstart.mdFrom zero to first TRACE Claim in under 30 minutes
docs/configuration.mdFull config reference with all fields and defaults
docs/confinement.mdExperimental Linux agent sandbox, bypass tests and trust assumptions
docs/SPEC.mdProduct specification: problem taxonomy, architecture, coverage matrix
docs/spec/threat-model.mdSTRIDE analysis, adversary model, residual risks
docs/spec/cedar-policy.mdCedar policy language reference and schema
docs/testing/benchmarks.mdLatency and throughput benchmarks per TEE provider

FAQ

What is cMCP?

cMCP (Confidential MCP Runtime) is an open-source gateway that enforces MCP tool-call policy inside a hardware Trusted Execution Environment. It intercepts each tool call, evaluates it against a Cedar policy bundle, enforces the decision (allow, deny, or redact), and records the call in a hardware-sealed audit chain.

How is cMCP different from software-only MCP governance?

Software-only governance runs the policy engine in the same OS an operator or a supply-chain CVE can reach, so it cannot prove the policy that ran was the approved one or that the decision was not flipped in memory. cMCP runs the policy engine inside a TEE and measures its code and Cedar bundle into the hardware attestation report before it serves a single call, so the control plane cannot be reached by the process it governs.

Do I need special hardware to try it?

No. Set CMCP_DEV_MODE=1 to use the software-only TEE provider and run the full quickstart without a hardware TEE. Hardware providers (TPM, AMD SEV-SNP, Intel TDX, OPAQUE) are used in production.

What is a TRACE Claim?

A TRACE Claim (a GatewayClaim) is a signed, hardware-attested artifact produced per session. It records which tools ran, which policy decided each call, the Cedar bundle hash, and the audit chain, and it is signed with an Ed25519 key that never leaves the TEE. A verifier checks it with the cmcp_verify library without trusting the operator.

Which TEE providers are supported?

TPM 2.0 / vTPM, AMD SEV-SNP, and Intel TDX, with NVIDIA GPU confidential computing planned for v0.2 and OPAQUE Confidential Runtime available as explicit opt-in. Auto-detection order is Azure confidential VM, then TPM 2.0 / vTPM, then AMD SEV-SNP, then Intel TDX; the software-only provider is used only under CMCP_DEV_MODE=1.

What license is cMCP under?

MIT.


Contributing

CONTRIBUTING.md · GOVERNANCE.md · Discussions

Join the community on Discord.

Using cMCP in production? Add your organization to ADOPTERS.md.


License

MIT - see LICENSE.

将 cMCP (Confidential MCP) MCP 与多个 AI 模型配合使用

TypingMind 在工作区级别连接 MCP 工具,因此连接 cMCP (Confidential MCP) 后,您就可以在 TypingMind 中搭配不同的 AI 模型使用,无需为每个模型单独设置。 此 MCP 通过您设备上的 TypingMind MCP 连接器在本地运行。

本地连接器设置指南

如果 MCP 服务器需要访问您电脑上的本地文件、应用或私有资源,请选择此方式。

1

打开 MCP 设置

在 TypingMind 中,依次前往“设置”、“高级设置”和“模型上下文协议”,然后选择“设置连接器”。

  1. 在您的浏览器中打开 TypingMind。
  2. 点击“设置”图标。
  3. 进入“高级设置”。
  4. 打开“模型上下文协议”部分。
  5. 点击“设置连接器”,然后选择“此设备”。
TypingMind MCP 连接器设置界面,已选择“此设备”
2

运行连接器命令

选择“此设备”,从 TypingMind 复制命令并在终端中运行。使用 MCP 时,请保持该进程运行。

  1. 复制 TypingMind 显示的设置命令。
  2. 在 macOS 上打开“终端”,或在 Windows 上打开 Windows Terminal。
  3. 粘贴并运行命令。
  4. 如果终端询问您是否继续,请确认安装软件包。
  5. 使用 MCP 工具时,请保持终端窗口及其中的进程运行。
3

将 cMCP (Confidential MCP) 添加为服务器

当连接器状态为“就绪”时,点击“编辑服务器”,然后粘贴 MCP 服务器配置。

  1. 等待连接器状态显示为“就绪”。
  2. 点击“编辑服务器”。
  3. 粘贴 cMCP (Confidential MCP) MCP 服务器配置。
  4. 保存服务器列表。
  5. 如需确认连接器是否仍处于就绪状态,请刷新。
TypingMind MCP 设置界面,显示正在运行的服务器和“编辑服务器”按钮
{
  "mcpServers": {
    "cmcp": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

在不同模型中使用同一连接

保存服务器列表,打开“插件”,启用 cMCP (Confidential MCP) MCP 工具,然后在 TypingMind 中选择任意受支持的 AI 模型,即可在聊天中使用这些工具,或将其分配给智能体。

  1. 在 TypingMind 中打开“插件”页面。
  2. 启用 cMCP (Confidential MCP) MCP 工具。
  3. 开始聊天并选择您想使用的 AI 模型。
  4. 在聊天中使用 MCP 工具,或将其分配给 AI 智能体。
  5. 根据需要随时切换到其他 AI 模型,无需重新连接 MCP。
在 TypingMind 聊天中使用已启用的 MCP 工具和选定的 AI 模型
您能使用 cMCP (Confidential MCP) 帮我完成这项任务吗?
cMCP (Confidential MCP)
当然。我已阅读。
以下是我使用 cMCP (Confidential MCP) 得到的结果。

常见问题

cMCP (Confidential MCP) MCP 服务器有什么用途?

cMCP (Confidential MCP) 是一个 MCP 服务器,可让兼容的 AI 客户端连接外部工具并获取上下文。在 TypingMind 中,只需添加一次此 MCP 服务器,即可在您的 AI 工作区中使用其工具。

可以在 TypingMind 中让多个 AI 模型使用 cMCP (Confidential MCP) MCP 吗?

可以。TypingMind 在工作区层面连接 MCP 工具,因此您可以让 Claude、ChatGPT、Gemini 等不同 AI 模型,或您在 TypingMind 中配置的其他模型使用 cMCP (Confidential MCP),而无需为每个模型单独配置 MCP 服务器。

为什么在 TypingMind 中使用 cMCP (Confidential MCP) MCP?

TypingMind 将多个 AI 模型、提示词、插件、AI 智能体、API 密钥和 MCP 工具整合到同一个工作区中,是优秀的大语言模型聊天前端之一。连接 cMCP (Confidential MCP) 后,您可以在偏好的不同模型中使用其 MCP 工具,同时在 TypingMind 中井然有序地管理聊天工作流程。

如何将 cMCP (Confidential MCP) MCP 连接到 TypingMind?

cMCP (Confidential MCP) 通过 TypingMind 本地 MCP 连接器运行。当 MCP 服务器需要访问您计算机上的本地文件、桌面应用、命令行工具或私有资源时,这种方式最合适。

cMCP (Confidential MCP) MCP 在 TypingMind 中提供哪些工具?

cMCP (Confidential MCP) 提供 MCP 功能,您可以在 TypingMind 的插件页面启用这些功能,然后在聊天中使用,或将其分配给 AI 智能体。

使用 cMCP (Confidential MCP) MCP 需要向 TypingMind 提供我的 API 密钥吗?

不需要。TypingMind 采用本地优先的设计,让您自行掌控模型提供商、API 密钥、提示词和 MCP 配置。如果 cMCP (Confidential MCP) 需要身份验证,请在创建连接时,为该 MCP 服务器添加所需的请求头、OAuth 设置或本地配置。

相关 MCP 服务器

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇