loading…
Search for a command to run...
loading…
An MCP server that provides onchain tools for Claude AI to interact with the Base blockchain and Coinbase API, enabling wallet operations, testnet ETH, balance
An MCP server that provides onchain tools for Claude AI to interact with the Base blockchain and Coinbase API, enabling wallet operations, testnet ETH, balance checks, fund transfers, and smart contract deployment.
NOTE: This repo has moved to base/base-mcp
A Model Context Protocol (MCP) server that provides onchain tools for Claude AI, allowing it to interact with the Base blockchain and Coinbase API.
This MCP server extends Claude's capabilities by providing tools to:
The server uses the Coinbase SDK to interact with the Base blockchain and Coinbase services.
# Install globally
npm install -g base-mcp
# Or install locally in your project
npm install base-mcp
Clone this repository:
git clone https://github.com/dschlabach/base-mcp-alpha.git
cd base-mcp-alpha
Install dependencies:
npm install
Build the project:
npm run build
Optionally, link it globally:
npm link
Create a .env file with your credentials:
# Coinbase API credentials
# You can obtain these from the Coinbase Developer Portal: https://cdp.coinbase.com/
COINBASE_API_KEY_NAME=your_api_key_name
COINBASE_API_PRIVATE_KEY=your_private_key
# Wallet seed phrase (12 or 24 words)
# This is the mnemonic phrase for your wallet
SEED_PHRASE=your seed phrase here
Test the MCP server to verify it's working correctly:
npm test
This script will verify that your MCP server is working correctly by testing the connection and available tools.
See the examples.md file for detailed examples of how to interact with the Base MCP tools through Claude.
To add this MCP server to Claude Desktop:
Create or edit the Claude Desktop configuration file at:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.json~/.config/Claude/claude_desktop_config.jsonAdd the following configuration:
{
"mcpServers": {
"base-mcp": {
"command": "node",
"args": ["/path/to/base-mcp/build/index.js"],
"env": {
"COINBASE_API_KEY_NAME": "your_api_key_name",
"COINBASE_API_PRIVATE_KEY": "your_private_key",
"SEED_PHRASE": "your seed phrase here"
},
"disabled": false,
"autoApprove": []
}
}
}
Restart Claude Desktop for the changes to take effect.
Retrieves the address for your wallet.
Example query to Claude:
"What's my wallet address?"
Gets testnet ETH for your wallet. This can only be called on the Base Sepolia network.
Example query to Claude:
"Can you get me some testnet ETH for my wallet?"
Lists all balances for your wallet.
Example query to Claude:
"Show me my wallet balances."
Transfers funds from your wallet to another address.
Parameters:
destination: The address to which to transfer fundsassetId: The asset ID to transferamount: The amount of funds to transferExample query to Claude:
"Transfer 0.01 ETH to 0x1234567890abcdef1234567890abcdef12345678."
Deploys a smart contract to the blockchain.
Parameters:
constructorArgs: The arguments for the contract constructorcontractName: The name of the contract to deploysolidityInputJson: The JSON input for the Solidity compiler containing contract source and settingssolidityVersion: The version of the solidity compilerExample query to Claude:
"Deploy a simple ERC20 token contract for me."
If you encounter issues:
To make your MCP server discoverable by other developers, follow these steps:
# Login to npm (you'll need an npm account)
npm login
# Publish the package
npm publish
This will make your MCP server available on the npm registry, allowing other developers to install it using npm install base-mcp.
Make sure your GitHub repository is public and well-documented. Add the following to enhance discoverability:
The Model Context Protocol community maintains a directory of available MCP servers. Submit your MCP server to be included in this directory by running:
npm run submit
This script will:
Alternatively, you can manually submit by:
Share your MCP server in communities where developers using Claude might be active:
Contributions are welcome! Please feel free to submit a Pull Request.
git checkout -b feature/amazing-feature)git commit -m 'Add some amazing feature')git push origin feature/amazing-feature)Please make sure your code follows the existing style and includes appropriate tests.
Выполни в терминале:
claude mcp add base-mcp-server -- npx Безопасность
Низкий рискАвтоматическая эвристика по публичным данным — не гарантия безопасности.