@blockrun/mcp 0.11.0 → 0.13.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.
Files changed (3) hide show
  1. package/README.md +1 -1
  2. package/dist/index.js +56 -13
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -117,7 +117,7 @@ $5 covers ~5,000 market queries, ~500 Exa searches, ~250 image generations, or ~
117
117
  | `blockrun_video` | xAI Grok Imagine Video + ByteDance Seedance 1.5/2.0/2.0-fast | $0.03–0.30/sec |
118
118
  | `blockrun_music` | MiniMax music generation | per track |
119
119
  | `blockrun_price` | Pyth-backed realtime + OHLC — crypto / FX / commodity (free), 12 stock markets (paid) | free or $0.001/call |
120
- | `blockrun_markets` | Polymarket, Kalshi, dFlow, Binance Futures | $0.001/query |
120
+ | `blockrun_markets` | Polymarket (markets, candles, trades, orderbooks, leaderboards, smart-wallet PnL/clusters, UMA oracle), Kalshi, Limitless, Opinion, Predict.Fun, dFlow, Binance Futures, cross-platform match + search | $0.001–0.005/query |
121
121
  | `blockrun_x` | X/Twitter — profiles, tweets, followers, mentions, search (AttentionVC) | per call |
122
122
  | `blockrun_exa` | Neural web search (Exa) — research, competitors, papers, URL content | $0.01/query |
123
123
  | `blockrun_search` | Grok Live Search — web + news with citations | ~$0.025 per source |
package/dist/index.js CHANGED
@@ -596,6 +596,7 @@ ${lines.join("\n")}` }],
596
596
 
597
597
  // src/tools/image.ts
598
598
  import { z as z4 } from "zod";
599
+ import { PaymentError } from "@blockrun/llm";
599
600
  function registerImageTool(server) {
600
601
  server.registerTool(
601
602
  "blockrun_image",
@@ -661,7 +662,7 @@ Model: ${model}` }],
661
662
  };
