MCPilot provides a suite of MCP (Model Context Protocol) servers that enable LLMs to interact with blockchains through MetaMask wallet, maintaining security by never exposing private keys. This toolkit connects AI with blockchain technology and simplifies user onboarding for blockchain interactions.
To use MCPilot with Claude Desktop, you'll need to configure the various MCP servers. Follow these steps:
First, ensure you have the necessary prerequisites installed:
Clone the repository:
git clone https://github.com/Xiawpohr/metamask-mcp.git
cd metamask-mcp
Install dependencies:
npm install
Follow the MCP setup guide at https://modelcontextprotocol.io/quickstart/user
Add the following configuration to your Claude Desktop MCP configuration file:
{
"mcpServers": {
"metamask-server": {
"command": "npx",
"args": [
"tsx",
"/PATH/TO/YOUR_PROJECT/packages/metamask-mcp/src/index.ts"
]
},
"chainlist-server": {
"command": "npx",
"args": [
"tsx",
"/PATH/TO/YOUR_PROJECT/packages/chainlist-mcp/src/index.ts"
]
},
"solc-server": {
"command": "npx",
"args": [
"tsx",
"/PATH/TO/YOUR_PROJECT/packages/solc-mcp/src/index.ts"
]
},
"erc20-server": {
"command": "npx",
"args": [
"tsx",
"/PATH/TO/YOUR_PROJECT/packages/erc20-mcp/src/index.ts"
]
},
"polygon-server": {
"command": "npx",
"args": [
"tsx",
"/PATH/TO/YOUR_PROJECT/packages/polygon-mcp/src/index.ts"
],
"env": {
"POLYGONSCAN_API_KEY": ""
}
},
"celo-server": {
"command": "npx",
"args": [
"tsx",
"/PATH/TO/YOUR_PROJECT/packages/celo-mcp/src/index.ts"
],
"env": {
"CELOSCAN_API_KEY": ""
}
},
"zircuit-server": {
"command": "npx",
"args": [
"tsx",
"/PATH/TO/YOUR_PROJECT/packages/zircuit-mcp/src/index.ts"
]
}
}
}
Replace /PATH/TO/YOUR_PROJECT/
with the actual path to your project directory.
If you want to use the Polygon or Celo verification services, add your respective API keys to the configuration.
MCPilot offers several specialized MCP servers that extend LLM capabilities:
Once configured, you can interact with MCPilot using natural language in Claude Desktop. Here are some examples:
You can test MCPilot functionality with these deployed contracts:
Natural Language Blockchain Interaction: Simply tell the AI what you want to do using plain language - from token swaps to contract signing.
Secure Private Key Management: All transactions are securely signed within the MetaMask mobile app, keeping your private keys protected.
Web2 and Web3 Interoperability: MCPilot enables seamless integration between centralized and decentralized platforms.
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "metamask-server" '{"command":"npx","args":["tsx","/PATH/TO/YOUR_PROJECT/packages/metamask-mcp/src/index.ts"]}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"metamask-server": {
"command": "npx",
"args": [
"tsx",
"/PATH/TO/YOUR_PROJECT/packages/metamask-mcp/src/index.ts"
]
},
"chainlist-server": {
"command": "npx",
"args": [
"tsx",
"/PATH/TO/YOUR_PROJECT/packages/chainlist-mcp/src/index.ts"
]
},
"solc-server": {
"command": "npx",
"args": [
"tsx",
"/PATH/TO/YOUR_PROJECT/packages/solc-mcp/src/index.ts"
]
},
"erc20-server": {
"command": "npx",
"args": [
"tsx",
"/PATH/TO/YOUR_PROJECT/packages/erc20-mcp/src/index.ts"
]
},
"polygon-server": {
"command": "npx",
"args": [
"tsx",
"/PATH/TO/YOUR_PROJECT/packages/polygon-mcp/src/index.ts"
],
"env": {
"POLYGONSCAN_API_KEY": ""
}
},
"celo-server": {
"command": "npx",
"args": [
"tsx",
"/PATH/TO/YOUR_PROJECT/packages/celo-mcp/src/index.ts"
],
"env": {
"CELOSCAN_API_KEY": ""
}
},
"zircuit-server": {
"command": "npx",
"args": [
"tsx",
"/PATH/TO/YOUR_PROJECT/packages/zircuit-mcp/src/index.ts"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"metamask-server": {
"command": "npx",
"args": [
"tsx",
"/PATH/TO/YOUR_PROJECT/packages/metamask-mcp/src/index.ts"
]
},
"chainlist-server": {
"command": "npx",
"args": [
"tsx",
"/PATH/TO/YOUR_PROJECT/packages/chainlist-mcp/src/index.ts"
]
},
"solc-server": {
"command": "npx",
"args": [
"tsx",
"/PATH/TO/YOUR_PROJECT/packages/solc-mcp/src/index.ts"
]
},
"erc20-server": {
"command": "npx",
"args": [
"tsx",
"/PATH/TO/YOUR_PROJECT/packages/erc20-mcp/src/index.ts"
]
},
"polygon-server": {
"command": "npx",
"args": [
"tsx",
"/PATH/TO/YOUR_PROJECT/packages/polygon-mcp/src/index.ts"
],
"env": {
"POLYGONSCAN_API_KEY": ""
}
},
"celo-server": {
"command": "npx",
"args": [
"tsx",
"/PATH/TO/YOUR_PROJECT/packages/celo-mcp/src/index.ts"
],
"env": {
"CELOSCAN_API_KEY": ""
}
},
"zircuit-server": {
"command": "npx",
"args": [
"tsx",
"/PATH/TO/YOUR_PROJECT/packages/zircuit-mcp/src/index.ts"
]
}
}
}
3. Restart Claude Desktop for the changes to take effect