A Model Context Protocol (MCP) server that provides onchain tools for LLMs, allowing them to interact with the Base network and Coinbase API.
Configuration
View docs{
"mcpServers": {
"base-base-mcp": {
"command": "npx",
"args": [
"-y",
"base-mcp@latest"
],
"env": {
"CHAIN_ID": "optional_for_base_sepolia_testnet",
"PINATA_JWT": "your_pinata_jwt",
"SEED_PHRASE": "your seed phrase here",
"NEYNAR_API_KEY": "your_neynar_api_key",
"ALCHEMY_API_KEY": "your_alchemy_api_key",
"OPENROUTER_API_KEY": "your_openrouter_api_key",
"COINBASE_PROJECT_ID": "your_project_id",
"COINBASE_API_KEY_NAME": "your_api_key_name",
"COINBASE_API_PRIVATE_KEY": "your_private_key"
}
}
}
}You can run Base MCP Server locally to access onchain tools for wallet management, contract interactions, onramping, NFT handling, and more. It exposes a programmable AgentKit interface so your MCP client can orchestrate Base network actions from your applications.
Connect your MCP client to the Base MCP Server and start issuing tool actions. You can retrieve wallet addresses, check balances, transfer funds, deploy contracts, call contract functions, interact with Morpho vaults, onramp funds via Coinbase, manage ERC20 tokens, list and transfer NFTs, buy OpenRouter credits, and resolve Farcaster usernames to Ethereum addresses. Use the available tool endpoints to perform tasks end-to-end, from wallet discovery to asset transfers and onchain operations. Start by initializing the MCP client with the server configuration, then send actions that specify the tool you want to use and the required parameters.
Prerequisites you need before installing: Node.js v16 or higher, npm or yarn, and credentials for Coinbase and any onramp or NFT-related services you plan to use. You will also configure environment variables with your keys and seed phrases.
Option 1: Install from npm (recommended)
# Install globally
npm install -g base-mcp
# Or install locally in your project
npm install base-mcp
```} ,{Run the server locally via the stdio path. The configuration uses a local command that invokes the MCP runtime and passes your environment credentials.
Create or update your MCP config to point at the local server. A sample configuration is shown below.
{
"mcpServers": {
"base_mcp": {
"type": "stdio",
"name": "base_mcp",
"command": "npx",
"args": ["-y", "base-mcp@latest"],
"env": {
"COINBASE_API_KEY_NAME": "your_api_key_name",
"COINBASE_API_PRIVATE_KEY": "your_private_key",
"SEED_PHRASE": "your seed phrase here",
"COINBASE_PROJECT_ID": "your_project_id",
"ALCHEMY_API_KEY": "your_alchemy_api_key",
"PINATA_JWT": "your_pinata_jwt",
"OPENROUTER_API_KEY": "your_openrouter_api_key",
"CHAIN_ID": "optional_for_base_sepolia_testnet",
"NEYNAR_API_KEY": "your_neynar_api_key"
},
"disabled": false,
"autoApprove": []
}
}
}
```}]}]},{Install options include building from source if you prefer local development. You can also initialize the MCP client with a quick setup command to generate initial configuration for your environment.
Security and best practices: keep API keys and seed phrases secure, prefer credentials management over hardcoding values, and verify all operations before executing irreversible actions such as transfers or contract deployments.
Testing and examples: run tests to verify the MCP server functionality and consult example usage patterns to understand how to compose tool requests for common workflows such as wallet management, token transfers, and NFT operations.
Prerequisites recap: Node.js v16+, npm or yarn, Coinbase API credentials, a wallet seed phrase, Coinbase Project ID for onramping, Alchemy API Key for NFT usage, and optional OpenRouter API Key for buying credits. You may also provide a Chain ID for specific testnets and a Neynar API Key for Farcaster functionality.
Retrieves the wallet address associated with your seed phrase or connected wallet.
Lists all token and ETH-like balances for your wallet.
Transfers funds from your wallet to a destination address, specifying asset and amount.
Deploys a smart contract to the blockchain using provided constructor args and ABI/bytecode.
Checks the reputation or risk score of a given address.
Fetches Morpho vaults for a specified asset to show lending options.
Calls a contract function with given arguments and ABI.
Lists assets available for onramping in a given country/subdivision.
Provides a URL to initiate onramping funds via Coinbase.
Checks the balance of an ERC20 token for a given contract address.
Transfers ERC20 tokens to a recipient address.
Lists NFTs owned by a specified address.
Transfers an NFT (ERC721 or ERC1155) to another address.
Purchases OpenRouter credits using USDC.