| title | Wallet Setup |
|---|---|
| description | Create and fund a BlockRun wallet with USDC on Base or Solana, manage keys and budgets, and run on testnet — your private key never leaves your machine. |
BlockRun accepts USDC on Base (default) or Solana for payments. Your agent needs a funded wallet to pay for services.
| Network | Chain ID | Usage | USDC |
|---|---|---|---|
| Base Mainnet | 8453 | Production (default) | Real USDC |
| Base Sepolia | 84532 | Development/Testing | Testnet USDC (free) |
| Solana Mainnet | — | Production | USDC (SPL) |
:::info{title="MCP users: pay on Solana"}
Switch to Solana with blockrun_wallet action:"chain" chain:"solana" then blockrun_wallet action:"setup" — no env vars or restart. See Claude Code MCP. Some tools (image, music, speech, video, paid stock prices, smart routing, native Anthropic) settle on Base only.
:::
- Your agent has a wallet with a private key stored locally
- When using paid services, the SDK signs a USDC payment authorization
- The signature (not your key) is sent to the server
- Payment settles on-chain, you receive the service
Your private key never leaves your machine.
BlockRun SDKs can generate a wallet automatically:
Claude Code:
blockrun setup
Python SDK:
from blockrun_llm import LLMClient
client = LLMClient() # Creates wallet at ~/.blockrun/wallet.json if none exists
print(client.get_address())TypeScript SDK:
import { LLMClient } from '@blockrun/llm';
const client = new LLMClient(); // Creates wallet if none exists
console.log(await client.getAddress());If you have an existing wallet, set the environment variable:
export BLOCKRUN_WALLET_KEY=0x...your_private_key...Or pass it directly:
client = LLMClient(private_key="0x...")Installing BlockRun MCP auto-creates a wallet at ~/.blockrun/.session on first use — the Python and TypeScript SDKs read the same file automatically, so one funded wallet serves your MCP tools and your scripts:
claude mcp add blockrun -s user -- npx -y @blockrun/mcp@latest
# ask the agent for its wallet address, then fund it with USDC on Base| Method | Best For |
|---|---|
| Coinbase | Direct withdrawal to Base |
| Base Bridge | Bridge from Ethereum mainnet |
| Uniswap | Swap ETH for USDC on Base |
| Relay | Cross-chain bridge |
| Usage | Amount |
|---|---|
| Testing | $1-5 |
| Regular usage | $5-20 |
| Heavy usage / Trading | $20-100 |
Claude Code:
blockrun balance
Python:
balance = client.get_balance()
print(f"Balance: ${balance} USDC")MCP: ask your agent — the blockrun_wallet tool reports the address and USDC balance.
On-chain:
View your wallet on Basescan by searching your address.
| Platform | Location |
|---|---|
| Claude Code / MCP | ~/.blockrun/wallet.json |
| Python SDK | ~/.blockrun/wallet.json or env var |
| TypeScript SDK | ~/.blockrun/wallet.json or env var |
- Keep your private key secret
- Use a dedicated wallet for BlockRun (not your main holdings)
- Start with small amounts
- Monitor transactions on Basescan
- Share your private key
- Commit your key to git
- Use your main wallet with large holdings
- Ignore transaction failures
:::danger Never commit your private key or paste it into a shared chat. Anyone with the key controls the wallet and its funds. :::
Your wallet is a standard Ethereum-compatible wallet. You can withdraw anytime using:
- Any Web3 wallet (MetaMask, Rainbow, etc.)
- Import your private key and send to your desired address
For development and testing, use Base Sepolia testnet with free testnet USDC:
::::steps
:::step{title="Get testnet ETH"} Get free testnet ETH for gas from Alchemy Base Sepolia Faucet. :::
:::step{title="Get testnet USDC"} Get free testnet USDC from Circle USDC Faucet. :::
:::step{title="Configure the SDK for testnet"} Python:
from blockrun_llm import testnet_client
client = testnet_client() # Uses BLOCKRUN_WALLET_KEY
response = client.chat("openai/gpt-oss-20b", "Hello!")TypeScript:
import { testnetClient } from '@blockrun/llm';
const client = testnetClient({ privateKey: '0x...' });
const response = await client.chat('openai/gpt-oss-20b', 'Hello!');:::
::::
https://testnet.blockrun.ai/api
openai/gpt-oss-20b- $0.003/requestopenai/gpt-oss-120b- $0.004/request
Check your USDC balance on Base network. ETH for gas is handled by the x402 facilitator — you only need USDC.
- Verify you have enough USDC for the request
- Check if the network is congested on Basescan
- Try again in a few seconds
# Check if wallet file exists
ls ~/.blockrun/
# Create new wallet
blockrun setup::::cards
:::card{title="Claude Code guide" href="claude-code.md" icon="Terminal"} Install the MCP and use your funded wallet from Claude Code. :::
:::card{title="SDK developers" href="sdk-developers.md" icon="Code"} Wire the wallet into Python, TypeScript, or Go integrations. :::
:::card{title="Agent developers" href="agent-developers.md" icon="Boxes"} Give agents a wallet that pays for their own intelligence. :::
::::