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/messageAuthentication
The MCP server uses the same SDK API key credentials:
- SSE connection: pass
apiKeyandapiSecretas query parameters - Tool calls: pass
X-API-KeyandX-API-Secretheaders on POST requests
Available Tools
| Tool | Description |
|---|---|
get_addresses | Get wallet addresses for all chains |
get_balance | Get Canton CC and token balances |
get_transactions | Get transaction history |
transfer | Transfer tokens (Canton CC, USDC, etc.) |
sign_transaction | Sign a message or transaction hash |
canton_query | Query Canton/Daml contracts |
canton_create | Create a Canton/Daml contract |
canton_exercise | Exercise 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":{}}}'