MCP server for Ethereum wallet generation and HD wallet operations
Project description
Ethereum Wallet MCP Server
A Model Context Protocol (MCP) server providing Ethereum wallet generation and HD wallet functionality. This server enables AI assistants like Claude to securely generate Ethereum wallets, work with BIP39 mnemonics, and derive multiple accounts from a single seed phrase.
Features
Tools
generate_wallet- Generate a new random Ethereum walletgenerate_wallet_with_mnemonic- Generate a wallet with BIP39 seed phraserestore_wallet_from_mnemonic- Restore wallet from existing mnemonicrestore_wallet_from_private_key- Restore wallet from private keyderive_multiple_accounts- Derive multiple HD wallet accountsgenerate_vanity_address- Generate address matching a pattern
Prompts
create_secure_wallet- Guided secure wallet creationbackup_wallet_guide- Wallet backup instructionsrecover_wallet_help- Wallet recovery assistance
Resources
wallet://documentation/bip39- BIP39 standard documentationwallet://documentation/derivation-paths- HD derivation path docswallet://wordlist/{language}- BIP39 wordlists by language
Installation
# Install from source
pip install -e .
# Or with dev dependencies
pip install -e ".[dev]"
Usage
Running the Server
# Run directly
ethereum-wallet-mcp
# Or via Python
python -m ethereum_wallet_mcp.server
Claude Desktop Configuration
Add to your Claude Desktop config (claude_desktop_config.json):
{
"mcpServers": {
"ethereum-wallet": {
"command": "ethereum-wallet-mcp"
}
}
}
Example Interactions
User: "Generate a new Ethereum wallet for me"
→ Returns: address, private_key, public_key
User: "Create a wallet with a 24-word seed phrase"
→ Returns: address, private_key, mnemonic (24 words), derivation_path
User: "Restore my wallet from this seed: abandon abandon abandon..."
→ Returns: restored wallet details
User: "Derive 10 accounts from my seed phrase"
→ Returns: list of 10 accounts with addresses and keys
User: "Generate a vanity address starting with 'cafe'"
→ Returns: matching address with generation stats
Security Considerations
⚠️ IMPORTANT SECURITY WARNINGS:
- Never share private keys or mnemonic phrases - These give full access to funds
- This server does not persist sensitive data - Keys exist only in memory during operation
- Use hardware wallets for real funds - Software wallets are inherently less secure
- Vanity addresses carry risks - Never use for high-value storage
- Verify addresses independently - Always double-check derived addresses
Development
Running Tests
pytest tests/ -v
Code Formatting
black src/ tests/
isort src/ tests/
Type Checking
mypy src/
API Reference
Tool: generate_wallet
Generate a new random Ethereum wallet with no mnemonic.
Parameters: None
Returns:
address(str): Checksummed Ethereum addressprivate_key(str): Hex-encoded private key (0x prefixed)public_key(str): Hex-encoded public key
Tool: generate_wallet_with_mnemonic
Generate a new wallet with BIP39 mnemonic seed phrase.
Parameters:
word_count(int, optional): 12, 15, 18, 21, or 24. Default: 12language(str, optional): Mnemonic language. Default: "english"passphrase(str, optional): BIP39 passphrase. Default: ""derivation_path(str, optional): HD path. Default: "m/44'/60'/0'/0/0"
Returns:
address,private_key,public_keymnemonic(str): Space-separated seed wordsderivation_path(str): Path usedpassphrase_used(bool): Whether passphrase was applied
Tool: restore_wallet_from_mnemonic
Restore a wallet from an existing BIP39 mnemonic.
Parameters:
mnemonic(str, required): Space-separated mnemonic phrasepassphrase(str, optional): BIP39 passphrase. Default: ""derivation_path(str, optional): HD path. Default: "m/44'/60'/0'/0/0"
Returns: Same as generate_wallet_with_mnemonic (without mnemonic field)
Tool: restore_wallet_from_private_key
Restore a wallet from a private key.
Parameters:
private_key(str, required): Hex private key (with or without 0x prefix)
Returns:
address,private_key(normalized),public_key
Tool: derive_multiple_accounts
Derive multiple accounts from a single mnemonic.
Parameters:
mnemonic(str, required): BIP39 mnemoniccount(int, optional): Number of accounts (1-100). Default: 5start_index(int, optional): Starting index. Default: 0passphrase(str, optional): BIP39 passphrase. Default: ""base_path(str, optional): Base HD path. Default: "m/44'/60'/0'/0"
Returns:
accounts(list): List of {index, derivation_path, address, private_key, public_key}total_derived(int): Number of accounts derivedbase_path(str): Base path used
Tool: generate_vanity_address
Generate an address matching a vanity pattern.
Parameters:
prefix(str, optional): Desired prefix after 0x (hex chars)suffix(str, optional): Desired suffix (hex chars)case_sensitive(bool, optional): Match case exactly. Default: falsetimeout_seconds(int, optional): Max search time. Default: 60
Returns:
address,private_key,public_keypattern_matched(str): Matched patternattempts(int): Addresses triedtime_seconds(float): Time takendifficulty(int): Estimated 1-in-N difficulty
License
MIT License - See LICENSE for details.
Contributing
Contributions welcome! Please read the contributing guidelines and submit pull requests.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ethereum_wallet_mcp-1.0.0.tar.gz.
File metadata
- Download URL: ethereum_wallet_mcp-1.0.0.tar.gz
- Upload date:
- Size: 161.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b49ba43b66b60c74c5f48e6695bd55e8ecb1d7043c67069f4c508555278e9553
|
|
| MD5 |
f0d30774a7004681f0f7918f38c3d78b
|
|
| BLAKE2b-256 |
f3cf688abd64b4c994e416dbe4def5b5514ef1961e4375840509a7fb60be565b
|
File details
Details for the file ethereum_wallet_mcp-1.0.0-py3-none-any.whl.
File metadata
- Download URL: ethereum_wallet_mcp-1.0.0-py3-none-any.whl
- Upload date:
- Size: 53.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
86db40b594ea79bebb3d83f4c4446c54934c051a77b5e152f46761c69630bbe8
|
|
| MD5 |
92eea15aebe42d39bc8403b718a549cc
|
|
| BLAKE2b-256 |
2a8a1e692ea927418f351adf867e872d58d5387cf25a712c17634940cf6ef2aa
|