System Context
Design Principle
Every MCP tool maps to a user outcome, not a REST endpoint. The server orchestrates multiple API calls behind a single tool when needed. For example, a token transfer requires resolving the asset first, then preparing the transaction — the agent handles this as two clear steps, not raw API calls.Component Layers
Transport Layer
Handles MCP protocol communication between the AI host and the server.| Transport | How It Works | When to Use |
|---|---|---|
| stdio (default) | Runs as a child process of the MCP host | Claude Desktop, Claude Code, Cursor, VS Code |
| HTTP stateless | Each request creates a new server instance | Docker, serverless, auto-scaling |
| HTTP stateful | Sessions persist via Mcp-Session-Id header | SSE streaming, resumable sessions |
Tool Handler Layer
Maps MCP tool calls to service operations. Each handler:- Validates input using Zod schemas (address format, amount, chain)
- Calls the service layer
- Returns a structured MCP response or a structured error
Service Layer
Shared business logic behind the tool handlers:| Service | Responsibility |
|---|---|
| WalletSuiteApiClient | Typed HTTP client for the REST API — retry, timeout, response envelope unwrapping |
| OWS | Local key generation, encrypted key storage, policy-gated signing |
| TxCompiler | Converts API prepare-sign responses into signing-ready unsigned transaction hex |
| MoonPay | Widget URL builder for fiat on-ramp (prepare_onramp tool) |
| AuditTrail | Append-only JSONL log for sign and broadcast operations |
Boundary of Responsibility
| Component | Owns | Does Not Own |
|---|---|---|
| MCP Server | Tool schema, input validation, error mapping, transport, band filtering | Blockchain interaction, caching, chain-specific tx construction |
| OWS Signing | Local key generation, encrypted storage, policy enforcement, sign and broadcast | Transaction preparation, MCP protocol |
| WalletSuite API | Chain interaction, fee estimation, tx simulation, broadcast, caching, volume tracking | LLM integration, tool discovery, signing |
| You (integrator) | LLM orchestration, user confirmation, wallet UI | API orchestration, fee calculation (handled by API) |
Two Signing Modes
External Signing (Default)
The MCP server prepares unsigned transaction payloads. You sign with your own wallet infrastructure (HSM, KMS, browser extension, or any signing solution).MCP_BANDS=read,prepare. No OWS needed.
OWS Local Signing (Opt-In)
Keys generated and stored locally via the Open Wallet Standard. Policy-gated signing with chain allowlists and expiry. Keys never leave the device.OWS_ENABLED=true. Band set depends on what you want: read,prepare,sign is enough for detached signing (sign_transaction); add broadcast (or use full) to also expose send_transaction. full is a convenience alias for all four bands, not a requirement for OWS. See OWS Local Signing.
What the Server Does Not Do
- Store or transmit private keys
- Cache blockchain data (the API backend handles caching)
- Make signing decisions (OWS policy engine or the user decides)
- Expose internal orchestration logic (tools map to outcomes, not implementation details)