662
663
  } catch (err) {
663
664
  const errMsg = err instanceof Error ? err.message : String(err);
664
- if (errMsg.includes("balance") || errMsg.includes("payment") || errMsg.includes("402")) {
665
+ if (err instanceof PaymentError) {
665
666
  return {
666
667
  content: [{ type: "text", text: `Image generation requires payment. Run blockrun_wallet with action: "setup" for funding instructions.
667
668
  Error: ${errMsg}` }],
@@ -1122,19 +1123,61 @@ function registerMarketsTool(server) {
1122
1123
  server.registerTool(
1123
1124
  "blockrun_markets",
1124
1125
  {
1125
- description: `Prediction market data. Real-time from Polymarket, Kalshi.
1126
-
1127
- Example paths:
1128
- - "polymarket/events" \u2014 list active events
1129
- - "polymarket/markets" \u2014 list markets
1130
- - "kalshi/markets" \u2014 Kalshi markets
1131
- - "kalshi/markets/KXBTC-25MAR14" \u2014 specific market
1132
-
1133
- $0.001/call.`,
1126
+ description: `Prediction market + derivatives data via Predexon aggregator. Tier 1 = $0.001/call, Tier 2 = $0.005/call.
1127
+
1128
+ CANONICAL CROSS-VENUE (Tier 1) \u2014 Predexon v2 unified data layer:
1129
+ - markets \u2014 list canonical market/question containers with cross-venue Predexon IDs
1130
+ - markets/listings \u2014 venue-native executable listings flattened across canonical markets
1131
+ - outcomes/:predexon_id \u2014 resolve a canonical outcome ID to its market context + venue listings
1132
+ Filter with ?venue=polymarket|kalshi|limitless|opinion|predictfun, ?status=, ?category=, ?league=, ?event_id=, ?pagination_key=
1133
+
1134
+ POLYMARKET (Tier 1):
1135
+ - polymarket/events, polymarket/markets \u2014 list events/markets (filter, sort, paginate)
1136
+ - polymarket/markets/keyset, polymarket/events/keyset \u2014 same data, cursor-based keyset pagination (use ?pagination_key=)
1137
+ - polymarket/crypto-updown \u2014 crypto up/down markets
1138
+ - polymarket/market-price/:token_id \u2014 current/historical price
1139
+ - polymarket/candlesticks/:condition_id \u2014 OHLCV by market
1140
+ - polymarket/candlesticks/token/:token_id \u2014 OHLCV by single outcome token
1141
+ - polymarket/volume-chart/:condition_id \u2014 volume w/ YES/NO split
1142
+ - polymarket/orderbooks, polymarket/trades, polymarket/activity
1143
+ - polymarket/markets/:token_id/volume, polymarket/markets/:condition_id/open_interest
1144
+ - polymarket/positions \u2014 user positions
1145
+ - polymarket/leaderboard, polymarket/leaderboard/market/:condition_id
1146
+ - polymarket/cohorts/stats, polymarket/market/:condition_id/top-holders
1147
+ - polymarket/uma/markets, polymarket/uma/market/:condition_id \u2014 UMA oracle questions/timeline
1148
+
1149
+ POLYMARKET (Tier 2 \u2014 wallet/smart-money analytics):
1150
+ - polymarket/wallet/:wallet \u2014 full smart-wallet profile
1151
+ - polymarket/wallet/:wallet/markets, .../similar
1152
+ - polymarket/wallet/pnl/:wallet, .../positions/:wallet, .../volume-chart/:wallet
1153
+ - polymarket/wallets/profiles, polymarket/wallets/filter \u2014 batch + AND/OR filter
1154
+ - polymarket/market/:condition_id/smart-money, polymarket/markets/smart-activity
1155
+
1156
+ WALLET IDENTITY & CLUSTERING (Tier 2) \u2014 cross-context labels + on-chain relationship graph:
1157
+ - polymarket/wallet/identity/:wallet \u2014 fetch identity + profile metadata for one wallet
1158
+ - polymarket/wallet/identities \u2014 POST { addresses: [...] } for bulk lookup (up to 200 wallets)
1159
+ - polymarket/wallet/:address/cluster \u2014 discover wallets connected via on-chain transfers + identity proofs
1160
+
1161
+ SPORTS (Tier 1):
1162
+ - sports/categories \u2014 list available sports categories
1163
+ - sports/markets \u2014 list sports markets grouped by game (filter ?league=, ?sport_type=, ?status=, ?venue=)
1164
+ - sports/markets/:game_id \u2014 single sports game with all venue outcomes
1165
+ - sports/outcomes/:predexon_id \u2014 equivalent sports outcomes across venues for a Predexon ID
1166
+
1167
+ KALSHI (Tier 1): kalshi/markets, kalshi/trades, kalshi/orderbooks
1168
+ LIMITLESS / OPINION / PREDICT.FUN (Tier 1): {platform}/markets, {platform}/orderbooks
1169
+ DFLOW: dflow/trades (T1), dflow/wallet/positions/:wallet (T2), dflow/wallet/pnl/:wallet (T2)
1170
+ BINANCE FUTURES (Tier 2): binance/candles/:symbol, binance/ticks/:symbol
1171
+
1172
+ CROSS-PLATFORM:
1173
+ - matching-markets, matching-markets/pairs \u2014 equivalent markets across Polymarket+Kalshi (T2)
1174
+ - markets/search \u2014 search across all platforms in one call (T2)
1175
+
1176
+ Pass query params via 'params' (GET). Use 'body' only for POST endpoints (e.g. polymarket/wallet/identities).`,
1134
1177
  inputSchema: {
1135
- path: z9.string().describe("Endpoint path, e.g. 'polymarket/events', 'kalshi/markets/KXBTC-25MAR14'"),
1136
- params: z9.record(z9.string(), z9.string()).optional().describe("Query parameters for GET requests"),
1137
- body: z9.any().optional().describe("JSON body for POST queries (triggers pmQuery)")
1178
+ path: z9.string().describe("Endpoint path, e.g. 'polymarket/events', 'kalshi/markets/KXBTC-25MAR14', 'polymarket/wallet/0xabc...', 'markets/search'"),
1179
+ params: z9.record(z9.string(), z9.string()).optional().describe("Query parameters for GET requests (e.g. { limit: '20', active: 'true' })"),
1180
+ body: z9.any().optional().describe("JSON body for POST queries (triggers pmQuery \u2014 most endpoints are GET)")
1138
1181
  }
1139
1182
  },
1140
1183
  async ({ path: path3, params, body }) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blockrun/mcp",
3
- "version": "0.11.0",
3
+ "version": "0.13.0",
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",
@@ -44,7 +44,7 @@
44
44
  "url": "https://github.com/blockrunai/blockrun-mcp/issues"
45
45
  },
46
46
  "dependencies": {
47
- "@blockrun/llm": "^1.9.0",
47
+ "@blockrun/llm": "^1.12.0",
48
48
  "@modelcontextprotocol/sdk": "^1.0.0",
49
49
  "open": "^11.0.0",
50
50
  "qrcode": "^1.5.4",