Architecture Model
Runtime Path
At runtime, the architecture is straightforward:
- MCP server is created via
createServer(). - Client discovers tools through
listTools. - Agent runtime maps MCP tool schemas into AI SDK tool definitions.
- LLM decides and calls tools.
- Tool handlers execute domain logic and return structured results.
Why InMemoryTransport Matters in E2E
E2E tests use InMemoryTransport.createLinkedPair() to eliminate network transport noise while preserving the full MCP request/response boundary.
That gives high signal for:
- tool discovery behavior
- argument generation quality
- server handler integration
without introducing unrelated socket/process instability.
Domain Coverage in v0.1.0
- Chain: network metadata and block status.
- Registry: canonical contract/token address resolution and validation.
- Account: balances and allowances.
- Token: metadata, resolution, and valuation interface.
- DeFi Read: quote/liquidity/market read paths.
- Indexer: subgraph and SQL query interfaces with policy checks.
- Diagnostics: endpoint health and probing tools.
Operational Guardrails
Architecturally, safety is enforced before external calls:
- endpoint policy enforcement
- query shape and read-only restrictions
- timeout and bounded response handling
- explicit error typing for safe agent interpretation
Last updated on