Skip to content

MCP Server

Stratos exposes a Model Context Protocol (MCP) server that allows AI agents to interact with the wallet programmatically.

Connection

The MCP server uses HTTP with SSE transport:

SSE:  GET /api/mcp/sse?apiKey=cws_...&apiSecret=...
RPC:  POST /api/mcp/message

Authentication

The MCP server uses the same SDK API key credentials:

  • SSE connection: pass apiKey and apiSecret as query parameters
  • Tool calls: pass X-API-Key and X-API-Secret headers on POST requests

Available Tools

ToolDescription
get_addressesGet wallet addresses for all chains
get_balanceGet Canton CC and token balances
get_transactionsGet transaction history
transferTransfer tokens (Canton CC, USDC, etc.)
sign_transactionSign a message or transaction hash
canton_queryQuery Canton/Daml contracts
canton_createCreate a Canton/Daml contract
canton_exerciseExercise a choice on a Canton contract

Tool Schemas

transfer

json
{
  "to": "recipient-party-id",
  "amount": 10,
  "symbol": "CC",
  "chainType": "canton"
}

sign_transaction

json
{
  "chainType": "evm",
  "messageHash": "0xabc123...",
  "message": "or plain text message"
}

canton_query

json
{
  "templateId": "package:Module:Template",
  "filter": { "owner": "party-id" }
}

canton_exercise

json
{
  "contractId": "#1:0",
  "templateId": "package:Module:Template",
  "choice": "Transfer",
  "argument": { "newOwner": "party-id" }
}

Claude Desktop Integration

Add to your claude_desktop_config.json:

json
{
  "mcpServers": {
    "stratos-wallet": {
      "url": "https://your-portal.example.com/api/mcp/sse?apiKey=cws_...&apiSecret=...",
      "transport": "sse"
    }
  }
}

JSON-RPC Protocol

The MCP server implements the standard JSON-RPC 2.0 protocol:

bash
# Initialize
curl -X POST https://portal.example.com/api/mcp/message \
  -H "X-API-Key: cws_..." \
  -H "X-API-Secret: ..." \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize"}'

# List tools
curl -X POST https://portal.example.com/api/mcp/message \
  -H "X-API-Key: cws_..." \
  -H "X-API-Secret: ..." \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":2,"method":"tools/list"}'

# Call a tool
curl -X POST https://portal.example.com/api/mcp/message \
  -H "X-API-Key: cws_..." \
  -H "X-API-Secret: ..." \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"get_balance","arguments":{}}}'

Enterprise-grade multi-chain wallet infrastructure.