This guide explains how to run the Clober MCP server locally using Bun and Claude Desktop.
- Bun installed
- Claude Desktop installed
- A wallet private key, or an injected viem wallet client
bun installbun index.tsOpen:
Claude Desktop → Settings → Developer → MCP Servers
Add this:
{
"clober": {
"command": "/path/to/bun",
"args": ["/absolute/path/to/index.ts"],
"env": {
"PRIVATE_KEY": "0xYOUR_PRIVATE_KEY",
"RPC_URL": "YOUR_RPC_URL(OPTIONAL)"
}
}
}
Restart Claude Desktop after saving.
The PRIVATE_KEY env path is still supported for local EVM wallets. For
managed wallets where the key must stay in an OS keychain, TEE, or external
signer, inject a viem-compatible wallet client before using the tools:
import { setWalletClient } from './utils/wallet.ts'
setWalletClient(moonpayWalletClient)For chain-specific signers, inject a factory:
import { setWalletClientFactory } from './utils/wallet.ts'
setWalletClientFactory((chainId) => moonpayWalletClientFor(chainId))When a wallet client or factory is injected, PRIVATE_KEY is not required.
The injected client must expose the viem wallet client methods used by the
tools, including account.address, chain, transport.url, sendTransaction,
and writeContract.