MCP Server Token Minter for Multi-Chain ERC-20 Tokens
Mint ERC-20 tokens across multiple blockchains using an MCP server with AI agent tools for fast, automated multi-chain token creation and deployment.
npx -y @kukapay/token-minter-mcpOverview
This MCP (Model Context Protocol) server provides a developer-focused backend for minting ERC‑20 tokens across multiple blockchains. It exposes tools that AI agents and other automation systems can call to compile, deploy, verify, and mint ERC‑20 contracts on arbitrary EVM-compatible networks. The server centralizes multi‑chain configuration, RPC access, contract compilation, gas estimation, and transaction signing so teams can create and distribute tokens quickly and reproducibly.
The MCP design makes these capabilities available as tool endpoints usable by model-driven agents and conventional CI/CD pipelines. That lets you automate token creation flows — for example, generate a new token spec, deploy identical contracts on Polygon and BSC, toast the contract metadata to explorers, and mint initial supplies to multiple wallets — without manual per-chain orchestration.
Features
- Multi‑chain ERC‑20 compilation, deployment, verification, and minting
- Model Context Protocol (MCP) tool endpoints for AI agents and automation
- Pluggable chain adapters (RPC URLs, chain IDs, block explorers)
- Contract templates and customizable ERC‑20 parameters
- Private key / signer support for programmatic transactions
- Gas estimation and configurable gas strategies per chain
- Transaction status tracking and simple retries
- Optional containerized (Docker) deployment for production
Installation / Configuration
Prerequisites: Node.js (16+), npm or yarn, Docker (optional), RPC access (Infura/Alchemy/other) and Etherscan or equivalent API keys for verification.
Clone and install:
# or
Create an .env file (example):
PORT=8080
PRIVATE_KEY=0x012345... # signer key used for deployments (use secure secret store in prod)
NETWORKS_JSON='[
{"name":"ethereum","chainId":1,"rpc":"https://mainnet.infura.io/v3/KEY","explorerApi":"https://api.etherscan.io/api","explorerKey":"ETHERSCAN_KEY"},
{"name":"polygon","chainId":137,"rpc":"https://polygon-rpc.com","explorerApi":"https://api.polygonscan.com/api","explorerKey":"POLYGONSCAN_KEY"},
{"name":"bsc","chainId":56,"rpc":"https://bsc-dataseed.binance.org","explorerApi":"https://api.bscscan.com/api","explorerKey":"BSCSCAN_KEY"}
]'
Start the server locally:
# or in development
Docker:
Configuration notes:
- Keep PRIVATE_KEY and explorer API keys in a secure secret manager in production.
- NETWORKS_JSON can be supplied as a config file instead of an env variable for larger setups.
- Use separate keys for testnets while developing.
Available Tools / Resources
The MCP server exposes a set of tools/endpoints that agents can call. Typical tools include:
- contract-compiler: Compile Solidity ERC‑20 templates with constructor params
- contract-deployer: Deploy compiled bytecode to a target chain
- tx-minter: Mint tokens by calling the contract’s mint function
- gas-estimator: Estimate and suggest gas price/limits per chain
- explorer-verifier: Submit contract source for verification on block explorer APIs
- tx-status: Poll transaction receipts and confirmations
- wallet-manager: Manage deterministic wallets / derive addresses for airdrops
Example HTTP endpoints (illustrative):
- POST /mcp/tools/contract-deployer
- POST /mcp/tools/tx-minter
- GET /mcp/tools/tx-status?txHash=…
Check the repo’s API docs or OpenAPI file (if present) for exact request/response formats.
Use Cases
Multi‑chain token launch
- Define token parameters (name, symbol, decimals, initial supply).
- Use contract-compiler to build bytecode, then contract-deployer to deploy to Polygon, BSC, and Arbitrum.
- Verify sources with explorer-verifier and mint initial supply with tx-minter.
Testnet QA and CI
- As part of CI, compile and deploy an ERC‑20 to Goerli and Mumbai for integration tests.
- Automatically mint test tokens to test runner wallets and tear down after jobs complete.
Airdrops and treasury distribution
- Use wallet-manager to prepare recipient addresses.
- Batch mint tokens or execute multisend scripts across multiple chains using tx-minter and tx-status tools.
Rapid prototyping with AI agents
- Integrate with an AI agent that generates token specs from prompts (e.g., “create stablepoint token with 1M supply”), then calls the MCP contract-deployer and tx-minter tools to materialize the token across chosen chains.
Security and Best Practices
- Do not store production private keys in plaintext .env files. Use HSMs or secret managers.
- Prefer multisig for valuable deployments and token minting.
- Limit API access and require authentication for MCP endpoints in production.
- Monitor gas settings and set sensible timeouts / retry policies to avoid stuck transactions.
- Verify contracts on block explorers to increase transparency.
Supported Chains (examples)
| Chain | Chain ID | Notes |
|---|---|---|
| Ethereum | 1 | Mainnet |
| Polygon | 137 | EVM-compatible |
| BSC | 56 | Binance Smart Chain |
| Arbitrum | 42161 | Layer 2 |
| Avalanche | 43114 | C‑Chain (EVM) |
| Optimism | 10 | Layer 2 |
For more details, sample configs, and advanced usage, see the GitHub repository: https://github.com/kukapay/token-minter-mcp