Two MCP tools. Zero dependencies. Compliance verification before tool execution. Cryptographic evidence after.
MCP enables AI models to call tools on remote servers. But the MCP specification has no concept of agent trust. When Agent A calls a tool on Server B, there is no verification that Agent A has active compliance attestations, valid guardrails, or a non-revoked identity. The tool runs regardless.
In regulated environments, this is a gap. EU AI Act Art. 9 requires risk management measures. NIST AI RMF requires characterization of third-party AI components. When an unverified agent invokes a tool that accesses customer data, makes financial decisions, or modifies infrastructure, the absence of trust verification is an audit finding.
The SWT3 Trust Mesh is a protocol for mutual compliance verification between AI agents. Before two agents interact, each presents a cryptographic credential proving its compliance posture (active guardrails, fresh attestations, valid signing key). The receiving agent verifies the credential locally and assigns a trust level from 0 (DENIED) to 4 (SOVEREIGN).
Every verification mints two SWT3 witness anchors: AI-TRUST.1 (the verification result) and AI-TRUST.2 (the handshake evidence). Both are independently verifiable at the public /verify endpoint. For the full protocol specification, see the Protocol Reference.
The SWT3 MCP Server (@tenova/swt3-mcp) exposes Trust Mesh as two tools that LLMs can call autonomously during a conversation.
Generates a trust credential for the current agent. Read-only. No anchors minted.
| Argument | Type | Required | Description |
|---|---|---|---|
agent_id | string | no | Override the configured agent ID |
Returns: A formatted credential containing agent_id, tenant_id, anchor_fingerprint, anchor_timestamp_ms, is_signed, and clearing_level. The counterpart passes these fields to their verify_agent_trust tool.
Verifies a counterpart agent's credential. Mints AI-TRUST.1 and AI-TRUST.2 anchors.
| Argument | Type | Required | Description |
|---|---|---|---|
counterpart_agent_id | string | yes | The agent ID to verify |
counterpart_tenant_id | string | yes | The tenant of the counterpart |
anchor_fingerprint | string | yes | Most recent SWT3 anchor fingerprint |
anchor_timestamp_ms | number | no | Epoch milliseconds of the anchor |
is_signed | boolean | no | Whether the credential is HMAC-signed |
procedures | string[] | no | Witnessed procedure IDs |
clearing_level | 0-3 | no | Data clearing level |
has_hardware_attestation | boolean | no | AI-HW.1 attestation present |
has_guardrails | boolean | no | Active guardrails present |
Returns: Verification result (GRANTED/DENIED), trust level (0-4), denial reason if applicable, and the minted AI-TRUST.1 and AI-TRUST.2 anchor tokens.
Here is a real MCP conversation where Agent A presents credentials, Agent B verifies, and then Agent B proceeds with a tool call. These are the actual JSON-RPC messages your MCP client sees.
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "present_trust_credential",
"arguments": {}
}
}
Response:
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"content": [{
"type": "text",
"text": "Trust Credential for Agent-to-Agent Verification\n\nagent_id: claims-processor-v3\ntenant_id: acme-prod\nanchor_fingerprint: a1b2c3d4e5f6\nanchor_timestamp_ms: 1786825895000\nis_signed: true\nclearing_level: 2\nhas_guardrails: false\nhas_hardware_attestation: false\n\nPass these fields to another agent's verify_agent_trust tool\nto establish mutual compliance trust before exchanging data."
}]
}
}
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "verify_agent_trust",
"arguments": {
"counterpart_agent_id": "claims-processor-v3",
"counterpart_tenant_id": "acme-prod",
"anchor_fingerprint": "a1b2c3d4e5f6",
"anchor_timestamp_ms": 1786825895000,
"is_signed": true,
"clearing_level": 2
}
}
}
Response:
{
"jsonrpc": "2.0",
"id": 2,
"result": {
"content": [{
"type": "text",
"text": "Trust Verification: GRANTED\nTrust Level: 2 (verified)\nChecks: 4/4 passed\n\nCounterpart: claims-processor-v3 @ acme-prod\n\nAI-TRUST.1 Verdict: PASS\nAI-TRUST.1 Anchor: SWT3-E-CLOUD-AI-AITRUST1-PASS-1786825900-c3d4e5f6a1b2\nAI-TRUST.2 Anchor: SWT3-E-CLOUD-AI-AITRUST2-PASS-1786825900-d4e5f6a1b2c3\nWitnessed: 2026-08-15T20:31:40.000Z\nVerify: https://sovereign.tenova.io/verify?fp=c3d4e5f6a1b2"
}]
}
}
Trust is established. Agent B can now call the tool it needs with confidence that Agent A is compliant.
The conversation produces two anchors (AI-TRUST.1 and AI-TRUST.2) before any business tool is called. The assessor can verify both anchors at the /verify endpoint. The timestamps prove trust verification preceded tool execution. The LLM autonomously performed compliance verification without human intervention.
Trust Mesh (pre-call verification) and the Witness Middleware (post-call evidence) create three independent evidence layers.
| Layer | Procedure | What It Proves |
|---|---|---|
| Trust Verification | AI-TRUST.1 | Counterpart compliance was checked. Result: PASS or FAIL with trust level. |
| Handshake Evidence | AI-TRUST.2 | Verification was thorough: N checks performed, M passed. |
| Tool Witnessing | AI-TOOL.1 | The tool call occurred with cryptographic integrity. |
/verify without the other two. An assessor can confirm that (a) trust was established, (b) the verification was thorough, and (c) the subsequent tool call was witnessed. If any anchor is missing, there is a gap in the evidence chain.
The SWT3 MCP Server reads configuration from environment variables and an optional .swt3.yaml file.
| Variable | Required | Description |
|---|---|---|
SWT3_API_KEY | no | API key (axm_...). Omit for demo mode. |
SWT3_TENANT_ID | no | Tenant ID. Auto-resolved from API key if omitted. |
SWT3_AGENT_ID | no | Agent identity for this server. |
SWT3_SIGNING_KEY | no | HMAC signing key for credential and anchor signing. |
# .swt3.yaml for an MCP server with trust mesh
trust_mesh:
mode: strict
min_trust_level: 2
require_signature: true
trusted_tenants:
- partner-org
signing_keys:
- agent: claims-processor-v3
key_env: PARTNER_SIGNING_KEY
When a client calls verify_agent_trust, the server uses this configuration to determine whether to grant or deny trust. See the Implementation Guide for all configuration options.
A complete MCP interaction with trust verification produces three anchors. Here is how to read them:
| Procedure | Factor A | Factor B | Factor C | How to Read |
|---|---|---|---|---|
| AI-TRUST.1 | 1 (constant) | 1=granted, 0=denied | Trust level (0-4) | factor_b=1, factor_c=2 means "granted at VERIFIED level" |
| AI-TRUST.2 | Checks performed | Checks passed | 1=granted, 0=denied | factor_a=4, factor_b=4 means "4/4 checks passed" |
| AI-TOOL.1 | Call count | Latency (ms) | 1=success, 0=error | factor_a=1, factor_b=45, factor_c=1 means "1 call, 45ms, success" |
SWT3-E-CLOUD-AI-AITRUST1-PASS-1786825900-c3d4e5f6a1b2 (trust verified) SWT3-E-CLOUD-AI-AITRUST2-PASS-1786825900-d4e5f6a1b2c3 (4/4 checks) SWT3-E-CLOUD-AI-AITOOL1-PASS-1786825905-e5f6a1b2c3d4 (tool witnessed 5s later)
Three anchors with sequential timestamps. AI-TRUST.1 and AI-TRUST.2 share a timestamp (both minted during verification). AI-TOOL.1 has a later timestamp (minted after the tool call completed). The 5-second gap is normal (tool execution time). If AI-TOOL.1 appears before AI-TRUST.1, the tool call was not preceded by trust verification (a finding). All three can be independently verified at /verify.
Run the MCP server without an API key to see trust verification in action locally.
npx @tenova/swt3-mcp
In demo mode, all tools work locally. Trust verification mints demo anchors to stderr. No network calls, no account required. The output includes:
[DEMO MODE: local only, not persisted] Trust Verification: GRANTED Trust Level: 1 (basic) Checks: 4/4 passed Counterpart: test-agent @ demo-tenant Anchor: a1b2c3d4e5f6 AI-TRUST.1 Anchor: SWT3-DEMO-LOCAL-AI-AITRUST1-PASS-1786825900-c3d4e5f6a1b2 AI-TRUST.2 Anchor: SWT3-DEMO-LOCAL-AI-AITRUST2-PASS-1786825900-d4e5f6a1b2c3 This anchor was minted locally. To persist anchors to the SWT3 ledger, use the signup tool to create a free account, or set SWT3_API_KEY.
Yes. Trust Mesh tools are available to the LLM but not mandatory. The LLM can call business tools directly without calling verify_agent_trust first. To enforce verification before tool execution, use the MCP server's toolPolicyGate feature, which blocks tools until a trust verification has been completed in the current session.
The tool returns a DENIED result with a denial reason (e.g., tenant_not_trusted, anchor_expired, signature_invalid). An AI-TRUST.1 FAIL anchor is minted. The LLM sees the denial and should not proceed with the interaction. The evidence that the denial occurred is permanently recorded.
Yes. The trust tools are standard MCP tools. Any MCP client (Claude Desktop, Cursor, VS Code, custom clients) can call them. The client does not need to know about Trust Mesh. The LLM decides when to call the tools based on the conversation context.
Different layers, complementary evidence. Trust Mesh verifies the counterpart before the interaction. The Witness Middleware records the tool call after it completes. Together they produce three evidence layers (AI-TRUST.1, AI-TRUST.2, AI-TOOL.1). Each works independently. You can use one without the other.
The trust tools are part of the SWT3 MCP Server (@tenova/swt3-mcp), which provides 33 tools in total. If you only want transport-level witnessing (no trust tools), use the Witness Middleware alone (@tenova/swt3-mcp/middleware).
npm install @tenova/swt3-mcp
Run the server, connect your MCP client, and call present_trust_credential to see your agent's credential. Call verify_agent_trust with a counterpart's credential to see the verification flow.
No API key? The server runs in demo mode. Anchors log to stderr. Create a free account when you want persistent evidence.