@blockrun/mcp 0.6.4 → 0.6.5
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/LICENSE +21 -0
- package/README.md +97 -28
- package/dist/index.js +6 -19
- package/package.json +1 -2
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 BlockRun AI
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,58 +1,127 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
**Live data for AI agents — search, research, markets, crypto, X/Twitter.**
|
|
1
|
+
# BlockRun MCP
|
|
4
2
|
|
|
5
3
|
[](https://www.npmjs.com/package/@blockrun/mcp)
|
|
4
|
+
[](LICENSE)
|
|
5
|
+
[](https://modelcontextprotocol.io)
|
|
6
|
+
|
|
7
|
+
**Real-time data for Claude — markets, research, X/Twitter, crypto. No API keys. Pay per call.**
|
|
6
8
|
|
|
7
9
|
```bash
|
|
8
10
|
claude mcp add blockrun npx @blockrun/mcp
|
|
9
11
|
```
|
|
10
12
|
|
|
11
|
-
Wallet auto-created. Fund with USDC
|
|
13
|
+
Wallet auto-created. Fund with $5 USDC. Ask Claude anything.
|
|
12
14
|
|
|
13
15
|
---
|
|
14
16
|
|
|
15
|
-
##
|
|
17
|
+
## What changes
|
|
16
18
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
| `blockrun_chat` | Second opinion from GPT, Gemini, DeepSeek, etc. | per token |
|
|
26
|
-
| `blockrun_wallet` | Balance, budgets, spending | free |
|
|
27
|
-
| `blockrun_models` | List models + pricing | free |
|
|
19
|
+
Before BlockRun, Claude can't answer:
|
|
20
|
+
|
|
21
|
+
- *"What's the current Polymarket probability that Bitcoin hits $100k this year?"*
|
|
22
|
+
- *"Find me the top 5 papers on RAG published in the last 30 days"*
|
|
23
|
+
- *"What are people saying about @sama on X right now?"*
|
|
24
|
+
- *"What's the 24h volume on the PEPE/ETH pair on Uniswap?"*
|
|
25
|
+
|
|
26
|
+
After BlockRun, it can. Each query costs fractions of a cent, billed from a local USDC wallet. No subscriptions. No API dashboards. No key rotation.
|
|
28
27
|
|
|
29
28
|
---
|
|
30
29
|
|
|
31
|
-
##
|
|
30
|
+
## Demo
|
|
32
31
|
|
|
33
|
-
|
|
32
|
+
> **User:** What's Polymarket saying about the Fed rate decision next month?
|
|
34
33
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
| Bridge | [bridge.base.org](https://bridge.base.org) |
|
|
34
|
+
> **Claude:** According to Polymarket, the market currently puts a **73% probability** on the Fed holding rates steady at the May meeting, with 24% on a 25bp cut and 3% on a hike. Volume over the last 24h: $2.1M. The "Hold" contract last traded at $0.73.
|
|
35
|
+
>
|
|
36
|
+
> *(via `blockrun_markets` · cost: $0.001)*
|
|
39
37
|
|
|
40
38
|
---
|
|
41
39
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
Pay-per-call via [x402](https://x402.org) micropayments in USDC. Wallet stored locally at `~/.blockrun/.session`. Private key never leaves your machine.
|
|
40
|
+
> **User:** Find recent papers on speculative decoding and summarize the key approaches
|
|
45
41
|
|
|
46
|
-
|
|
42
|
+
> **Claude:** I found 8 papers from the last 60 days via neural search. The dominant approaches are: (1) draft model selection — smaller models predicting N tokens ahead for the larger model to verify in parallel...
|
|
43
|
+
>
|
|
44
|
+
> *(via `blockrun_exa` · cost: $0.01)*
|
|
47
45
|
|
|
48
46
|
---
|
|
49
47
|
|
|
50
|
-
##
|
|
48
|
+
## Install
|
|
49
|
+
|
|
50
|
+
**Claude Code (recommended)**
|
|
51
|
+
```bash
|
|
52
|
+
claude mcp add blockrun npx @blockrun/mcp
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
**Claude Desktop** — add to `claude_desktop_config.json`:
|
|
56
|
+
```json
|
|
57
|
+
{
|
|
58
|
+
"mcpServers": {
|
|
59
|
+
"blockrun": {
|
|
60
|
+
"command": "npx",
|
|
61
|
+
"args": ["-y", "@blockrun/mcp"]
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
```
|
|
51
66
|
|
|
67
|
+
**Hosted (no install, always latest)**
|
|
52
68
|
```bash
|
|
53
69
|
claude mcp add --transport http blockrun https://mcp.blockrun.ai/mcp
|
|
54
70
|
```
|
|
55
71
|
|
|
56
72
|
---
|
|
57
73
|
|
|
58
|
-
|
|
74
|
+
## Fund your wallet
|
|
75
|
+
|
|
76
|
+
Run `blockrun_wallet` to see your address. Send USDC on Base.
|
|
77
|
+
|
|
78
|
+
| Method | Steps |
|
|
79
|
+
|--------|-------|
|
|
80
|
+
| Coinbase | Send → USDC → Base network → paste address |
|
|
81
|
+
| Bridge from Ethereum | [bridge.base.org](https://bridge.base.org) |
|
|
82
|
+
|
|
83
|
+
$5 covers ~5,000 market queries, ~500 Exa searches, or ~250 image generations.
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## Tools
|
|
88
|
+
|
|
89
|
+
| Tool | Data source | Cost |
|
|
90
|
+
|------|-------------|------|
|
|
91
|
+
| `blockrun_markets` | Polymarket, Kalshi, dFlow, Binance Futures | $0.001/query |
|
|
92
|
+
| `blockrun_exa` | Neural web search (Exa) — research, competitors, papers, URL content | $0.01/query |
|
|
93
|
+
| `blockrun_search` | Web + news with citations | ~$0.01 |
|
|
94
|
+
| `blockrun_twitter` | X/Twitter — profiles, tweets, trends, Grok sentiment | per token |
|
|
95
|
+
| `blockrun_dex` | Live DEX prices via DexScreener | free |
|
|
96
|
+
| `blockrun_image` | DALL-E 3, Flux image generation + editing | $0.02–0.08 |
|
|
97
|
+
| `blockrun_chat` | GPT-4o, Gemini, DeepSeek, 30+ models | per token |
|
|
98
|
+
| `blockrun_wallet` | Balance, spending, agent budgets | free |
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
## Why not just use the APIs directly?
|
|
103
|
+
|
|
104
|
+
| | Direct APIs | BlockRun |
|
|
105
|
+
|---|---|---|
|
|
106
|
+
| Exa | Sign up, $20/mo minimum | $0.01/call, no subscription |
|
|
107
|
+
| Polymarket | Undocumented, rate-limited | $0.001/call, clean JSON |
|
|
108
|
+
| Twitter/X API | $100–$5000/month | $0.03/page, no approval |
|
|
109
|
+
| Multiple sources | 4 accounts, 4 API keys, 4 billing pages | 1 wallet |
|
|
110
|
+
|
|
111
|
+
One wallet. All sources. No dashboards.
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
## Multi-agent budget delegation
|
|
116
|
+
|
|
117
|
+
Delegate a spending budget to a child agent with `agent_id`. The child is auto-blocked when the budget runs out — useful for autonomous agents that shouldn't run up unbounded costs.
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## How it works
|
|
122
|
+
|
|
123
|
+
Pay-per-call via [x402](https://x402.org) micropayments in USDC on Base. Your wallet lives at `~/.blockrun/.session`. Private key never leaves your machine.
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
[blockrun.ai](https://blockrun.ai) · [npm](https://www.npmjs.com/package/@blockrun/mcp) · [@BlockRunAI](https://x.com/BlockRunAI)
|
package/dist/index.js
CHANGED
|
@@ -132,7 +132,6 @@ import { z } from "zod";
|
|
|
132
132
|
|
|
133
133
|
// src/utils/qr.ts
|
|
134
134
|
import QRCode from "qrcode";
|
|
135
|
-
import { Jimp } from "jimp";
|
|
136
135
|
import open from "open";
|
|
137
136
|
import * as fs2 from "fs";
|
|
138
137
|
function getEip681Uri(address, amountUsdc = 1) {
|
|
@@ -141,28 +140,16 @@ function getEip681Uri(address, amountUsdc = 1) {
|
|
|
141
140
|
}
|
|
142
141
|
async function generateQrPng(address) {
|
|
143
142
|
const eip681Uri = getEip681Uri(address);
|
|
144
|
-
|
|
143
|
+
if (!fs2.existsSync(WALLET_DIR)) {
|
|
144
|
+
fs2.mkdirSync(WALLET_DIR, { recursive: true, mode: 448 });
|
|
145
|
+
}
|
|
146
|
+
await QRCode.toFile(QR_FILE, eip681Uri, {
|
|
145
147
|
type: "png",
|
|
146
148
|
width: 400,
|
|
147
149
|
margin: 2,
|
|
148
150
|
errorCorrectionLevel: "H",
|
|
149
151
|
color: { dark: "#000000", light: "#FFFFFF" }
|
|
150
152
|
});
|
|
151
|
-
const qrImage = await Jimp.read(qrBuffer);
|
|
152
|
-
try {
|
|
153
|
-
const logoUrl = "https://avatars.githubusercontent.com/u/108554348?s=200&v=4";
|
|
154
|
-
const logo = await Jimp.read(logoUrl);
|
|
155
|
-
const logoSize = Math.floor(qrImage.width * 0.2);
|
|
156
|
-
logo.resize({ w: logoSize, h: logoSize });
|
|
157
|
-
const x = Math.floor((qrImage.width - logoSize) / 2);
|
|
158
|
-
const y = Math.floor((qrImage.height - logoSize) / 2);
|
|
159
|
-
qrImage.composite(logo, x, y);
|
|
160
|
-
} catch {
|
|
161
|
-
}
|
|
162
|
-
if (!fs2.existsSync(WALLET_DIR)) {
|
|
163
|
-
fs2.mkdirSync(WALLET_DIR, { recursive: true, mode: 448 });
|
|
164
|
-
}
|
|
165
|
-
await qrImage.write(QR_FILE);
|
|
166
153
|
return QR_FILE;
|
|
167
154
|
}
|
|
168
155
|
async function openQrInViewer(qrPath) {
|
|
@@ -1026,12 +1013,12 @@ function initializeMcpServer(server) {
|
|
|
1026
1013
|
async function main() {
|
|
1027
1014
|
const server = new McpServer({
|
|
1028
1015
|
name: "blockrun-mcp",
|
|
1029
|
-
version: "0.6.
|
|
1016
|
+
version: "0.6.4"
|
|
1030
1017
|
});
|
|
1031
1018
|
initializeMcpServer(server);
|
|
1032
1019
|
const transport = new StdioServerTransport();
|
|
1033
1020
|
await server.connect(transport);
|
|
1034
|
-
console.error("BlockRun MCP Server started (v0.6.
|
|
1021
|
+
console.error("BlockRun MCP Server started (v0.6.4) \u2014 stdio transport");
|
|
1035
1022
|
}
|
|
1036
1023
|
main().catch((error) => {
|
|
1037
1024
|
console.error("Fatal error:", error);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blockrun/mcp",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.5",
|
|
4
4
|
"mcpName": "io.github.BlockRunAI/blockrun-mcp",
|
|
5
5
|
"description": "BlockRun MCP Server - Give your AI agent web search, deep research, prediction markets, crypto data, X/Twitter intelligence. Paid via x402 micropayments.",
|
|
6
6
|
"type": "module",
|
|
@@ -46,7 +46,6 @@
|
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@blockrun/llm": "^1.5.0",
|
|
48
48
|
"@modelcontextprotocol/sdk": "^1.0.0",
|
|
49
|
-
"jimp": "^1.6.0",
|
|
50
49
|
"open": "^11.0.0",
|
|
51
50
|
"qrcode": "^1.5.4",
|
|
52
51
|
"viem": "^2.21.0",
|