The full upstream README, mirrored here for reference. Install config, tool schemas, adoption signals, and an original overview live on the XAPS MCP Server listing page.
The Cognitive Circuit Breaker for Autonomous Agents
Xaps is an economic security layer for autonomous AI agents. Before executing a smart contract, transfer, or financial action, your agent calls Xaps for an independent dual-agent audit. Standard Web3 tools verify signatures — Xaps verifies intent and logic.
Or install from this repository:
Use the XAPS MCP server to audit high-stakes actions from Claude Desktop, Cursor, or any MCP host. See docs/mcp-host-integration.md for full setup.
xaps_audit in 60 SecondsInstall (exposes the xaps-mcp console command):
Set your agent key in the environment (recommended — avoid storing secrets in config files):
Add to Claude Desktop config (macOS: ~/Library/Application Support/Claude/claude_desktop_config.json):
For local dev from a git clone, use python /path/to/xaps_mcp_server.py with XAPS_MCP_DEV=1 instead.
Full example: examples/mcp_claude_desktop_config.json
In your agent prompt:
Before any
send_transaction,approve, ordepositcall: invokexaps_auditwithaction,contract_address, andamount.
Agent rule templates: examples/.agentrc
| Variable | Default | Description |
|---|---|---|
XAPS_AGENT_KEY | — | Agent billing key (alternative to constructor arg) |
XAPS_API_URL | https://api.xaps.network | API base URL |
XapsClient(api_key=None, base_url=..., timeout=10.0)Create a client. Raises ValueError if no API key is provided.
client.audit(action, contract_address, amount, payload_override=None)Synchronous audit. Returns receipt dict:
await client.audit_async(...)Async variant for agents running on asyncio.
audit_then_query / query_sinkAfter a Tollbooth receipt, agents can call the subsidized Sink for real structured data (GitHub / HTTP). That is the integration carrot: rails → utility.
Env: XAPS_ORACLE_URL (sink base), XAPS_API_URL + XAPS_AGENT_KEY (tollbooth).
MCP: xaps_audit_then_query, xaps_sink_query, xaps_sink_health.
| Exception | When |
|---|---|
XapsAuthError | Invalid or missing API key (401) |
XapsPaymentError | Insufficient prepaid balance (402) |
XapsRateLimitError | Too many requests (429) |
XapsAPIError | Other API errors |
XapsRejectedError | Audit returned REJECTED (optional helper) |
The sovereign node (
xap-sovereign-node) is private. This public repo contains only the SDK.
Your Xaps Agent Key is a billing identifier, not a cryptographic secret. Do not commit it to version control.
MIT — see LICENSE.