MCP server for managing hundreds of EOA accounts via HD wallet derivation
Project description
mcp-beehive
An MCP server for managing hundreds of Ethereum EOA wallets derived from a single BIP44 HD seed. Exposes wallet operations — ETH transfers, ERC20 transfers, arbitrary contract calls — as MCP tools over HTTP. Wallet addresses and balances are cached in a local SQLite database.
How wallets are named
Each wallet maps to a BIP44 derivation path index:
wallet-0042 → index 42 → m/44'/60'/0'/0/42
Names are zero-padded to four digits. Any tool that accepts a wallet_name also accepts a bare integer ("42") or an unpadded name ("wallet-42").
Quickstart (recommended)
No install required — run directly from PyPI with uvx:
{
"mcpServers": {
"beehive": {
"command": "uvx",
"args": ["mcp-beehive"],
"env": {
"MNEMONIC": "your twelve word seed phrase here",
"RPC_URL": "https://mainnet.infura.io/v3/YOUR_KEY"
}
}
}
}
Add this to:
- Claude Desktop:
~/Library/Application Support/Claude/claude_desktop_config.json - Claude Code:
.claude/settings.jsonin your project or~/.claude/settings.jsonglobally
Requirements
- Python 3.12+
- uv
Configuration
All configuration is via environment variables:
| Variable | Required | Default | Description |
|---|---|---|---|
MNEMONIC |
Yes (for signing) | — | BIP39 mnemonic phrase |
RPC_URL |
No | https://eth.llamarpc.com |
Default JSON-RPC endpoint |
DB_PATH |
No | beehive.db |
SQLite cache file path |
TRANSPORT |
No | stdio |
stdio or http |
HOST |
No | 0.0.0.0 |
HTTP bind address (http mode only) |
PORT |
No | 8000 |
HTTP port (http mode only) |
Security: keep your mnemonic in a secrets manager or
.envfile that is never committed. The server never returns or logs the mnemonic.
HTTP mode (self-hosted / shared)
To run as a persistent HTTP server instead:
TRANSPORT=http \
MNEMONIC="your twelve word seed phrase here" \
RPC_URL="https://mainnet.infura.io/v3/YOUR_KEY" \
uvx mcp-beehive
The MCP endpoint is available at http://localhost:8000/mcp.
Connect Claude to it:
{
"mcpServers": {
"beehive": {
"type": "http",
"url": "http://localhost:8000/mcp"
}
}
}
Development install
git clone https://github.com/layer-3/mcp-beehive
cd mcp-beehive
uv sync
MNEMONIC="..." uv run python main.py
Tools
Wallet management
| Tool | Parameters | Description |
|---|---|---|
list_wallets |
start=0, count=10 |
List wallet names and addresses. Max 100 per call. |
get_wallet |
wallet_name |
Address and all cached balances for one wallet. |
Balances
| Tool | Parameters | Description |
|---|---|---|
get_eth_balance |
wallet_name, rpc_url?, use_cache? |
ETH balance. Pass use_cache=true to skip an RPC call. |
refresh_eth_balances |
wallet_names[], rpc_url? |
Batch-refresh ETH balances for a list of wallets. |
get_erc20_balance |
wallet_name, token_address, rpc_url? |
ERC20 balance (fetches decimals and symbol automatically). |
Transactions
| Tool | Parameters | Description |
|---|---|---|
send_eth |
from_wallet, to_address, amount_eth, rpc_url?, fee params |
Send ETH. |
send_erc20 |
from_wallet, token_address, to_address, amount, decimals?, rpc_url?, fee params |
Send ERC20 tokens. Human-readable amount (e.g. "100.5" for 100.5 USDC). |
send_transaction |
from_wallet, to_address, data?, value_eth?, gas?, rpc_url?, fee params |
Arbitrary contract call or deployment. |
get_transaction_status |
tx_hash, rpc_url? |
Check if a transaction is pending, confirmed, or failed. Updates the local cache. |
list_transactions |
wallet_name?, limit=20 |
Recent transactions from the local SQLite cache. |
Utilities
| Tool | Parameters | Description |
|---|---|---|
get_nonce |
wallet_name, rpc_url? |
Confirmed and pending nonce for a wallet. |
estimate_gas |
from_wallet, to_address, data?, value_eth?, rpc_url? |
Gas estimate and cost in ETH. |
Gas fee parameters
send_eth, send_erc20, and send_transaction all accept optional fee overrides:
| Parameter | Description |
|---|---|
max_fee_gwei |
EIP-1559 max fee per gas (Gwei) |
priority_fee_gwei |
EIP-1559 miner tip (Gwei). Default: 1 |
gas_price_gwei |
Legacy gas price (Gwei). Use on non-EIP-1559 chains. Takes priority over EIP-1559 params. |
If no fee params are provided the server auto-detects the chain type and sets fees from the latest block.
Usage examples
Derive the first 10 wallets
list_wallets(start=0, count=10)
Check a balance
get_eth_balance("wallet-0042")
get_erc20_balance("wallet-0042", "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48") # USDC
Send ETH
send_eth(
from_wallet="wallet-0042",
to_address="0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
amount_eth="0.1"
)
Send ERC20 (USDC)
send_erc20(
from_wallet="wallet-0042",
token_address="0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
to_address="0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
amount="50"
)
Call a contract
send_transaction(
from_wallet="wallet-0000",
to_address="0xContractAddress",
data="0xa9059cbb...",
value_eth="0"
)
Check transaction status
get_transaction_status("0xabc123...")
Multi-chain usage
Pass rpc_url to any tool to target a different chain. The server detects EIP-1559 support automatically.
send_eth(
from_wallet="wallet-0000",
to_address="0x...",
amount_eth="0.01",
rpc_url="https://polygon-rpc.com"
)
SQLite cache
Beehive keeps a local beehive.db (path configurable via DB_PATH) with three tables:
wallets— derived addresses and cached ETH balanceserc20_balances— per-wallet ERC20 balances with symbol and decimalstransactions— submitted transactions and their status
The cache is write-through: balances are updated on every live fetch and transaction status is updated whenever get_transaction_status is called. Cached values are never used for signing — nonces are always fetched fresh from the chain.
Development
uv sync --group dev
uv run pytest
Tests run entirely offline. Unit tests use an in-memory SQLite database; integration tests inject a mock Web3 instance so no RPC calls are made.
Project structure
beehive/
├── config.py # env vars, ERC20 ABI
├── wallet.py # pure BIP44 derivation (no I/O)
├── db.py # SQLite CRUD (connection injected)
├── chain.py # Web3 helpers (Web3 instance injected)
├── server.py # FastMCP instance
└── tools/
├── wallets.py
├── balances.py
├── transactions.py
└── utils.py
tests/
├── conftest.py # per-test isolated SQLite
├── unit/ # wallet, db, chain — no network
└── integration/ # tool functions with mocked RPC
main.py # entry point
License
MIT
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 mcp_beehive-0.1.1.tar.gz.
File metadata
- Download URL: mcp_beehive-0.1.1.tar.gz
- Upload date:
- Size: 163.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
57c15868f1310cb44f54d3902a7dfb9098267c804e1e03b63136cdfae822ddd0
|
|
| MD5 |
c0e2e66e9369fffc393d1a90fa5be559
|
|
| BLAKE2b-256 |
bb6dde61f148d8d8ce75bf6592e0083a6b6b47abe0c7f7fd67940577ead4c063
|
File details
Details for the file mcp_beehive-0.1.1-py3-none-any.whl.
File metadata
- Download URL: mcp_beehive-0.1.1-py3-none-any.whl
- Upload date:
- Size: 22.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
570f9f945700e49fd7be575e3f1146926d6f1ab2963a9d49a70668b5d9701acd
|
|
| MD5 |
fbff2f0d10a7c46370096d7d454b442a
|
|
| BLAKE2b-256 |
deac002aebab57660bc195372f75da3f9f37d42a3540c5ed72744369f0634124
|