gen-blockchain-addr-mcp-server
If you are the rightful owner of gen-blockchain-addr-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.
This project provides an offline tool for generating multi-cryptocurrency addresses and encapsulates it as an MCP (Model Context Protocol) server.
Blockchain Address Generation MCP Server
This project provides an offline tool for generating multi-cryptocurrency addresses and encapsulates it as an MCP (Model Context Protocol) server.
Why choose offline address generation?
In the blockchain domain, private keys and mnemonic phrases are at the core of asset security. Addresses generated by online websites or applications pose potential risks, as your mnemonic phrases or private keys might be exposed. This project aims to provide a completely offline, trustworthy address generation solution to ensure the security of your assets.
Key Highlights:
- Offline Generation: All address generation processes are completed locally, without the need for internet connection, maximizing the security of your private keys and mnemonic phrases.
- Multi-Coin Support: Supports mainstream cryptocurrencies such as Bitcoin (BTC), Ethereum (ETH), Tron (TRX), Dogecoin (DOGE), Cosmos (ATOM), Filecoin (FIL), Bitcoin Cash (BCH), Litecoin (LTC), Arbitrum (ARB), and more.
- Flexible Input Options: Supports creating addresses via mnemonic phrases, seeds, or random generation, with options for mnemonic language and passphrase.
- Detailed Output Information: In addition to addresses, it outputs corresponding private keys, public keys, extended private keys, extended public keys, and WIF private keys (if applicable), facilitating verification and backup.
- MCP Server Integration: Encapsulates the address generation functionality as an MCP tool, allowing other AI agents or systems to call it via the MCP protocol.
How to Use
1. Environment Setup
Ensure your system has Python 3.10 or higher installed.
It is recommended to use uv
for dependency management:
# Install uv (if not already installed)
curl -LsSf https://astral.sh/uv/install.sh | sh
# Navigate to the project directory
cd gen-blockchain-addr-mcp-server
# Install dependencies using uv
uv sync
2. Usage as a Command-Line Tool
You can directly run the generate_multi_coin_addresses.py
script to generate addresses.
uv run scripts/generate_multi_coin_addresses.py --help
Examples:
- Randomly generate addresses for all supported cryptocurrencies:
uv run scripts/generate_multi_coin_addresses.py
- Generate Bitcoin addresses using a specified mnemonic phrase:
uv run scripts/generate_multi_coin_addresses.py -m "your mnemonic phrase here" -s BTC
- Generate Ethereum addresses using a specified seed and passphrase:
uv run scripts/generate_multi_coin_addresses.py --seed "your seed hex here" -p "your passphrase" -s ETH
- Randomly generate Chinese (Simplified) mnemonic and addresses for all cryptocurrencies:
uv run scripts/generate_multi_coin_addresses.py -l chinese-simplified
3. Usage as an MCP Server
You can run this project as an MCP server, allowing other AI agents or systems to call the gen_addr
tool via the MCP protocol.
uv run server.py
Once the server starts, it will listen for MCP client requests.
4. Claude MCP Server Configuration Example
Below is an example mcp_server.json
configuration file to connect this MCP server to Claude:
{
"mcpServers": [
"gen-blockchain-addr-mcp-server": {
"type": "stdio",
"command": "uv",
"args": ["--directory", "/path/to/gen-blockchain-addr-mcp-server/", "run", "server.py"]
}
]
}
Note: The language list in the enum
field should be consistent with hdwallet.mnemonics.bip39.BIP39_MNEMONIC_LANGUAGES.keys()
.
gen_addr
Tool Parameter Description
The gen_addr
tool accepts the following parameters:
passphrase
(string, optional):- Description: An optional passphrase for the mnemonic. Used to enhance the security of the mnemonic.
- Example:
"mysecretpassphrase"
symbol
(string, optional):- Description: An optional cryptocurrency symbol, e.g.,
BTC
,ETH
,TRX
. If specified, only addresses for this cryptocurrency will be generated. If"BTC"
is passed, all Bitcoin-related address types (P2PKH, P2SH, SegWit, Taproot) will be generated. - Supported Symbols:
BTC
,BTC_P2SH
,BTC_SEGWIT
,BTC_TAPROOT
,ETH
,TRX
,DOGE
,ATOM
,FIL
,BCH
,LTC
,ARB
. - Example:
"ETH"
,"BTC"
- Description: An optional cryptocurrency symbol, e.g.,
mnemonic
(string, optional):- Description: An optional BIP39 mnemonic phrase. If provided, addresses will be generated using this mnemonic; otherwise, a new random mnemonic will be generated.
- Example:
"word1 word2 ... word12"
language
(string, optional):- Description: The language of the mnemonic phrase (e.g.,
english
,chinese-simplified
). Defaults toenglish
. - Supported Languages:
english
,chinese-simplified
,chinese-traditional
,french
,italian
,japanese
,korean
,spanish
,russian
and so on. - Default Value:
"english"
- Example:
"chinese-simplified"
- Description: The language of the mnemonic phrase (e.g.,
seed
(string, optional):- Description: An optional hexadecimal seed ("Seed"). If provided, this seed will be prioritized for address generation, ignoring the mnemonic.
- Example:
"0123456789abcdef..."
(64-character hexadecimal string)
Tool Output Example:
{
"mnemonic": "...",
"language": "english",
"entropy": "...",
"seed": "...",
"addresses": {
"Bitcoin (P2PKH Legacy)": {
"address": "...",
"private_key": "...",
"public_key": "...",
"xprivate_key": "...",
"xpublic_key": "...",
"wif": "..."
},
"Ethereum (ETH)": {
"address": "...",
"private_key": "...",
"public_key": "...",
"xprivate_key": null,
"xpublic_key": null,
"wif": null
}
// ... other cryptocurrency addresses
}
}