mcp-eth-key-handler
Facilitate secure manipulation of Ethereum private cryptographic keys and enable deployment of smart contracts across EVM-compatible distributed ledgers. Supports operations like transaction endorsement, ledger data querying, and account valuation retrieval.
Author

zhangzhongnan928
Quick Info
Actions
Tags
Modular Control Point: Ethereum Key Management Utility
This implementation of the Model Context Protocol (MCP) provides a dedicated service for administering Ethereum credentials and orchestrating smart contract deployments, leveraging services like Infura for external communication. It furnishes Claude for Desktop clients and similar consumers with the requisite interfaces to interface with networks adhering to the Ethereum Virtual Machine (EVM) specification.

Core Capabilities
- 🗝️ Safeguard and oversee Ethereum secret keys within the local environment.
- 🌐 Establish connectivity to Infura endpoints for external ledger transactions.
- 📜 Provision compiled contract interfaces (ABI/Bytecode) for deployment procedures.
- 🖊️ Authorize and transmit ledger transactions.
- 💵 Inspect account balances and transactional histories.
- 🧐 Retrieve arbitrary ledger data and interface with established contract functionalities.
Initial Setup Guide
Prerequisites
- Runtime environment: Node.js, version 16 or newer.
- Access credentials for an Infura project.
- Installed copy of the Claude for Desktop application.
Installation Procedure
-
Obtain the repository source code: bash git clone https://github.com/zhangzhongnan928/mcp-evm-signer.git cd mcp-evm-signer
-
Resolve project dependencies: bash npm install
-
Compile the source materials: bash npm run build
-
Configure environment settings: bash cp .env.example .env
Modify the generated .env file to input your Infura API key and set network preferences.
Integration with Claude Client
- Incorporate this service definition into your Claude for Desktop configuration file:
{ "mcpServers": { "evm-signer": { "command": "node", "args": ["/path/to/mcp-evm-signer/build/index.js"], "env": { "INFURA_API_KEY": "your_infura_api_key_here", "DEFAULT_NETWORK": "sepolia", "ENCRYPT_KEYS": "true", "KEY_PASSWORD": "your_secure_password_here" } } } }
-
Relaunch the Claude for Desktop program.
-
The utility is now ready for commands concerning contract deployment, balance inquiries, or general EVM interactions.
Exposed Functionality
The EVM Key Handler service exposes the following capabilities for use via Claude interfaces:
Cryptographic Asset Administration
create-wallet: Provision a fresh Ethereum address/key pair.import-wallet: Load an existing credential set using its private key.list-wallets: Catalog all currently persisted wallet credentials.
Ledger Interaction Primitives
check-balance: Retrieve the Ether balance for a specified public address.get-transactions: Fetch recent transactional history tied to an account.send-transaction: Initiate a transfer of Ether assets.
Contract Logic Management
deploy-contract: Instigate the deployment of a new smart contract.call-contract: Invoke a non-state-mutating (read-only) contract method.execute-contract: Trigger a contract method that results in a state change.
Operational Examples
Illustrative prompts for leveraging the integrated tools:
Generating a New Wallet
Query example:
Utilizing the evm-signer suite, please generate a novel Ethereum wallet configuration for me.
Verifying Account Funds
Query example:
Could you ascertain the current ETH holding for the address 0x1234...5678 on the Sepolia testnet?
Deploying an ERC-20 Standard
Refer to our dedicated documentation located at [examples/erc20-token.md] for a comprehensive guide covering the lifecycle of deploying and interacting with an ERC-20 compliant contract.
Security Considerations
- Wallet credentials are maintained exclusively on the local machine.
- Optional password-based encryption is available for stored keys.
- Functionality is strictly limited to execution via the defined MCP channel.
- Always meticulously verify transaction details within the Claude for Desktop interface prior to final authorization.
- For initial testing, strongly favor public testnets like Sepolia or Goerli.
Reference Documentation
For comprehensive technical details, consult these resources:
- Usage Guide: In-depth instructions and operational examples.
- Examples: Repository of common workflow patterns and contract deployment scripts.
Repository Layout
Structure overview of the project:
mcp-evm-signer/ ├── src/ # Source code modules │ ├── config.ts # Environment parameter management │ ├── crypto.ts # Key material handling utilities │ ├── ethereum.ts # Core EVM communication functions │ └── index.ts # Primary MCP server bootstrapping logic ├── keys/ # Secure storage for private keys (excluded from version control) ├── examples/ # Sample usage scenarios ├── .env.example # Template for required environment variables └── ... # Other project metadata files
Development Contribution Guidelines
To participate in enhancing this project:
- Fork the main repository.
- Establish a dedicated feature branch (e.g.,
git checkout -b feature/enhancement-name). - Implement and validate your modifications.
- Commit your changes descriptively (
git commit -m 'Feat: Added significant new functionality'). - Push the new branch to your remote fork (
git push origin feature/enhancement-name). - Initiate a Pull Request against the primary repository branch.
Project Licensing
This utility is distributed under the terms of the MIT License; see the accompanying LICENSE file for complete specifics.
