How goplausible/algorand-mcp works
Project Type and Purpose
• This is an open-source, monorepo toolset implementing a Model Context Protocol (MCP) for Algorand.
• It consists of two co-located packages:
• Server – a Node.js microservice exposing MCP-compliant HTTP/JSON endpoints to LLM hosts (Claude, Cursor).
• Client – a TypeScript library for wallet management and transaction signing (browser & Node.js).
High-Level File Structure & Architectural Patterns
• Monorepo layout
• Root: package.json, tsconfig.json, shared tooling/config.
• /packages/client: LocalWallet.ts, index.ts, env.ts – client entry, wallet abstraction, environment config.
• /packages/server:
– API specs (OpenAPI/JSON files) + smithery.yaml – endpoint definitions, request/response schemas
– src/index.ts – service bootstrap (reads env, registers resources, starts HTTP server)
– src/env.ts – central environment/config loader
– src/resources – “controllers” or resource handlers (knowledge docs, wallet endpoints)
– src/tools – “services” layer: accountManager, algodManager, utilityManager, transactionManager and sub-modules (apiManager for Algod/Indexer/NFD/Tinyman/Ultrade/Vestige)
– tests covering resources and tools
– Dockerfile, jest.config, tsconfig
• Layered modular architecture
• Resource Layer (HTTP handlers) → Tools/Service Layer (business logic) → External Systems (Algorand nodes, DEX APIs, NFD service).
• Design patterns
• Separation of concerns: docs vs. wallet vs. transaction vs. API tools
• Standardized response envelope (data + metadata / error)
• Environment-driven feature toggles for optional DeFi integrations
Key Concepts from README
• Exposes ~125 “tools & resources” grouped by category (account, asset, application, transactions, key management, docs taxonomy).
• Integrates with Algorand network via algosdk, plus optional external services:
• NFDomains for name service
• Tinyman, Ultrade, Vestige for DeFi analytics/AMM/DEX
• Client package is WIP: provides LocalWallet, external wallet connectors (Pera, Defly, Daffi).