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 | LangChain / CrewAI process embedding; IDE clients (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 |
| MPC | 2-of-2 DKLS23 share orchestration; co-signing service holds one share, customer holds the other; policy-gated threshold 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 | Hash-chained JSONL log for sign and broadcast operations - tamper-evident, append-only |
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 |
| MPC Signing | DKLS23 share orchestration, threshold signature, 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) |
Signing Models
All three surfaces compose with the same MPC 2-of-2 (DKLS23) signing layer - see Key Management for the share model and custody. External BYO (KMS, HSM, multisig, custodian) remains available through the SDK; see Bring your own signer. One MCP-specific constraint applies to BYO: MCP can only prepare, not sign with an external signer, so setMCP_BANDS=read,prepare and route the unsigned payload to your signer outside the MCP session.
What the Server Does Not Do
- Store or transmit private keys
- Cache blockchain data (the API backend handles caching)
- Make signing decisions (the policy engine and the user decide)
- Expose internal orchestration logic (tools map to outcomes, not implementation details)