MCP server

Soren Pay speaks the Model Context Protocol spec at POST /api/mcp. Any MCP-compatible AI client connects and invokes our operations as native tools.

What an agent can do today

Read-only tools shipping today:

| Tool | Scope | What it does | |---|---|---| | get_treasury | read:treasury | Workspace treasury snapshot | | get_recent_activity | read:treasury | Last N ledger entries | | list_cards | read:cards | Virtual + physical, filter by state | | list_agents | read:agents | Agent identities + Ed25519 fingerprints | | list_checkout_sessions | read:checkout | Merchant sessions, filter by status |

Write tools coming in v0.2

mint_card, submit_intent, create_checkout_session ship after the agent-side confirm flow lands in major MCP clients.

Architecture

  • Transport: JSON-RPC 2.0 over HTTP (POST /api/mcp)
  • Auth: standard Authorization: Bearer apk_… header (same as REST)
  • Scopes: each tool declares a required scope; missing scope returns missing_scope: <scope>
  • Methods: initialize, tools/list, tools/call, ping

Why MCP

Without MCP an integrator has to:

  • Read our REST docs
  • Generate a typed client from OpenAPI
  • Wire that client into their agent's tool-calling loop
  • Build a confirmation UI

With MCP they paste 8 lines of JSON into a config file and the agent has tools immediately.

Next