Base MCP Server
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.
README
NOTE: This repo has moved to base/base-mcp
Base MCP Server
A Model Context Protocol (MCP) server that provides onchain tools for Claude AI, allowing it to interact with the Base blockchain and Coinbase API.
Overview
This MCP server extends Claude's capabilities by providing tools to:
- Retrieve wallet addresses
- Get testnet ETH (on Base Sepolia)
- List wallet balances
- Transfer funds between wallets
- Deploy smart contracts
The server uses the Coinbase SDK to interact with the Base blockchain and Coinbase services.
Prerequisites
- Node.js (v16 or higher)
- npm or yarn
- Coinbase API credentials (API Key Name and Private Key)
- A wallet seed phrase
Installation
Option 1: Install from npm (Recommended)
# Install globally
npm install -g base-mcp
# Or install locally in your project
npm install base-mcp
Option 2: Install from Source
-
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
Configuration
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
Testing
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.
Examples
See the examples.md file for detailed examples of how to interact with the Base MCP tools through Claude.
Integration with Claude Desktop
To add this MCP server to Claude Desktop:
-
Create or edit the Claude Desktop configuration file at:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
- macOS:
-
Add 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.
Available Tools
get-address
Retrieves the address for your wallet.
Example query to Claude:
"What's my wallet address?"
get-testnet-eth
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?"
list-balances
Lists all balances for your wallet.
Example query to Claude:
"Show me my wallet balances."
transfer-funds
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 transfer
Example query to Claude:
"Transfer 0.01 ETH to 0x1234567890abcdef1234567890abcdef12345678."
deploy-contract
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 compiler
Example query to Claude:
"Deploy a simple ERC20 token contract for me."
Security Considerations
- The configuration file contains sensitive information (API keys and seed phrases). Ensure it's properly secured and not shared.
- Consider using environment variables or a secure credential manager instead of hardcoding sensitive information.
- Be cautious when transferring funds or deploying contracts, as these operations are irreversible on the blockchain.
Troubleshooting
If you encounter issues:
- Check that your Coinbase API credentials are correct
- Verify that your seed phrase is valid
- Ensure you're on the correct network (Base Sepolia for testnet operations)
- Check the Claude Desktop logs for any error messages
License
Making Your MCP Discoverable
To make your MCP server discoverable by other developers, follow these steps:
1. Publish to npm
# 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.
2. Share Your GitHub Repository
Make sure your GitHub repository is public and well-documented. Add the following to enhance discoverability:
- A detailed README (like this one)
- Examples of usage
- Contributing guidelines
- Issue templates
3. Add to the MCP Directory
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:
- Check if your package is published to npm
- Verify your GitHub repository information
- Generate a submission file with all the necessary information
- Guide you through the submission process
Alternatively, you can manually submit by:
- Visiting the MCP Directory Repository
- Following the contribution guidelines to add your MCP server
4. Promote in Relevant Communities
Share your MCP server in communities where developers using Claude might be active:
- Anthropic Developer Discord
- Claude subreddit
- AI/ML developer forums
- Blockchain and Web3 communities
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Please make sure your code follows the existing style and includes appropriate tests.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。