@getparafe/mcp-server
MCP tool server for the Parafe Trust Broker. Add trust handshakes to any MCP-compatible AI agent with zero code changes.
What This Does
Parafe is a neutral trust broker for agent-to-agent interactions. This MCP server exposes Parafe's trust operations — agent registration, mutual authentication, scoped consent, and signed receipts — as MCP tools that any LLM agent can call.
Add a JSON config block. Your agent gets trust handshakes.
Quick Start
1. Get Credentials
Sign up at platform.parafe.ai and create an API key.
2. Configure Your MCP Client
Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"parafe-trust": {
"command": "npx",
"args": ["@getparafe/mcp-server"],
"env": {
"PARAFE_BROKER_URL": "https://api.parafe.ai",
"PARAFE_API_KEY": "prf_key_live_...",
"PARAFE_CREDENTIALS_PASSPHRASE": "your-passphrase"
}
}
}
}
Claude Code (.mcp.json in your project root, or claude mcp add parafe-trust -e PARAFE_BROKER_URL=https://api.parafe.ai -e PARAFE_CREDENTIALS_PASSPHRASE=your-passphrase -- npx @getparafe/mcp-server):
{
"mcpServers": {
"parafe-trust": {
"command": "npx",
"args": ["@getparafe/mcp-server"],
"env": {
"PARAFE_BROKER_URL": "https://api.parafe.ai",
"PARAFE_API_KEY": "prf_key_live_...",
"PARAFE_CREDENTIALS_PASSPHRASE": "your-passphrase"
}
}
}
}
Cursor (.cursor/mcp.json):
{
"mcpServers": {
"parafe-trust": {
"command": "npx",
"args": ["@getparafe/mcp-server"],
"env": {
"PARAFE_BROKER_URL": "https://api.parafe.ai",
"PARAFE_API_KEY": "prf_key_live_...",
"PARAFE_CREDENTIALS_PASSPHRASE": "your-passphrase"
}
}
}
}
Without PARAFE_CREDENTIALS_PASSPHRASE the agent's identity lives in memory only, and every restart registers a new agent.
3. Use It
Your agent now has 24 trust tools. The typical flow:
- Discover —
parafe_discoverfetches the target agent's agent card to learn its trust requirements - Register —
parafe_registercreates your agent's cryptographic identity (once; saved to the credentials file whenPARAFE_CREDENTIALS_PASSPHRASEis set) - Handshake —
parafe_initiate_handshakestarts mutual authentication; the target callsparafe_complete_handshake - Interact —
parafe_verify_consentchecks each request; after each action you perform or refuse,parafe_record_action_receiptsigns an action receipt and files it in the session's index (parafe_file_action_receiptfiles the other agent's copy)- Selling under an AP2 mandate?
parafe_verify_mandatehas the broker check the mandate the shopping agent presented; answer withparafe_record_ap2_receipt(an AP2 Checkout or Payment Receipt, signed with your P-256 key and filed in the session's index)
- Selling under an AP2 mandate?
- Close —
parafe_close_sessiongenerates a signed receipt (a JWS) of the session's trust context and every action receipt filed, verifiable by anyone who holds it; the other participant fetches it withparafe_get_session_receipt
Environment Variables
Available Tools
Resources
Transports
stdio (default) — standard for local MCP clients:
npx @getparafe/mcp-server
Streamable HTTP — for hosted/remote deployments:
npx @getparafe/mcp-server --transport=http --port=3001
Connect to http://localhost:3001/mcp from your MCP client, sending Authorization: Bearer <PARAFE_MCP_AUTH_TOKEN>. It listens on every interface; each request is served statelessly, all as the one loaded agent.
How It Works
This MCP server wraps the @getparafe/sdk. Each tool call maps to an SDK method, except parafe_discover, which fetches the target's agent card itself. The SDK handles the cryptography (P-256 or Ed25519 agent keys, challenge signing, a proof of possession on every request made as your agent) and credential encryption internally.
MCP Client (Claude, Cursor, etc.)
↓ MCP protocol
@getparafe/mcp-server
↓ SDK method calls
@getparafe/sdk
↓ HTTPS
Parafe Broker API
New in 0.15.0
parafe_verify_consentandparafe_verify_consent_locallyrefuse a consent token issued for a different agent than the loaded one (wrong_audience), so a token from another session can't be replayed at this agent. A refusal names its cause (token_expired,token_invalid,session_inactive, ...).- An agent whose credential expired less than a year ago can renew it with
parafe_renew_credential(broker from 2026-10-08). parafe_get_agent_metricsreads only your own agent's track record: other agents' are private since 2026-10-08 (set reputation floors in your scope policies instead).parafe_verify_consent_locallyno longer takesbroker_public_key: the broker's retired Ed25519 key no longer verifies tokens (2026-10-09), so tokens are checked against the JWKS only.- The
instructionof anattestedhandshake goes to the other agent, and the tool descriptions now say so: send a short summary of what the person asked for, without personal details. With SDK 0.14, the handshake and consent token results carryevidenceSalt: the session receipt's hash of the instruction is salted since 2026-10-09.
New in 0.14.0
- Uses
@getparafe/sdk0.13:parafe_registerproves it holds the key it registers (aParafe-PoPproof). The broker requires this since 2026-10-08, so 0.13.0 and earlier can no longer register new agents; identities already registered keep working. - Fixes the 0.13.0 issues below.
Fixed in 0.14.0 (known issues in 0.13.0)
- Streamable HTTP answers the first request and fails every later one, and serves
/mcpwith no authentication unlessPARAFE_MCP_AUTH_TOKENis set. Use stdio with 0.13.0. parafe_renew_credentialdoesn't save the renewed credential, and the broker revokes the old one, so after a restart the server loads the revoked credential. A keyless agent that renewed and then restarted must delete (or move) its credentials file and register again.parafe://session/{sessionId}always fails.- A wrong
PARAFE_CREDENTIALS_PASSPHRASEis ignored silently, and the nextparafe_registeroverwrites the saved identity. Since the fix, the server logs the error and refuses to register until the passphrase is fixed or the file is moved.
Development
npm install
npm run build
npm run test:unit # no network
PARAFE_TEST_BROKER_URL=https://… npm run test:integration # signs up a test org on that broker
License
MIT