@blockrun/mcp 0.4.2 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +220 -290
- package/dist/chunk-NHJMKXNS.js +961 -0
- package/dist/http-server.d.ts +20 -0
- package/dist/http-server.js +59 -0
- package/dist/index.js +19 -1135
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,366 +1,296 @@
|
|
|
1
|
-
# @blockrun/mcp
|
|
1
|
+
# @blockrun/mcp
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**The payment layer for AI agents.**
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
[](https://www.npmjs.com/package/@blockrun/mcp)
|
|
6
|
+
[](https://opensource.org/licenses/MIT)
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
BlockRun MCP is a Model Context Protocol server that gives any AI agent (Claude, GPT, Cursor, etc.) access to 41 LLM models, real-time web search, prediction markets, crypto DEX data, whale tracking, image generation, and token swaps — all paid via x402 micropayments in USDC on Base. No API keys. No subscriptions. No accounts.
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
2. Manage 5+ API keys and billing systems
|
|
11
|
-
3. Pay $20-100/month minimums per provider
|
|
12
|
-
4. Configure each provider separately
|
|
10
|
+
---
|
|
13
11
|
|
|
14
|
-
|
|
12
|
+
## Why blockrun-mcp
|
|
15
13
|
|
|
16
|
-
|
|
14
|
+
Claude Code has task systems, token budgets, and multi-agent coordination. What it does not have: per-agent wallets, spending enforcement across sessions, or a way for a parent agent to delegate a budget to a child agent and block it when that budget is exhausted.
|
|
17
15
|
|
|
18
|
-
BlockRun
|
|
16
|
+
BlockRun fills this gap. Every tool call is a real micropayment — authorized locally by a wallet the agent controls. Parent agents can delegate spending limits to child agents by `agent_id`. Usage is auditable on-chain at any time.
|
|
19
17
|
|
|
20
|
-
|
|
21
|
-
- **One wallet** - Single USDC balance for all providers
|
|
22
|
-
- **Pay-per-use** - No minimums, $5 gets you started
|
|
23
|
-
- **One command** - Install and go
|
|
18
|
+
This makes BlockRun the financial infrastructure layer for multi-agent systems, not just a model proxy.
|
|
24
19
|
|
|
25
|
-
|
|
26
|
-
claude mcp add blockrun npx @blockrun/mcp
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
> **Alternative:** Prefer Python? Try the [BlockRun Skill](https://github.com/BlockRunAI/claude-code-blockrun-agent) (`pip install blockrun-llm`) - same features, different integration style.
|
|
20
|
+
---
|
|
30
21
|
|
|
31
22
|
## Quick Start
|
|
32
23
|
|
|
33
|
-
### 1
|
|
24
|
+
### Option 1: Hosted (zero install)
|
|
34
25
|
|
|
35
26
|
```bash
|
|
36
|
-
claude mcp add blockrun
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
A wallet is automatically created for you.
|
|
40
|
-
|
|
41
|
-
### 2. Get Your Wallet Address
|
|
42
|
-
|
|
43
|
-
```
|
|
44
|
-
You: blockrun setup
|
|
45
|
-
|
|
46
|
-
Claude: Your wallet address is 0x...
|
|
47
|
-
Send USDC on Base network to fund it.
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
### 3. Fund Your Wallet
|
|
51
|
-
|
|
52
|
-
Send USDC to your wallet address on **Base** network. Even $5 gets you hundreds of requests.
|
|
53
|
-
|
|
54
|
-
| Method | Steps |
|
|
55
|
-
|--------|-------|
|
|
56
|
-
| **From Coinbase** | Send → USDC → Select "Base" network → Paste your address |
|
|
57
|
-
| **Bridge** | [bridge.base.org](https://bridge.base.org) → Bridge USDC to Base |
|
|
58
|
-
| **Buy Direct** | [Coinbase Onramp](https://www.coinbase.com/onramp) → Buy USDC on Base |
|
|
59
|
-
|
|
60
|
-
### 4. Start Using
|
|
61
|
-
|
|
62
|
-
Just ask naturally:
|
|
63
|
-
|
|
64
|
-
```
|
|
65
|
-
You: blockrun ask GPT-5 to explain quantum computing
|
|
66
|
-
|
|
67
|
-
You: blockrun chat with Claude Opus about this error
|
|
68
|
-
|
|
69
|
-
You: blockrun generate an image of a mountain sunset
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
## Usage Examples
|
|
73
|
-
|
|
74
|
-
### Chat with Any Model
|
|
75
|
-
|
|
27
|
+
claude mcp add blockrun --transport http https://mcp.blockrun.ai/mcp
|
|
76
28
|
```
|
|
77
|
-
blockrun ask GPT-5 what causes aurora borealis
|
|
78
29
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
blockrun ask Gemini Pro to review this code for security issues
|
|
82
|
-
```
|
|
30
|
+
No Node.js. No npm. Works from any agent, CI/CD pipeline, or cloud environment. Pass your wallet key per-request via `X-Wallet-Key` header.
|
|
83
31
|
|
|
84
|
-
|
|
85
|
-
- `openai/gpt-5.2` - Most capable OpenAI model
|
|
86
|
-
- `anthropic/claude-opus-4` - Best for complex reasoning
|
|
87
|
-
- `anthropic/claude-sonnet-4` - Fast & capable (recommended)
|
|
88
|
-
- `google/gemini-2.5-pro` - Great for long context (1M tokens)
|
|
89
|
-
- `deepseek/deepseek-chat` - Very affordable
|
|
90
|
-
|
|
91
|
-
### Smart Model Selection
|
|
92
|
-
|
|
93
|
-
Let BlockRun pick the best model for your needs:
|
|
32
|
+
### Option 2: Local (self-hosted, private key never leaves your machine)
|
|
94
33
|
|
|
34
|
+
```bash
|
|
35
|
+
claude mcp add blockrun npx @blockrun/mcp
|
|
95
36
|
```
|
|
96
|
-
blockrun smart fast: what's 2+2
|
|
97
|
-
|
|
98
|
-
blockrun smart powerful: analyze this complex codebase
|
|
99
37
|
|
|
100
|
-
|
|
38
|
+
```bash
|
|
39
|
+
# Optional: bring your own wallet
|
|
40
|
+
claude mcp add blockrun npx @blockrun/mcp --env BLOCKRUN_WALLET_KEY=0x...
|
|
101
41
|
```
|
|
102
42
|
|
|
103
|
-
|
|
104
|
-
|------|-------------|----------|
|
|
105
|
-
| `fast` | Gemini Flash, GPT-4o-mini | Quick responses |
|
|
106
|
-
| `balanced` | GPT-4o, Claude Sonnet | Daily tasks |
|
|
107
|
-
| `powerful` | GPT-5.2, Claude Opus, o3 | Complex work |
|
|
108
|
-
| `cheap` | Gemini Flash, DeepSeek | Budget-conscious |
|
|
109
|
-
| `reasoning` | o3, o1, DeepSeek Reasoner | Logic & math |
|
|
43
|
+
A wallet is automatically created on first use. Fund it with USDC on Base network and every tool is immediately available.
|
|
110
44
|
|
|
111
|
-
|
|
45
|
+
---
|
|
112
46
|
|
|
113
|
-
|
|
114
|
-
blockrun generate an image of a cyberpunk cityscape
|
|
47
|
+
## What Your Agent Gets
|
|
115
48
|
|
|
116
|
-
|
|
117
|
-
|
|
49
|
+
| Tool | What it does | Cost |
|
|
50
|
+
|------|-------------|------|
|
|
51
|
+
| `blockrun_chat` | 41 AI models (GPT-5, Claude, Gemini, NVIDIA free) | per token |
|
|
52
|
+
| `blockrun_wallet` | Wallet management + multi-agent budget orchestration | free |
|
|
53
|
+
| `blockrun_search` | Web + news search with AI-summarized results | ~$0.01/search |
|
|
54
|
+
| `blockrun_exa` | Neural web search (Exa) — understands meaning, not just keywords | $0.01/call |
|
|
55
|
+
| `blockrun_twitter` | Real-time X/Twitter search via Grok | per token |
|
|
56
|
+
| `blockrun_markets` | Prediction markets — Polymarket, Kalshi, dFlow, Binance Futures | $0.001/call |
|
|
57
|
+
| `blockrun_image` | Image generation and editing (DALL-E 3, Flux) | $0.02–0.08 |
|
|
58
|
+
| `blockrun_dex` | Real-time DEX prices and liquidity via DexScreener | FREE |
|
|
59
|
+
| `blockrun_whale` | On-chain whale tracking — large ETH transfers via Etherscan | FREE |
|
|
60
|
+
| `blockrun_analyze` | Token technical analysis combining multiple data sources with AI | per token |
|
|
61
|
+
| `blockrun_signal` | Trading signals — RSI + MACD + EMA strategy | FREE |
|
|
62
|
+
| `blockrun_swap` | Token swap quotes on Base via 0x aggregator | FREE |
|
|
63
|
+
| `blockrun_models` | List all 41 models with pricing and context windows | FREE |
|
|
118
64
|
|
|
119
|
-
|
|
65
|
+
---
|
|
120
66
|
|
|
121
|
-
|
|
122
|
-
blockrun list models
|
|
123
|
-
|
|
124
|
-
blockrun show OpenAI models with pricing
|
|
125
|
-
```
|
|
67
|
+
## Multi-Agent Budget Orchestration
|
|
126
68
|
|
|
127
|
-
|
|
69
|
+
A parent agent can allocate spending limits to child agents. Child agents self-identify via `agent_id`. When a child agent hits its limit, further calls are automatically blocked without any coordination logic needed in your code.
|
|
128
70
|
|
|
129
|
-
|
|
71
|
+
```typescript
|
|
72
|
+
// Parent agent allocates budgets to child agents
|
|
73
|
+
mcp.call("blockrun_wallet", { action: "delegate", agent_id: "researcher", agent_limit: 2.00 })
|
|
74
|
+
mcp.call("blockrun_wallet", { action: "delegate", agent_id: "writer", agent_limit: 0.50 })
|
|
130
75
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
blockrun twitter: trending AI news
|
|
76
|
+
// Child agents self-identify — auto-blocked at limit
|
|
77
|
+
mcp.call("blockrun_chat", { message: "...", routing: "smart", agent_id: "researcher" })
|
|
135
78
|
|
|
136
|
-
|
|
79
|
+
// Audit spending across all agents
|
|
80
|
+
mcp.call("blockrun_wallet", { action: "report" })
|
|
81
|
+
// researcher: $1.84/$2.00 (23 calls), writer: $0.31/$0.50 (4 calls)
|
|
137
82
|
```
|
|
138
83
|
|
|
139
|
-
|
|
84
|
+
This pattern works across sessions. The spending record is tied to the wallet, not the process.
|
|
140
85
|
|
|
141
|
-
|
|
142
|
-
blockrun setup # First-time setup instructions
|
|
143
|
-
blockrun wallet # Check your wallet address
|
|
144
|
-
blockrun balance # Check on-chain USDC balance
|
|
145
|
-
```
|
|
86
|
+
---
|
|
146
87
|
|
|
147
|
-
|
|
88
|
+
## Smart Routing (ClawRouter)
|
|
148
89
|
|
|
149
|
-
|
|
90
|
+
Agents do not need to pick models. Pass `routing: "smart"` and ClawRouter selects the optimal model for the task based on the routing profile.
|
|
150
91
|
|
|
92
|
+
```typescript
|
|
93
|
+
// Auto-selects optimal model — agents never need to pick
|
|
94
|
+
blockrun_chat({ message: "...", routing: "smart", routing_profile: "eco" })
|
|
95
|
+
// Returns: [nvidia/deepseek-v3.2 | SIMPLE | $0.0001 | 94% savings]
|
|
151
96
|
```
|
|
152
|
-
blockrun budget check # View current spending
|
|
153
|
-
blockrun budget set $1.00 # Set $1.00 limit
|
|
154
|
-
blockrun budget clear # Remove limit
|
|
155
|
-
```
|
|
156
|
-
|
|
157
|
-
## Supported Models & Pricing
|
|
158
|
-
|
|
159
|
-
### Chat Models
|
|
160
|
-
|
|
161
|
-
| Provider | Models | Input Price | Output Price |
|
|
162
|
-
|----------|--------|-------------|--------------|
|
|
163
|
-
| **OpenAI** | GPT-5.2, GPT-5-mini, GPT-4o, o3, o1 | $0.15 - $21/M | $0.60 - $84/M |
|
|
164
|
-
| **Anthropic** | Claude Opus 4, Sonnet 4, Haiku | $0.25 - $15/M | $1.25 - $75/M |
|
|
165
|
-
| **Google** | Gemini 3 Pro, 2.5 Pro/Flash | Free - $2.50/M | Free - $15/M |
|
|
166
|
-
| **DeepSeek** | V3.2, Reasoner | $0.14 - $0.55/M | $0.28 - $2.19/M |
|
|
167
|
-
| **xAI** | Grok 3, Grok 3 Mini | $3 - $5/M | $15 - $25/M |
|
|
168
|
-
|
|
169
|
-
*M = million tokens. Prices in USD.*
|
|
170
97
|
|
|
171
|
-
|
|
98
|
+
| Profile | Description |
|
|
99
|
+
|---------|-------------|
|
|
100
|
+
| `free` | Zero cost — NVIDIA-hosted models only |
|
|
101
|
+
| `eco` | Budget-optimized — best quality per dollar |
|
|
102
|
+
| `auto` | Balanced — default |
|
|
103
|
+
| `premium` | Highest quality available |
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
## All 41 Models
|
|
108
|
+
|
|
109
|
+
### OpenAI (13 models)
|
|
110
|
+
|
|
111
|
+
| Model ID | Context | Input ($/M) | Output ($/M) |
|
|
112
|
+
|----------|---------|-------------|--------------|
|
|
113
|
+
| `openai/gpt-5.2` | 128k | $21.00 | $84.00 |
|
|
114
|
+
| `openai/gpt-5` | 128k | $15.00 | $60.00 |
|
|
115
|
+
| `openai/gpt-5-mini` | 128k | $0.40 | $1.60 |
|
|
116
|
+
| `openai/gpt-4o` | 128k | $2.50 | $10.00 |
|
|
117
|
+
| `openai/gpt-4o-mini` | 128k | $0.15 | $0.60 |
|
|
118
|
+
| `openai/o3` | 200k | $10.00 | $40.00 |
|
|
119
|
+
| `openai/o3-mini` | 200k | $1.10 | $4.40 |
|
|
120
|
+
| `openai/o4-mini` | 200k | $1.10 | $4.40 |
|
|
121
|
+
| `openai/o1` | 200k | $15.00 | $60.00 |
|
|
122
|
+
| `openai/o1-mini` | 128k | $1.10 | $4.40 |
|
|
123
|
+
| `openai/o1-pro` | 200k | $150.00 | $600.00 |
|
|
124
|
+
| `openai/gpt-4.1` | 128k | $2.00 | $8.00 |
|
|
125
|
+
| `openai/gpt-4.1-mini` | 128k | $0.40 | $1.60 |
|
|
126
|
+
|
|
127
|
+
### Anthropic (4 models)
|
|
128
|
+
|
|
129
|
+
| Model ID | Context | Input ($/M) | Output ($/M) |
|
|
130
|
+
|----------|---------|-------------|--------------|
|
|
131
|
+
| `anthropic/claude-opus-4` | 200k | $15.00 | $75.00 |
|
|
132
|
+
| `anthropic/claude-sonnet-4` | 200k | $3.00 | $15.00 |
|
|
133
|
+
| `anthropic/claude-sonnet-3-7` | 200k | $3.00 | $15.00 |
|
|
134
|
+
| `anthropic/claude-haiku-3-5` | 200k | $0.25 | $1.25 |
|
|
135
|
+
|
|
136
|
+
### Google (7 models)
|
|
137
|
+
|
|
138
|
+
| Model ID | Context | Input ($/M) | Output ($/M) |
|
|
139
|
+
|----------|---------|-------------|--------------|
|
|
140
|
+
| `google/gemini-3-pro` | 1M | $2.50 | $15.00 |
|
|
141
|
+
| `google/gemini-2.5-pro` | 1M | $1.25 | $10.00 |
|
|
142
|
+
| `google/gemini-2.5-flash` | 1M | $0.15 | $0.60 |
|
|
143
|
+
| `google/gemini-2.0-flash` | 1M | $0.10 | $0.40 |
|
|
144
|
+
| `google/gemini-2.0-flash-lite` | 1M | $0.075 | $0.30 |
|
|
145
|
+
| `google/gemini-1.5-pro` | 2M | $1.25 | $5.00 |
|
|
146
|
+
| `google/gemini-1.5-flash` | 1M | $0.075 | $0.30 |
|
|
147
|
+
|
|
148
|
+
### DeepSeek (2 models)
|
|
149
|
+
|
|
150
|
+
| Model ID | Context | Input ($/M) | Output ($/M) |
|
|
151
|
+
|----------|---------|-------------|--------------|
|
|
152
|
+
| `deepseek/deepseek-chat` | 64k | $0.14 | $0.28 |
|
|
153
|
+
| `deepseek/deepseek-reasoner` | 64k | $0.55 | $2.19 |
|
|
154
|
+
|
|
155
|
+
### NVIDIA (12 models — FREE)
|
|
156
|
+
|
|
157
|
+
All NVIDIA-hosted models are free via the `routing_profile: "free"` option or by specifying directly.
|
|
158
|
+
|
|
159
|
+
| Model ID |
|
|
160
|
+
|----------|
|
|
161
|
+
| `nvidia/deepseek-v3.2` |
|
|
162
|
+
| `nvidia/llama-3.3-70b` |
|
|
163
|
+
| `nvidia/llama-3.1-405b` |
|
|
164
|
+
| `nvidia/mistral-nemo-12b` |
|
|
165
|
+
| `nvidia/phi-4-mini` |
|
|
166
|
+
| `nvidia/qwen2.5-72b` |
|
|
167
|
+
| `nvidia/nemotron-70b` |
|
|
168
|
+
| `nvidia/nemotron-253b` |
|
|
169
|
+
| `nvidia/llama-3.1-nemotron-nano-8b` |
|
|
170
|
+
| `nvidia/llama-3.1-nemotron-ultra-253b` |
|
|
171
|
+
| `nvidia/mistral-small-3.1` |
|
|
172
|
+
| `nvidia/qwen3-235b` |
|
|
173
|
+
|
|
174
|
+
### ZAI (2 models)
|
|
175
|
+
|
|
176
|
+
| Model ID | Context | Input ($/M) | Output ($/M) |
|
|
177
|
+
|----------|---------|-------------|--------------|
|
|
178
|
+
| `zai/grok-3` | 131k | $5.00 | $25.00 |
|
|
179
|
+
| `zai/grok-3-mini` | 131k | $3.00 | $15.00 |
|
|
180
|
+
|
|
181
|
+
### MiniMax (1 model)
|
|
182
|
+
|
|
183
|
+
| Model ID | Context | Input ($/M) | Output ($/M) |
|
|
184
|
+
|----------|---------|-------------|--------------|
|
|
185
|
+
| `minimax/minimax-m1` | 1M | $0.80 | $2.40 |
|
|
186
|
+
|
|
187
|
+
---
|
|
188
|
+
|
|
189
|
+
## How Payments Work
|
|
190
|
+
|
|
191
|
+
Every request is paid via the x402 protocol — an open payment standard for machine-to-machine micropayments. Payments settle in USDC on Base network. Your wallet is created automatically on first use and stored locally at `~/.blockrun/.session`. The private key is used only to sign payment authorizations locally — it is never transmitted to any server. You can verify all transactions on [Basescan](https://basescan.org).
|
|
192
|
+
|
|
193
|
+
---
|
|
194
|
+
|
|
195
|
+
## Funding Your Wallet
|
|
172
196
|
|
|
173
|
-
| Model | Price per Image |
|
|
174
|
-
|-------|-----------------|
|
|
175
|
-
| DALL-E 3 (Standard) | $0.04 |
|
|
176
|
-
| DALL-E 3 (HD) | $0.08 |
|
|
177
|
-
| Flux Schnell | $0.02 |
|
|
178
|
-
|
|
179
|
-
### Cost Examples
|
|
180
|
-
|
|
181
|
-
| Task | Model | Approx. Cost |
|
|
182
|
-
|------|-------|--------------|
|
|
183
|
-
| Quick question | Gemini Flash | $0.0001 |
|
|
184
|
-
| Code review | Claude Sonnet | $0.003 |
|
|
185
|
-
| Complex analysis | GPT-4o | $0.005 |
|
|
186
|
-
| Long document | Claude Opus | $0.02 |
|
|
187
|
-
| Image generation | DALL-E 3 | $0.04 |
|
|
188
|
-
|
|
189
|
-
**$5 gets you approximately:**
|
|
190
|
-
- 50,000 Gemini Flash requests, OR
|
|
191
|
-
- 1,600 Claude Sonnet requests, OR
|
|
192
|
-
- 1,000 GPT-4o requests, OR
|
|
193
|
-
- 125 DALL-E 3 images
|
|
194
|
-
|
|
195
|
-
## Wallet Management
|
|
196
|
-
|
|
197
|
-
### Auto-Generated Wallet
|
|
198
|
-
|
|
199
|
-
When you first use BlockRun MCP, a wallet is automatically created and saved to:
|
|
200
197
|
```
|
|
201
|
-
|
|
198
|
+
# Get your wallet address
|
|
199
|
+
blockrun_wallet({ action: "balance" })
|
|
200
|
+
# Returns: 0x... (QR code available for mobile wallets)
|
|
202
201
|
```
|
|
203
202
|
|
|
204
|
-
|
|
205
|
-
- Created locally on your machine
|
|
206
|
-
- Never transmitted to any server
|
|
207
|
-
- Used only for signing payment authorizations
|
|
208
|
-
- Persistent across sessions
|
|
209
|
-
|
|
210
|
-
### Using Your Own Wallet
|
|
211
|
-
|
|
212
|
-
If you prefer to use an existing wallet:
|
|
213
|
-
|
|
214
|
-
```bash
|
|
215
|
-
# Option 1: Environment variable
|
|
216
|
-
export BLOCKRUN_WALLET_KEY=0x...
|
|
217
|
-
|
|
218
|
-
# Option 2: Add with Claude Code
|
|
219
|
-
claude mcp add blockrun npx @blockrun/mcp --env BLOCKRUN_WALLET_KEY=0x...
|
|
220
|
-
```
|
|
203
|
+
Send USDC on Base network to that address. $5 gets you started — approximately 50,000 Gemini Flash requests or 125 DALL-E 3 images. There is no minimum. You pay only for what you use.
|
|
221
204
|
|
|
222
|
-
|
|
205
|
+
| Method | Steps |
|
|
206
|
+
|--------|-------|
|
|
207
|
+
| Coinbase | Send → USDC → Select "Base" network → Paste address |
|
|
208
|
+
| Bridge | [bridge.base.org](https://bridge.base.org) → Bridge USDC to Base |
|
|
209
|
+
| Buy direct | [Coinbase Onramp](https://www.coinbase.com/onramp) → Buy USDC on Base |
|
|
223
210
|
|
|
224
|
-
|
|
225
|
-
2. Environment variable `BASE_CHAIN_WALLET_KEY`
|
|
226
|
-
3. File at `~/.blockrun/.session`
|
|
227
|
-
4. Auto-generate new wallet (saved to file)
|
|
211
|
+
---
|
|
228
212
|
|
|
229
|
-
##
|
|
213
|
+
## Architecture
|
|
230
214
|
|
|
231
215
|
```
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
216
|
+
Claude Code / Any MCP Client
|
|
217
|
+
|
|
|
218
|
+
| stdio (local) or HTTP (remote, coming soon)
|
|
219
|
+
|
|
|
220
|
+
blockrun-mcp server
|
|
221
|
+
|
|
|
222
|
+
| x402 micropayments (USDC on Base)
|
|
223
|
+
|
|
|
224
|
+
blockrun.ai gateway
|
|
225
|
+
|
|
|
226
|
+
+-- OpenAI
|
|
227
|
+
+-- Anthropic
|
|
228
|
+
+-- Google
|
|
229
|
+
+-- NVIDIA
|
|
230
|
+
+-- DeepSeek
|
|
231
|
+
+-- ZAI / MiniMax
|
|
232
|
+
+-- DexScreener / Etherscan / Polymarket / Kalshi / Exa / 0x
|
|
244
233
|
```
|
|
245
234
|
|
|
246
|
-
|
|
247
|
-
- Private key is used ONLY for local signing
|
|
248
|
-
- Key is NEVER transmitted to any server
|
|
249
|
-
- Same security model as MetaMask transactions
|
|
250
|
-
- You can verify all transactions on [Basescan](https://basescan.org)
|
|
251
|
-
|
|
252
|
-
## Comparison with Alternatives
|
|
253
|
-
|
|
254
|
-
### vs claude-code-proxy
|
|
255
|
-
| | claude-code-proxy | BlockRun MCP |
|
|
256
|
-
|---|---|---|
|
|
257
|
-
| API Keys | Required (bring your own) | **Not needed** |
|
|
258
|
-
| Setup | Configure each provider | **One command** |
|
|
259
|
-
| Billing | Multiple subscriptions | **Unified wallet** |
|
|
260
|
-
|
|
261
|
-
### vs gemini-mcp
|
|
262
|
-
| | gemini-mcp | BlockRun MCP |
|
|
263
|
-
|---|---|---|
|
|
264
|
-
| Models | Gemini only | **30+ models, 6 providers** |
|
|
265
|
-
| API Key | Required | **Not needed** |
|
|
266
|
-
| Payment | Google billing | **Pay-per-use crypto** |
|
|
267
|
-
|
|
268
|
-
### vs Direct API Keys
|
|
269
|
-
| | Direct APIs | BlockRun MCP |
|
|
270
|
-
|---|---|---|
|
|
271
|
-
| Accounts | 5+ accounts needed | **One wallet** |
|
|
272
|
-
| Minimums | $20-100/mo per provider | **$0 minimum** |
|
|
273
|
-
| Management | Complex | **Simple** |
|
|
235
|
+
The MCP server runs locally (stdio transport). Each tool call that requires payment triggers a local wallet signature. The signed payment authorization is sent to the blockrun.ai gateway alongside the API request. No API keys pass through your machine.
|
|
274
236
|
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
### "Payment was rejected"
|
|
278
|
-
Your wallet needs funding. Say `blockrun setup` to get your address and funding instructions.
|
|
279
|
-
|
|
280
|
-
### "Wallet key required"
|
|
281
|
-
The MCP couldn't find or create a wallet. Check that `~/.blockrun/` directory is writable.
|
|
282
|
-
|
|
283
|
-
### Model not responding
|
|
284
|
-
Some models have rate limits. Try `blockrun smart cheap` or `blockrun smart fast` to use alternative models.
|
|
285
|
-
|
|
286
|
-
### Check wallet balance
|
|
287
|
-
Say `blockrun balance` to check your on-chain USDC balance, or visit: `https://basescan.org/address/YOUR_ADDRESS`
|
|
288
|
-
|
|
289
|
-
### Budget limit reached
|
|
290
|
-
If you've set a session budget and hit the limit, use `blockrun budget clear` to remove it or `blockrun budget set $X` to increase it.
|
|
237
|
+
---
|
|
291
238
|
|
|
292
239
|
## Configuration
|
|
293
240
|
|
|
294
|
-
### Claude Code Setup
|
|
295
|
-
|
|
296
|
-
```bash
|
|
297
|
-
# Basic (recommended)
|
|
298
|
-
claude mcp add blockrun npx @blockrun/mcp
|
|
299
|
-
|
|
300
|
-
# With explicit wallet
|
|
301
|
-
claude mcp add blockrun npx @blockrun/mcp --env BLOCKRUN_WALLET_KEY=0x...
|
|
302
|
-
|
|
303
|
-
# Project-specific
|
|
304
|
-
claude mcp add blockrun --scope project npx @blockrun/mcp
|
|
305
|
-
|
|
306
|
-
# User-wide (all projects)
|
|
307
|
-
claude mcp add blockrun --scope user npx @blockrun/mcp
|
|
308
|
-
```
|
|
309
|
-
|
|
310
|
-
### Environment Variables
|
|
311
|
-
|
|
312
241
|
| Variable | Description |
|
|
313
242
|
|----------|-------------|
|
|
314
|
-
| `BLOCKRUN_WALLET_KEY` |
|
|
315
|
-
|
|
243
|
+
| `BLOCKRUN_WALLET_KEY` | Bring your own private key (hex string, starts with 0x). Optional — a wallet is auto-generated if not set. |
|
|
244
|
+
|
|
245
|
+
Wallet resolution order:
|
|
246
|
+
1. `BLOCKRUN_WALLET_KEY` environment variable
|
|
247
|
+
2. `BASE_CHAIN_WALLET_KEY` environment variable
|
|
248
|
+
3. `~/.blockrun/.session` (auto-created on first use)
|
|
249
|
+
|
|
250
|
+
---
|
|
316
251
|
|
|
317
252
|
## Development
|
|
318
253
|
|
|
319
254
|
```bash
|
|
320
|
-
|
|
321
|
-
git clone https://github.com/blockrunai/blockrun-mcp
|
|
255
|
+
git clone https://github.com/BlockRunAI/blockrun-mcp
|
|
322
256
|
cd blockrun-mcp
|
|
323
|
-
|
|
324
|
-
# Install dependencies
|
|
325
257
|
npm install
|
|
326
|
-
|
|
327
|
-
# Development mode (auto-reload)
|
|
328
|
-
npm run dev
|
|
329
|
-
|
|
330
|
-
# Build for production
|
|
331
258
|
npm run build
|
|
332
|
-
|
|
333
|
-
# Test locally
|
|
334
|
-
echo '{"jsonrpc":"2.0","method":"tools/list","id":1}' | node dist/index.js
|
|
259
|
+
npm run dev # tsx watch — auto-reloads on changes
|
|
335
260
|
```
|
|
336
261
|
|
|
337
|
-
|
|
262
|
+
To test the server manually:
|
|
338
263
|
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
- **GitHub:** [github.com/blockrunai](https://github.com/blockrunai)
|
|
343
|
-
- **Twitter:** [@BlockRunAI](https://x.com/BlockRunAI)
|
|
264
|
+
```bash
|
|
265
|
+
echo '{"jsonrpc":"2.0","method":"tools/list","id":1}' | node dist/index.js
|
|
266
|
+
```
|
|
344
267
|
|
|
345
|
-
|
|
268
|
+
---
|
|
346
269
|
|
|
347
|
-
|
|
348
|
-
- **Telegram:** [Join our Telegram](https://t.me/+mroQv4-4hGgzOGUx)
|
|
349
|
-
- **Email:** hello@blockrun.ai
|
|
270
|
+
## Roadmap
|
|
350
271
|
|
|
351
|
-
|
|
272
|
+
- [x] 14 tools covering LLMs, search, crypto, markets, image generation
|
|
273
|
+
- [x] Multi-agent budget delegation via `agent_id`
|
|
274
|
+
- [x] ClawRouter intelligent model routing
|
|
275
|
+
- [x] Multi-turn conversation support
|
|
276
|
+
- [ ] HTTP/SSE transport (deploy to mcp.blockrun.ai — no local install needed)
|
|
277
|
+
- [ ] Per-tool LLM-optimized descriptions
|
|
278
|
+
- [ ] Official MCP registry listing
|
|
279
|
+
- [ ] Persistent cross-session spending records tied to wallet
|
|
352
280
|
|
|
353
|
-
|
|
354
|
-
BlockRun MCP is a Model Context Protocol (MCP) server that gives Claude Code users access to 30+ AI models from OpenAI, Google, xAI, DeepSeek, and more. It uses USDC micropayments via the x402 protocol — no API keys or subscriptions needed.
|
|
281
|
+
---
|
|
355
282
|
|
|
356
|
-
|
|
357
|
-
One command: `claude mcp add blockrun npx @blockrun/mcp`. A wallet is automatically created for you. Fund it with USDC on Base network and start using any model.
|
|
283
|
+
## Links
|
|
358
284
|
|
|
359
|
-
|
|
360
|
-
|
|
285
|
+
- **Website:** [blockrun.ai](https://blockrun.ai)
|
|
286
|
+
- **npm:** [@blockrun/mcp](https://www.npmjs.com/package/@blockrun/mcp)
|
|
287
|
+
- **GitHub:** [github.com/blockrunai/blockrun-mcp](https://github.com/blockrunai/blockrun-mcp)
|
|
288
|
+
- **Issues:** [github.com/blockrunai/blockrun-mcp/issues](https://github.com/blockrunai/blockrun-mcp/issues)
|
|
289
|
+
- **Pricing:** [blockrun.ai/pricing](https://blockrun.ai/pricing)
|
|
290
|
+
- **Telegram:** [t.me/+mroQv4-4hGgzOGUx](https://t.me/+mroQv4-4hGgzOGUx)
|
|
291
|
+
- **X:** [@BlockRunAI](https://x.com/BlockRunAI)
|
|
361
292
|
|
|
362
|
-
|
|
363
|
-
With direct APIs, you need 5+ accounts, 5+ API keys, and 5+ billing systems. BlockRun MCP gives you one wallet for all providers, one command to install, and zero API key management.
|
|
293
|
+
---
|
|
364
294
|
|
|
365
295
|
## License
|
|
366
296
|
|