Myth
Auto-generates MCP servers for Celo smart contracts, converting contract ABIs into AI-callable tools.
README
Myth
Myth auto-generates Model Context Protocol (MCP) servers for Celo smart contracts. Give it a verified contract address and it fetches the ABI from Blockscout, maps every function and event to an MCP tool, and launches a server your AI agent can call.
Built for Celo's agent-friendly properties: sub-cent gas, fast finality, and stablecoin gas payment via feeCurrency.
Open source under MIT. Contributions welcome — see CONTRIBUTING.md.
Architecture
[Contract Address] → [Blockscout ABI] → [ABI → Zod/JSON Schema] → [MCP Server]
↓
[EIP-1967 Proxy Resolver] → implementation ABI
| Step | Module | What it does |
|---|---|---|
| 1 | blockscout.ts |
GET ?module=contract&action=getabi&address={addr} |
| 2 | abi-to-zod.ts |
Maps Solidity types → Zod validators + JSON Schema |
| 3 | abi-events.ts |
Generates query event tools from ABI events |
| 4 | celo-tx.ts |
Attaches feeCurrency on write txs (pay gas in cUSD/USDT) |
| 5 | create-server.ts |
Wires tools into @modelcontextprotocol/sdk |
| 6 | registry.ts |
Multi-contract registry at ~/.myth/registry.json |
Install
# Global CLI
npm install -g @gideondern/myth-celo-mcp
# Or run without installing
npx -y --package @gideondern/myth-celo-mcp myth --help
npm: https://www.npmjs.com/package/@gideondern/myth-celo-mcp
Quick Start
# Infra workflow: add → list → serve
myth add -a 0x765DE816845861e75A25fCA122bb6898B8B1282a -n celo-mainnet --alias cusd
myth list
myth serve # serves registry (uses ~/.myth/cache for fast restarts)
# Single contract without registry
myth serve -a 0x765DE816845861e75A25fCA122bb6898B8B1282a -n celo-mainnet
# HTTP transport (for remote agents)
myth serve -a 0x765DE816845861e75A25fCA122bb6898B8B1282a -n celo-mainnet --http --port 3100
# Generate a standalone package with manifest + Cursor config
myth generate -a 0x765DE816845861e75A25fCA122bb6898B8B1282a -n celo-mainnet -o ./generated/cusd
Registry & ABI cache
Contracts live in ~/.myth/registry.json. ABIs are cached in ~/.myth/cache/<network>/ (24h TTL).
myth add -a 0x765DE816845861e75A25fCA122bb6898B8B1282a -n celo-mainnet --alias cusd
myth list
myth sync cusd --force # refresh ABI from Blockscout
myth remove cusd
myth serve # all registry contracts (cache-first)
myth serve --http # HTTP transport
Tools are prefixed by alias: cusd_balanceOf, cusd_event_Transfer, etc.
Cursor Integration
Add to ~/.cursor/mcp.json (already configured if you used the setup step):
{
"mcpServers": {
"myth-cusd": {
"command": "npx",
"args": [
"-y",
"--package",
"@gideondern/myth-celo-mcp",
"myth",
"serve",
"-a",
"0x765DE816845861e75A25fCA122bb6898B8B1282a",
"-n",
"celo-mainnet"
],
"env": {
"MYTH_FEE_CURRENCY": "cUSD"
}
}
}
}
Serve every contract in your registry (~/.myth/registry.json):
{
"mcpServers": {
"myth-registry": {
"command": "npx",
"args": ["-y", "--package", "@gideondern/myth-celo-mcp", "myth", "serve", "--registry"]
}
}
}
Reload Cursor MCP after saving. For write tools, add MYTH_PRIVATE_KEY to env.
Built-in Meta Tools
Every server includes:
| Tool | Description |
|---|---|
myth_contract_info |
Contract addresses, networks, tool counts |
myth_fee_currencies |
Available stablecoins per network for gas |
Networks
| Network | Blockscout API | Default RPC |
|---|---|---|
celo-mainnet |
https://celo.blockscout.com/api | https://forno.celo.org |
celo-sepolia |
https://celo-sepolia.blockscout.com/api | https://forno.celo-sepolia.celo-testnet.org |
Environment Variables
| Variable | Description |
|---|---|
MYTH_CONTRACT_ADDRESS |
Target contract |
MYTH_NETWORK |
celo-mainnet or celo-sepolia |
MYTH_RPC_URL |
Override RPC endpoint |
MYTH_PRIVATE_KEY |
Wallet for write transactions |
MYTH_FEE_CURRENCY |
Stablecoin for gas (cUSD, USDT, or 0x...) |
MYTH_REGISTRY_PATH |
Registry file (default: ~/.myth/registry.json) |
MYTH_BLOCKSCOUT_API_KEY |
Optional Blockscout PRO API key |
Programmatic API
import {
fetchContractAbi,
abiToMcpTools,
launchMythServer,
launchHttpServer,
addToRegistry,
} from "@gideondern/myth-celo-mcp";
await launchMythServer({
contractAddress: "0x765DE816845861e75A25fCA122bb6898B8B1282a",
network: "celo-mainnet",
feeCurrency: "cUSD",
});
await launchHttpServer({
config: { contractAddress: "0x...", network: "celo-mainnet" },
port: 3100,
});
Development
git clone https://github.com/gideondern/myth-celo-mcp.git
cd myth-celo-mcp
npm install
npm run build
node dist/cli.js add -a 0x765DE816845861e75A25fCA122bb6898B8B1282a -n celo-mainnet --alias cusd
node dist/cli.js serve
References
- celo-mcp — Official Celo MCP server (Python)
- evm-mcp-server — Dynamic EVM tool patterns
- Blockscout Contract API
License
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.