GOAT MCP Server: 200+ Onchain Actions
Execute 200+ onchain actions across Ethereum, Solana, and Base using an MCP server for fast, secure multi-chain operations.
Overview
This MCP (Model Context Protocol) server is an example implementation in the GOAT SDK that exposes a large catalog of prebuilt onchain actions (200+). It’s intended as a lightweight, production-oriented service to sign and send transactions across multiple EVM and non-EVM chains — currently demonstrated for Ethereum, Solana, and Base — enabling fast, secure multi-chain operations from applications, bots, or LLM-driven agents.
Instead of reimplementing low-level transaction logic for every integration, the MCP server centralizes action implementations (transfers, approvals, swaps, NFT ops, contract calls, and more) behind a simple API. That lets developer tools or AI agents request complex sequences of onchain work in a consistent way while the server handles wallet signing, replay protection, nonce management, and gas estimation.
Features
- 200+ predefined onchain actions covering common DeFi, token, NFT, and account operations
- Multi-chain support: Ethereum, Base, Solana (example repo demonstrates CLI + server)
- Centralized private-key signing and transaction orchestration
- Fast HTTP/JSON API for remote orchestration (suitable for integration with LLM tools)
- Example TypeScript code and tests included in the GOAT SDK repo
- Environment-driven configuration for RPC endpoints, keys, and chain parameters
- Batch and single-action execution modes (sequenced and atomic where supported)
- Logging and simple telemetry for replay/debugging
Installation / Configuration
Clone the example server from the GOAT SDK repo, then install dependencies and configure environment variables.
- Clone and install
# install with npm or yarn
# or
- Example environment (.env) Create a .env file in the project root with at least the following variables:
PORT=3000
ETHEREUM_RPC=https://mainnet.infura.io/v3/YOUR_INFURA_KEY
BASE_RPC=https://base-mainnet.rpc-url
SOLANA_RPC=https://api.mainnet-beta.solana.com
PRIVATE_KEY=0xYOUR_SIGNING_PRIVATE_KEY
LOG_LEVEL=info
- PRIVATE_KEY: used by the server to sign transactions. Use a secure key-management approach for production.
- RPC URLs: replace with your provider endpoints (Infura, Alchemy, QuickNode, etc.).
- Start the server
# development
# production
By default the server listens on PORT and exposes a REST API for executing actions.
Available Resources
- GitHub example: https://github.com/goat-sdk/goat/tree/main/typescript/examples/by-framework/model-context-protocol
- Example action categories (catalog excerpt):
- ERC20: transfer, approve, transferFrom, increaseAllowance, decreaseAllowance
- ERC721/ERC1155: mint, transfer, safeTransferFrom, approve
- DeFi: swap on common AMMs, add/remove liquidity
- Account ops: deploy contract, call contract method, batch transactions
- Admin ops: setOwner, pause/unpause, execute multisig-style flows
- Solana-specific: token transfer, associated token account creation, program instruction wrappers
- Documentation and tests are included in the example folder to inspect available actions and parameter schemas.
API Examples
Generic HTTP POST to execute an action (adjust endpoint/fields to match the example repo):
- REST (curl)
- TypeScript (fetch)
;
;
result;
Note: The action name and parameter schema are defined in the server’s action catalog. Inspect the example project to see exact action IDs and required fields.
Use Cases
- Payroll / Airdrops: batch-distribute ERC20 tokens across many addresses with the server handling batching, gas estimation, and retries.
- Liquidation or Monitoring Responders: connect an LLM or webhook to detect onchain conditions, then call the MCP server to perform a liquidation or repay action atomically.
- Trading bots and arbitrage: route signed swap and liquidity operations across chains (or across Base and Ethereum) while keeping signing keys in one place.
- Wallet orchestration for dApps: abstract contract interactions behind a set of well-named actions for safer developer UX and easier audits.
- NFT minting flows: orchestrate mint calls, metadata updates, and collection-wide operations through a single API.
Tips and Next Steps
- Audit the available action catalog in the example repo before using in production; adapt and lock down actions as needed.
- For production, integrate secure key management (HSM, Vault, KMS) rather than plain PRIVATE_KEY files.
- Add rate-limiting and request authentication (API keys, mTLS, or JWT) to protect the endpoint.
- Review chain-specific gas strategies and replace public RPCs with private/managed providers for predictable performance.
For the complete example code and action catalog, see the repository: https://github.com/goat-sdk/goat/tree/main/typescript/examples/by-framework/model-context-protocol