evm-mcp-server
If you are the rightful owner of evm-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
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.
The @sinco-lab/evm-mcp-server is a Model Context Protocol (MCP) server designed to facilitate secure interactions with EVM-compatible blockchains. It utilizes the Viem library for blockchain operations and the MCP SDK to expose these functionalities as tools for AI agents or other MCP clients. The server connects to a specified EVM chain through environment variables, allowing clients to perform various read and write operations via a standardized MCP interface.
Features
- 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 tokens, signing messages, and interacting with contracts.
- Type Safe: Developed entirely in TypeScript for better maintainability and developer experience.
Tools
getAddress
Get the connected wallet address configured on the server.
getChain
Get the chain ID and name the server is connected to.
getBalance
Get the native token balance for a given address or the server's wallet.
signMessage
Sign a message using the server's configured wallet.
sendNativeToken
Send native tokens from the server's wallet to a recipient.
getTokenBalance
Get the ERC20 token balance for a specified owner address.
transferToken
Send a specified amount of an ERC20 token from the server's wallet.
getTokenTotalSupply
Get the total supply of an ERC20 token.
getTokenAllowance
Get the allowance an owner has granted to a spender for an ERC20 token.
approveToken
Approve a spender to withdraw an ERC20 token from the server's wallet.
revokeApproval
Revoke a spender's allowance for an ERC20 token.
transferTokenFrom
Transfer ERC20 tokens from one address to another, requiring prior approval.
convertToBaseUnit
Convert a decimal token amount to its base unit representation.
convertFromBaseUnit
Convert a token amount from its base unit representation to a decimal string.