MetaMask Blockchain Toolkit MCP server

Integrates with blockchain technologies like MetaMask, ERC20 tokens, and smart contracts, enabling wallet connections, contract deployment, transaction verification, and token management across Celo and Polygon networks.
Back to servers
Setup instructions
Provider
Xiawpohr
Release date
Apr 06, 2025
Language
TypeScript
Stats
3 stars

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.

Installation and Setup

To use MCPilot with Claude Desktop, you'll need to configure the various MCP servers. Follow these steps:

  1. First, ensure you have the necessary prerequisites installed:

    • Node.js and npm
    • Claude Desktop application
  2. Clone the repository:

    git clone https://github.com/Xiawpohr/metamask-mcp.git
    cd metamask-mcp
    
  3. Install dependencies:

    npm install
    
  4. Follow the MCP setup guide at https://modelcontextprotocol.io/quickstart/user

  5. 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"
          ]
        }
      }
    }
    
  6. Replace /PATH/TO/YOUR_PROJECT/ with the actual path to your project directory.

  7. If you want to use the Polygon or Celo verification services, add your respective API keys to the configuration.

Using MCPilot

Available MCP Servers

MCPilot offers several specialized MCP servers that extend LLM capabilities:

  • metamask-mcp: Enables secure wallet operations through MetaMask
  • chainlist-mcp: Provides information on supported blockchain networks
  • solc-mcp: Compiles Solidity smart contracts
  • erc20-mcp: Manages ERC20 tokens
  • celo-mcp: Verifies contracts on the Celo blockchain
  • polygon-mcp: Verifies contracts on the Polygon blockchain
  • zircuit-mcp: Supplies token data on the Zircuit blockchain

Interacting with MCPilot

Once configured, you can interact with MCPilot using natural language in Claude Desktop. Here are some examples:

  • "Connect to my MetaMask wallet"
  • "Show me my token balances"
  • "Swap 0.1 ETH for DAI"
  • "Compile this Solidity contract: [contract code]"
  • "Verify this contract on Polygon"

Test Contracts

You can test MCPilot functionality with these deployed contracts:

Key Features

  • 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.

How to install this MCP server

For Claude Code

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.

For Cursor

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.

Adding an MCP server to Cursor globally

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"
            ]
        }
    }
}

Adding an MCP server to a project

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.

How to use the MCP server

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.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.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

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later