Content
# bun-mcp-evm
This is a toolset for the Ethereum Virtual Machine (EVM) based on the Model Context Protocol (MCP), supporting multi-chain operations, token transfers, and balance queries.
## Environment Requirements
- [Bun](https://bun.sh) v1.2.2 or higher
- Node.js environment (for some dependencies)
## Installation
1. Clone the project and install dependencies:
```bash
bun install
```
## Configuration
### Network Configuration
Before use, you need to configure the network information. Multiple networks can be configured, and each network requires the following information:
- Network name (e.g., mainnet, sepolia)
- RPC URL
- Chain ID
Example configuration command:
```bash
bun run index.ts --configure-network mainnet --rpc-url "https://eth-mainnet.g.alchemy.com/v2/your-api-key" --chain-id 1
```
### Private Key Management
To perform transfer operations, you need to configure the private key. You can set an alias for the private key for easier use:
```bash
bun run index.ts --private-key "0xyour-private-key" --alias "my-wallet"
```
## Usage Instructions
### Start the Service
```bash
bun run index.ts
```
### Supported Features
1. ERC20 Token Operations
- Query balance
- Transfer
2. ERC721 (NFT) Operations
- Query balance
- Transfer
3. Native Token Operations
- Query ETH balance
- Transfer ETH
## Frequently Asked Questions
1. Q: How to change the default private key?
A: Use the `--set-default-key` parameter to set the default private key:
```bash
bun run index.ts --set-default-key "my-wallet"
```
2. Q: How to view the configured networks?
A: Use the `--list-networks` parameter to view all configured networks:
```bash
bun run index.ts --list-networks
```
## Security Tips
- Do not expose your private key in an insecure environment
- It is recommended to use environment variables to store sensitive information
- Regularly back up database files (evm.sqlite and security.sqlite)
## Troubleshooting
1. If you encounter network connection issues:
- Check if the RPC URL is correct
- Confirm that the chain ID in the network configuration matches
- Verify if the API key is valid
2. If the transfer fails:
- Confirm that the account balance is sufficient
- Check if the gas settings are reasonable
- Verify if the receiving address format is correct
## Contribution
Feel free to submit Issues and Pull Requests!
## License
MIT
Connection Info
You Might Also Like
everything-claude-code
Complete Claude Code configuration collection - agents, skills, hooks,...
markitdown
MarkItDown-MCP is a lightweight server for converting URIs to Markdown.
cc-switch
All-in-One Assistant for Claude Code, Codex & Gemini CLI across platforms.
servers
Model Context Protocol Servers
servers
Model Context Protocol Servers
Time
A Model Context Protocol server for time and timezone conversions.