evm-mcp-server logo

evm-mcp-server

by sinco-lab

An EVM interaction service gateway based on Model Context Protocol (MCP) and Viem, enabling AI agents or services to securely interact with a configured EVM-compatible blockchain. It leverages Viem for blockchain interactions and the MCP SDK to expose capabilities as tools consumable by AI agents or other MCP clients.

View on GitHub

Last updated: N/A

What is evm-mcp-server?

This project provides a Model Context Protocol (MCP) server designed to act as a gateway for interacting with an EVM-compatible blockchain. It leverages the Viem library for blockchain interactions and the MCP SDK to expose these capabilities as tools consumable by AI agents or other MCP clients.

How to use evm-mcp-server?

To use this server, you need to install it, configure the environment variables (WALLET_PRIVATE_KEY and RPC_PROVIDER_URL), build the project, and then start the MCP server. You can connect from clients like Cursor or Claude by configuring their respective configuration files with the server's command and environment settings.

Key features of evm-mcp-server

  • MCP Integration: Exposes EVM functionalities as standard MCP tools.

  • Viem Powered: Utilizes the modern and efficient Viem library for reliable EVM interactions.

  • Configurable Endpoint: Connects to any EVM-compatible chain via an RPC URL defined in the environment setup.

  • Core EVM Operations: Provides tools for common tasks like checking balances, transferring native tokens and ERC20 tokens, signing messages, and interacting with contracts.

Use cases of evm-mcp-server

  • Enabling AI agents to interact with EVM-compatible blockchains.

  • Providing a secure gateway for services to perform blockchain operations.

  • Automating blockchain tasks through a standardized MCP interface.

  • Integrating blockchain functionalities into applications using AI agents.

FAQ from evm-mcp-server

What is MCP?

Model Context Protocol (MCP) is a protocol for AI agents to interact with external tools and services.

What is Viem?

Viem is a TypeScript library for interacting with Ethereum and other EVM-compatible blockchains.

How do I configure the server?

Configuration is primarily handled via environment variables such as WALLET_PRIVATE_KEY and RPC_PROVIDER_URL.

How do I connect clients like Cursor or Claude?

You can configure clients by adding the server configuration to their respective configuration files (e.g., .cursor/mcp.json).

What security considerations should I keep in mind?

Be careful with your WALLET_PRIVATE_KEY. Never commit it to version control and consider using a dedicated wallet for development and testing.