@blockrun/mcp 0.22.3 → 0.23.0
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 +2 -2
- package/dist/index.js +227 -128
- package/package.json +6 -3
- package/skills/exa-research/SKILL.md +177 -0
- package/skills/image-prompting/SKILL.md +308 -0
- package/skills/image-prompting/example-100t-poster.jpg +0 -0
- package/skills/modal/SKILL.md +118 -0
- package/skills/phone/SKILL.md +176 -0
- package/skills/prediction-markets/SKILL.md +263 -0
- package/skills/rpc/SKILL.md +106 -0
- package/skills/search/SKILL.md +96 -0
- package/skills/surf/SKILL.md +295 -0
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: surf
|
|
3
|
+
description: Use when the user wants crypto data — token prices, on-chain SQL, prediction-market positions, CEX order books, wallet labels/net-worth, social mindshare, news, or a Surf-1.5 chat answer with citations. 84 endpoints across exchange, on-chain, wallet, social, prediction, news, search, and chat — one API, pay-per-call in USDC via x402. Settles directly to Surf's Base treasury; no Surf account needed.
|
|
4
|
+
triggers:
|
|
5
|
+
- "surf"
|
|
6
|
+
- "asksurf"
|
|
7
|
+
- "surf-1.5"
|
|
8
|
+
- "crypto data"
|
|
9
|
+
- "on-chain sql"
|
|
10
|
+
- "clickhouse crypto"
|
|
11
|
+
- "wallet labels"
|
|
12
|
+
- "wallet net worth"
|
|
13
|
+
- "smart followers"
|
|
14
|
+
- "ct mindshare"
|
|
15
|
+
- "social mindshare"
|
|
16
|
+
- "kol search"
|
|
17
|
+
- "fear and greed"
|
|
18
|
+
- "etf flows"
|
|
19
|
+
- "funding rate"
|
|
20
|
+
- "long short ratio"
|
|
21
|
+
- "liquidation chart"
|
|
22
|
+
- "tokenomics unlock"
|
|
23
|
+
- "vc fund portfolio"
|
|
24
|
+
- "defi protocol metrics"
|
|
25
|
+
- "bridge ranking"
|
|
26
|
+
- "yield ranking"
|
|
27
|
+
- "airdrop search"
|
|
28
|
+
- "options skew"
|
|
29
|
+
- "perp snapshot"
|
|
30
|
+
- "gas price"
|
|
31
|
+
- "polymarket data"
|
|
32
|
+
- "kalshi data"
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
# Surf — Crypto Data via BlockRun
|
|
36
|
+
|
|
37
|
+
Surf (asksurf.ai) aggregates **84 crypto data endpoints** across CEX market data, on-chain SQL (13 chains, 80+ ClickHouse tables), 100M+ labeled wallets, prediction markets (Polymarket + Kalshi side-by-side), social/CT intelligence, news, unified search, and Surf-1.5 chat with citations.
|
|
38
|
+
|
|
39
|
+
BlockRun is Surf's x402 payment rail — every call settles **directly to Surf's Base treasury**. You hold the wallet, BlockRun holds the Surf key, Surf holds the data. No Surf account, no API key, no monthly minimum.
|
|
40
|
+
|
|
41
|
+
## How to Call from MCP
|
|
42
|
+
|
|
43
|
+
One tool, three params. The MCP tool auto-routes method (POST when `body` is set, GET otherwise) and auto-validates required params before settling:
|
|
44
|
+
|
|
45
|
+
```ts
|
|
46
|
+
blockrun_surf({ path: "market/price", params: { symbol: "BTC" } })
|
|
47
|
+
|
|
48
|
+
blockrun_surf({ path: "onchain/sql", body: {
|
|
49
|
+
sql: "SELECT token_address, count() FROM ethereum.dex_trades WHERE block_time > now() - INTERVAL 1 DAY GROUP BY 1 ORDER BY 2 DESC LIMIT 10"
|
|
50
|
+
}})
|
|
51
|
+
|
|
52
|
+
blockrun_surf({ path: "chat/completions", body: {
|
|
53
|
+
model: "surf/surf-1.5",
|
|
54
|
+
messages: [{ role: "user", content: "What's the Polymarket consensus for the 2028 US election?" }],
|
|
55
|
+
}})
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Three Pricing Tiers
|
|
59
|
+
|
|
60
|
+
| Tier | Price | Used by |
|
|
61
|
+
|------|-------|---------|
|
|
62
|
+
| 1 | $0.001 | prices, rankings, lists, news, profiles, simple reads (~50 endpoints) |
|
|
63
|
+
| 2 | $0.005 | order books, candles, search, wallet detail, social aggregates (~30 endpoints) |
|
|
64
|
+
| 3 | $0.020 | raw on-chain SQL, structured queries, surf-1.5 chat (3 endpoints) |
|
|
65
|
+
|
|
66
|
+
Wrong / missing required params return HTTP 400 **without charging** — pre-validation runs before settlement.
|
|
67
|
+
|
|
68
|
+
## Quick Decision Table — "User asks about X"
|
|
69
|
+
|
|
70
|
+
| User wants… | Method | Path | Required | Tier |
|
|
71
|
+
|---|---|---|---|---|
|
|
72
|
+
| BTC/ETH price | GET | `market/price` | `symbol` | 1 |
|
|
73
|
+
| ETF flow history | GET | `market/etf` | `symbol` | 1 |
|
|
74
|
+
| Fear & Greed index | GET | `market/fear-greed` | – | 1 |
|
|
75
|
+
| Top 100 tokens by market cap | GET | `market/ranking` | – | 1 |
|
|
76
|
+
| Options skew / IV / volume | GET | `market/options` | `symbol` | 1 |
|
|
77
|
+
| CEX ticker for a pair | GET | `exchange/price` | `pair` | 1 |
|
|
78
|
+
| Perp snapshot (funding + OI) | GET | `exchange/perp` | `pair` | 1 |
|
|
79
|
+
| Order book depth | GET | `exchange/depth` | `pair` | 2 |
|
|
80
|
+
| OHLCV candles | GET | `exchange/klines` | `pair` | 2 |
|
|
81
|
+
| Funding rate history | GET | `exchange/funding-history` | `pair` | 2 |
|
|
82
|
+
| Long/short ratio | GET | `exchange/long-short-ratio` | `pair` | 2 |
|
|
83
|
+
| Bridge protocols by volume | GET | `onchain/bridge/ranking` | – | 1 |
|
|
84
|
+
| Yield pool ranking | GET | `onchain/yield/ranking` | – | 1 |
|
|
85
|
+
| Current gas price (per chain) | GET | `onchain/gas-price` | `chain` | 1 |
|
|
86
|
+
| Transaction details | GET | `onchain/tx` | `hash`, `chain` | 1 |
|
|
87
|
+
| **Raw on-chain SQL** | POST | `onchain/sql` | body: `sql` | 3 |
|
|
88
|
+
| **Structured on-chain query** | POST | `onchain/query` | body: typed predicates | 3 |
|
|
89
|
+
| Inspect ClickHouse schema | GET | `onchain/schema` | – | 3 |
|
|
90
|
+
| Polymarket markets ranking | GET | `prediction-market/polymarket/ranking` | – | 1 |
|
|
91
|
+
| Polymarket price history | GET | `prediction-market/polymarket/prices` | `condition_id` | 1 |
|
|
92
|
+
| Polymarket positions for wallet | GET | `prediction-market/polymarket/positions` | `address` | 2 |
|
|
93
|
+
| Kalshi markets ranking | GET | `prediction-market/kalshi/ranking` | – | 1 |
|
|
94
|
+
| Kalshi market detail | GET | `prediction-market/kalshi/markets` | `market_ticker` | 1 |
|
|
95
|
+
| **Search Polymarket / Kalshi** | GET | `search/polymarket` / `search/kalshi` | – | 2 |
|
|
96
|
+
| Wallet profile (cross-chain) | GET | `wallet/detail` | `address` | 2 |
|
|
97
|
+
| Wallet net-worth time series | GET | `wallet/net-worth` | `address` | 2 |
|
|
98
|
+
| Wallet DeFi positions | GET | `wallet/protocols` | `address` | 2 |
|
|
99
|
+
| **Batch wallet labels (CEX/Whale/MEV…)** | GET | `wallet/labels/batch` | `addresses` | 2 |
|
|
100
|
+
| Token tokenomics + unlocks | GET | `token/tokenomics` | – | 1 |
|
|
101
|
+
| Token holders top N | GET | `token/holders` | `address`, `chain` | 2 |
|
|
102
|
+
| Token transfers | GET | `token/transfers` | `address`, `chain` | 2 |
|
|
103
|
+
| Token DEX trades | GET | `token/dex-trades` | `address` | 2 |
|
|
104
|
+
| Social mindshare time series | GET | `social/mindshare` | `q`, `interval` | 2 |
|
|
105
|
+
| Smart-follower history | GET | `social/smart-followers/history` | – | 2 |
|
|
106
|
+
| Twitter user profile | GET | `social/user` | `handle` | 1 |
|
|
107
|
+
| Twitter user posts | GET | `social/user/posts` | `handle` | 1 |
|
|
108
|
+
| Tweet replies | GET | `social/tweet/replies` | `tweet_id` | 1 |
|
|
109
|
+
| **Web search (crypto-scoped)** | GET | `search/web` | `q` | 2 |
|
|
110
|
+
| News article search | GET | `search/news` | `q` | 2 |
|
|
111
|
+
| KOL / CT people search | GET | `search/social/people` | `q` | 2 |
|
|
112
|
+
| Tweet full-text search | GET | `search/social/posts` | `q` | 2 |
|
|
113
|
+
| Project / token search | GET | `search/project` | `q` | 2 |
|
|
114
|
+
| Wallet search (by ENS, label) | GET | `search/wallet` | `q` | 2 |
|
|
115
|
+
| VC fund portfolio | GET | `fund/portfolio` | – | 1 |
|
|
116
|
+
| VC fund ranking | GET | `fund/ranking` | `metric` | 1 |
|
|
117
|
+
| DeFi protocol ranking | GET | `project/defi/ranking` | `metric` | 1 |
|
|
118
|
+
| Project full profile | GET | `project/detail` | – | 1 |
|
|
119
|
+
| Clean a webpage to markdown | GET | `web/fetch` | `url` | 2 |
|
|
120
|
+
| **Surf-1.5 chat with citations** | POST | `chat/completions` | body: `model`, `messages` | 3 |
|
|
121
|
+
| News feed | GET | `news/feed` | – | 1 |
|
|
122
|
+
| Single news article | GET | `news/detail` | `id` | 1 |
|
|
123
|
+
|
|
124
|
+
## Worked Examples
|
|
125
|
+
|
|
126
|
+
### 1. "What's BTC trading at?"
|
|
127
|
+
|
|
128
|
+
```ts
|
|
129
|
+
blockrun_surf({ path: "market/price", params: { symbol: "BTC" } })
|
|
130
|
+
```
|
|
131
|
+
**Cost: $0.001.** Returns price history; latest point = current price.
|
|
132
|
+
|
|
133
|
+
### 2. "Top 10 tokens by DEX volume on Ethereum in the last 24h"
|
|
134
|
+
|
|
135
|
+
```ts
|
|
136
|
+
blockrun_surf({
|
|
137
|
+
path: "onchain/sql",
|
|
138
|
+
body: {
|
|
139
|
+
sql: `
|
|
140
|
+
SELECT token_address, sum(amount_usd) AS volume_usd
|
|
141
|
+
FROM ethereum.dex_trades
|
|
142
|
+
WHERE block_time > now() - INTERVAL 1 DAY
|
|
143
|
+
GROUP BY token_address
|
|
144
|
+
ORDER BY volume_usd DESC
|
|
145
|
+
LIMIT 10
|
|
146
|
+
`
|
|
147
|
+
}
|
|
148
|
+
})
|
|
149
|
+
```
|
|
150
|
+
**Cost: $0.02.** Raw ClickHouse — same query language Surf's own UI uses.
|
|
151
|
+
|
|
152
|
+
### 3. "Is this whale wallet labeled? What does it hold?"
|
|
153
|
+
|
|
154
|
+
```ts
|
|
155
|
+
// Step 1 — labels (CEX / Whale / Bridge / MEV / Bot / Fund)
|
|
156
|
+
blockrun_surf({ path: "wallet/labels/batch", params: { addresses: "0xabc...,0xdef..." } })
|
|
157
|
+
|
|
158
|
+
// Step 2 — cross-chain holdings + DeFi positions
|
|
159
|
+
blockrun_surf({ path: "wallet/detail", params: { address: "0xabc..." } })
|
|
160
|
+
blockrun_surf({ path: "wallet/protocols", params: { address: "0xabc..." } })
|
|
161
|
+
|
|
162
|
+
// Step 3 — net-worth time series
|
|
163
|
+
blockrun_surf({ path: "wallet/net-worth", params: { address: "0xabc..." } })
|
|
164
|
+
```
|
|
165
|
+
**Cost: 4 × $0.005 = $0.02.** Replaces a Nansen subscription for one-off lookups.
|
|
166
|
+
|
|
167
|
+
### 4. "What's the market saying about the 2028 election?"
|
|
168
|
+
|
|
169
|
+
```ts
|
|
170
|
+
// Compare Polymarket + Kalshi side by side
|
|
171
|
+
blockrun_surf({ path: "search/polymarket", params: { q: "2028 US president" } })
|
|
172
|
+
blockrun_surf({ path: "search/kalshi", params: { q: "2028 US president" } })
|
|
173
|
+
|
|
174
|
+
// Then pull the order book on the leading market
|
|
175
|
+
blockrun_surf({ path: "prediction-market/polymarket/prices",
|
|
176
|
+
params: { condition_id: "0x..." } })
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
### 5. "Surf-1.5 chat with grounded citations"
|
|
180
|
+
|
|
181
|
+
```ts
|
|
182
|
+
blockrun_surf({
|
|
183
|
+
path: "chat/completions",
|
|
184
|
+
body: {
|
|
185
|
+
model: "surf/surf-1.5",
|
|
186
|
+
messages: [
|
|
187
|
+
{ role: "user", content: "Summarize ETH's on-chain activity this week. Cite sources." }
|
|
188
|
+
],
|
|
189
|
+
citation: ["source", "chart"]
|
|
190
|
+
}
|
|
191
|
+
})
|
|
192
|
+
```
|
|
193
|
+
**Cost: $0.02 flat (per-token billing in Phase 2).** Returns OpenAI-compatible response + citations.
|
|
194
|
+
|
|
195
|
+
### 6. "Where's mindshare moving for L1s?"
|
|
196
|
+
|
|
197
|
+
```ts
|
|
198
|
+
blockrun_surf({ path: "social/mindshare", params: { q: "solana", interval: "1d" } })
|
|
199
|
+
blockrun_surf({ path: "social/mindshare", params: { q: "monad", interval: "1d" } })
|
|
200
|
+
blockrun_surf({ path: "social/ranking" })
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
### 7. "ETF flows + funding rate + long/short — give me the macro picture"
|
|
204
|
+
|
|
205
|
+
```ts
|
|
206
|
+
blockrun_surf({ path: "market/etf", params: { symbol: "BTC" } }) // T1
|
|
207
|
+
blockrun_surf({ path: "market/fear-greed" }) // T1
|
|
208
|
+
blockrun_surf({ path: "exchange/funding-history", params: { pair: "BTC-USDT" } }) // T2
|
|
209
|
+
blockrun_surf({ path: "exchange/long-short-ratio", params: { pair: "BTC-USDT" } }) // T2
|
|
210
|
+
```
|
|
211
|
+
**Cost: 2 × $0.001 + 2 × $0.005 = $0.012.**
|
|
212
|
+
|
|
213
|
+
## Method Routing — When to Use `body`
|
|
214
|
+
|
|
215
|
+
Pass `body` (POST) only for these three endpoints:
|
|
216
|
+
|
|
217
|
+
- `onchain/query` — structured, typed predicates against ClickHouse
|
|
218
|
+
- `onchain/sql` — raw SQL string in `{ sql: "..." }`
|
|
219
|
+
- `chat/completions` — OpenAI-compatible chat completion
|
|
220
|
+
|
|
221
|
+
Everything else is GET with `params`.
|
|
222
|
+
|
|
223
|
+
## Python SDK (for non-MCP use)
|
|
224
|
+
|
|
225
|
+
```python
|
|
226
|
+
from blockrun_llm import setup_agent_wallet
|
|
227
|
+
|
|
228
|
+
client = setup_agent_wallet()
|
|
229
|
+
|
|
230
|
+
# GET — same as blockrun_surf({ path, params })
|
|
231
|
+
price = client._get_with_payment_raw("/v1/surf/market/price", {"symbol": "BTC"})
|
|
232
|
+
|
|
233
|
+
# POST — same as blockrun_surf({ path, body })
|
|
234
|
+
result = client._request_with_payment_raw("/v1/surf/onchain/sql", {
|
|
235
|
+
"sql": "SELECT count() FROM ethereum.transactions WHERE block_time > now() - INTERVAL 1 HOUR"
|
|
236
|
+
})
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
## Full Endpoint Catalog (84 endpoints, 13 categories)
|
|
240
|
+
|
|
241
|
+
### Exchange (CEX) — 7
|
|
242
|
+
`exchange/markets` · `exchange/price` · `exchange/perp` · `exchange/depth` · `exchange/klines` · `exchange/funding-history` · `exchange/long-short-ratio`
|
|
243
|
+
|
|
244
|
+
### Fund (VC intelligence) — 3
|
|
245
|
+
`fund/detail` · `fund/portfolio` · `fund/ranking`
|
|
246
|
+
|
|
247
|
+
### Market — 11
|
|
248
|
+
`market/ranking` · `market/fear-greed` · `market/futures` · `market/price` · `market/etf` · `market/options` · `market/liquidation/exchange-list` · `market/liquidation/order` · `market/liquidation/chart` · `market/onchain-indicator` · `market/price-indicator`
|
|
249
|
+
|
|
250
|
+
### News — 2
|
|
251
|
+
`news/feed` · `news/detail`
|
|
252
|
+
|
|
253
|
+
### On-chain — 7
|
|
254
|
+
`onchain/bridge/ranking` · `onchain/yield/ranking` · `onchain/gas-price` · `onchain/tx` · `onchain/schema` · `onchain/query` (POST) · `onchain/sql` (POST)
|
|
255
|
+
|
|
256
|
+
### Prediction Markets — 17
|
|
257
|
+
**Polymarket**: `prediction-market/polymarket/ranking` · `.../trades` · `.../markets` · `.../events` · `.../prices` · `.../volumes` · `.../open-interest` · `.../positions` · `.../activity` · `prediction-market/category-metrics`
|
|
258
|
+
**Kalshi**: `prediction-market/kalshi/ranking` · `.../markets` · `.../events` · `.../prices` · `.../trades` · `.../volumes` · `.../open-interest`
|
|
259
|
+
|
|
260
|
+
### Project + DeFi — 3
|
|
261
|
+
`project/detail` · `project/defi/metrics` · `project/defi/ranking`
|
|
262
|
+
|
|
263
|
+
### Search — 11
|
|
264
|
+
`search/airdrop` · `search/events` · `search/kalshi` · `search/polymarket` · `search/web` · `search/project` · `search/news` · `search/wallet` · `search/fund` · `search/social/people` · `search/social/posts`
|
|
265
|
+
|
|
266
|
+
### Social — 11
|
|
267
|
+
`social/detail` · `social/ranking` · `social/smart-followers/history` · `social/mindshare` · `social/tweets` · `social/tweet/replies` · `social/user` · `social/user/followers` · `social/user/following` · `social/user/posts` · `social/user/replies`
|
|
268
|
+
|
|
269
|
+
### Token — 4
|
|
270
|
+
`token/tokenomics` · `token/dex-trades` · `token/holders` · `token/transfers`
|
|
271
|
+
|
|
272
|
+
### Wallet — 6
|
|
273
|
+
`wallet/detail` · `wallet/history` · `wallet/net-worth` · `wallet/transfers` · `wallet/protocols` · `wallet/labels/batch`
|
|
274
|
+
|
|
275
|
+
### Web — 1
|
|
276
|
+
`web/fetch`
|
|
277
|
+
|
|
278
|
+
### Chat — 1
|
|
279
|
+
`chat/completions` (POST) — Surf-1.5 with `citation: ["source","chart"]` support
|
|
280
|
+
|
|
281
|
+
## Gotchas
|
|
282
|
+
|
|
283
|
+
- **Required params:** 56 of 84 endpoints require at least one param. The 402 response and the in-tool route surface which fields are missing. Missing params → 400 + no charge.
|
|
284
|
+
- **Solana wallet works too**: `blockrun_surf` routes through whichever chain the BlockRun wallet is on (Base or Solana). Surf settlement always lands in Surf's Base treasury.
|
|
285
|
+
- **`onchain/sql` is powerful but unrestricted**: there's no row limit on the server side. Add `LIMIT` to your query or you'll pay for a megabyte of JSON.
|
|
286
|
+
- **`chat/completions` is flat $0.02 in v1** — per-token billing rolls out in Phase 2. For high-volume chat, run cost estimates assuming the flat rate.
|
|
287
|
+
- **The chat endpoint uses a different upstream base** (`api.asksurf.ai/v1` instead of `/gateway/v1`). The BlockRun proxy handles this transparently — you just call `chat/completions`.
|
|
288
|
+
- **`X-Payment-Receipt` header** lands on the response with the settlement tx hash — keep it for accounting.
|
|
289
|
+
|
|
290
|
+
## Reference
|
|
291
|
+
|
|
292
|
+
- Surf marketplace page: https://blockrun.ai/marketplace/surf
|
|
293
|
+
- Surf upstream docs: https://docs.asksurf.ai
|
|
294
|
+
- Surf publisher: https://asksurf.ai
|
|
295
|
+
- BlockRun proxy source: `src/lib/surf.ts` in the BlockRun web repo
|