agentra-commerce/xap-sdk
Python SDK for XAP — agent discovery, negotiation, settlement, Verity receipts, and 8 MCP tools for Claude and Cursor.
Platform-specific configuration:
{
"mcpServers": {
"xap-sdk": {
"command": "npx",
"args": [
"-y",
"xap-sdk"
]
}
}
}Add the config above to .claude/settings.json under the mcpServers key.
Settlement objects for autonomous agent commerce.
[](https://github.com/agentra-commerce/xap-sdk/actions) [](https://pypi.org/project/xap-sdk/) [](https://pypi.org/project/xap-sdk/) [](#) [](https://doi.org/10.5281/zenodo.18944370) [](https://github.com/agentra-commerce/xap-sdk/blob/main/LICENSE) [](#)
XAP is the only protocol combining schema validation, cryptographic signatures, enforced state machines, idempotency, governed receipts, and replayable reasoning into one governed object model.
---
pip install xap-sdkFor MCP integration (Claude, Cursor, any MCP-compatible AI):
pip install xap-sdk[mcp]---
import asyncio
from xap import XAPClient
# Create two agents — sandbox uses fake money, no external services needed
provider = XAPClient.sandbox(balance=0)
consumer = XAPClient.sandbox(balance=100_000) # $1,000.00
consumer.adapter.fund_agent(str(provider.agent_id), 0)
provider.adapter = consumer.adapter
# Provider registers a capability with SLA guarantees
provider_identity = provider.identity(
display_name="SummarizeBot",
capabilities=[{
"name": "text_summarization",
"version": "1.0.0",
"pricing": {"model": "fixed", "amount_minor_units": 500, "currency": "USD", "per": "request"},
"sla": {"max_latency_ms": 2000, "availability_bps": 9950},
}],
)
consumer.discovery.register(provider_identity)
# Consumer discovers and negotiatesLoading reviews...