@blockrun/mcp 0.6.0 → 0.6.2
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 +3 -3
- package/dist/index.js +91 -31
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
[](https://www.npmjs.com/package/@blockrun/mcp)
|
|
6
6
|
[](https://opensource.org/licenses/MIT)
|
|
7
7
|
|
|
8
|
-
BlockRun MCP
|
|
8
|
+
BlockRun MCP gives your AI agent access to live data it can't get on its own — real-time web search, neural research, prediction markets, crypto DEX prices, and X/Twitter intelligence. All paid via x402 micropayments in USDC. No API keys. No subscriptions. No accounts.
|
|
9
9
|
|
|
10
10
|
---
|
|
11
11
|
|
|
@@ -39,7 +39,7 @@ No Node.js. No npm. Works from any MCP client. Pass your wallet key via `X-Walle
|
|
|
39
39
|
| `blockrun_markets` | Prediction markets — Polymarket, Kalshi | $0.001/call |
|
|
40
40
|
| `blockrun_dex` | Real-time DEX prices and liquidity via DexScreener | FREE |
|
|
41
41
|
| `blockrun_image` | Image generation and editing (DALL-E 3, Flux) | $0.02–0.08 |
|
|
42
|
-
| `blockrun_chat` |
|
|
42
|
+
| `blockrun_chat` | Second opinion from another model (GPT, Gemini, DeepSeek, etc.) | per token |
|
|
43
43
|
| `blockrun_wallet` | Wallet balance, agent budgets, spending reports | FREE |
|
|
44
44
|
| `blockrun_models` | List all models with pricing | FREE |
|
|
45
45
|
|
|
@@ -94,7 +94,7 @@ Wallet resolution order:
|
|
|
94
94
|
|
|
95
95
|
- **Website:** [blockrun.ai](https://blockrun.ai)
|
|
96
96
|
- **npm:** [@blockrun/mcp](https://www.npmjs.com/package/@blockrun/mcp)
|
|
97
|
-
- **Hosted MCP:** [mcp.blockrun.ai](https://mcp.blockrun.ai)
|
|
97
|
+
- **Hosted MCP:** [mcp.blockrun.ai/mcp](https://mcp.blockrun.ai/mcp)
|
|
98
98
|
- **GitHub:** [github.com/blockrunai/blockrun-mcp](https://github.com/blockrunai/blockrun-mcp)
|
|
99
99
|
- **Telegram:** [t.me/+mroQv4-4hGgzOGUx](https://t.me/+mroQv4-4hGgzOGUx)
|
|
100
100
|
- **X:** [@BlockRunAI](https://x.com/BlockRunAI)
|
package/dist/index.js
CHANGED
|
@@ -433,35 +433,13 @@ function registerChatTool(server, budget) {
|
|
|
433
433
|
server.registerTool(
|
|
434
434
|
"blockrun_chat",
|
|
435
435
|
{
|
|
436
|
-
description: `
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
3. Smart routing: mode: "fast"|"balanced"|"powerful"|"cheap"|"reasoning"|"free"|"coding"
|
|
444
|
-
4. Multi-turn: pass messages[] array (conversation history) \u2014 "message" is appended as the final user turn
|
|
445
|
-
|
|
446
|
-
All providers (format: provider/model-id):
|
|
447
|
-
\u2022 OpenAI (13): gpt-5.4, gpt-5.4-pro, gpt-5.3, gpt-5.2, gpt-5.4-mini, gpt-5-mini, gpt-5.4-nano, gpt-5.2-pro, gpt-5.3-codex, o1, o1-mini, o3, o3-mini
|
|
448
|
-
\u2022 Anthropic (4): claude-haiku-4.5, claude-sonnet-4.6, claude-opus-4.5, claude-opus-4.6
|
|
449
|
-
\u2022 Google (7): gemini-3.1-pro, gemini-3-pro-preview, gemini-3-flash-preview, gemini-2.5-pro, gemini-2.5-flash, gemini-3.1-flash-lite, gemini-2.5-flash-lite
|
|
450
|
-
\u2022 DeepSeek (2): deepseek-chat, deepseek-reasoner
|
|
451
|
-
\u2022 NVIDIA (12, most FREE*): gpt-oss-120b*, gpt-oss-20b*, kimi-k2.5, nemotron-ultra-253b*, nemotron-3-super-120b*, nemotron-super-49b*, deepseek-v3.2*, mistral-large-3-675b*, qwen3-coder-480b*, devstral-2-123b*, glm-4.7*, llama-4-maverick*
|
|
452
|
-
\u2022 ZAI (2): glm-5, glm-5-turbo
|
|
453
|
-
\u2022 MiniMax (1): minimax-m2.7
|
|
454
|
-
|
|
455
|
-
Smart routing modes:
|
|
456
|
-
- fast: Gemini Flash, GPT-5 Mini (lowest latency)
|
|
457
|
-
- balanced: GPT-5.4, Claude Sonnet 4.6, Gemini Pro (best default)
|
|
458
|
-
- powerful: GPT-5.4-Pro, Claude Opus 4.6 (highest quality)
|
|
459
|
-
- cheap: NVIDIA free + DeepSeek (lowest cost)
|
|
460
|
-
- reasoning: o3, o1, DeepSeek Reasoner (complex logic)
|
|
461
|
-
- free: All free NVIDIA models (zero cost)
|
|
462
|
-
- coding: GPT-5.3-Codex, Qwen3-Coder, Devstral (code tasks)
|
|
463
|
-
|
|
464
|
-
Run blockrun_models for live pricing.`,
|
|
436
|
+
description: `Get a second opinion from another AI model, or use a specialized model for a specific task. Useful when you want to cross-check analysis, use a reasoning model (o3, DeepSeek Reasoner) for hard problems, or use a free NVIDIA model for bulk tasks.
|
|
437
|
+
|
|
438
|
+
Use routing:"smart" to auto-select the best model, or pick directly: model:"openai/o3", model:"deepseek/deepseek-reasoner", model:"nvidia/deepseek-v3.2" (free).
|
|
439
|
+
|
|
440
|
+
Prefer blockrun_search or blockrun_exa for research \u2014 they're purpose-built for that.
|
|
441
|
+
|
|
442
|
+
Run blockrun_models to see all available models with pricing.`,
|
|
465
443
|
inputSchema: {
|
|
466
444
|
message: z2.string().describe("Your message to the AI"),
|
|
467
445
|
model: z2.string().optional().describe("Specific model ID (e.g., 'openai/gpt-4o')"),
|
|
@@ -915,6 +893,87 @@ Pricing: $0.001/GET, $0.005/POST`,
|
|
|
915
893
|
);
|
|
916
894
|
}
|
|
917
895
|
|
|
896
|
+
// src/tools/dex.ts
|
|
897
|
+
import { z as z9 } from "zod";
|
|
898
|
+
function registerDexTool(server) {
|
|
899
|
+
server.registerTool(
|
|
900
|
+
"blockrun_dex",
|
|
901
|
+
{
|
|
902
|
+
description: `Get real-time DEX data from DexScreener. FREE - no payment required.
|
|
903
|
+
|
|
904
|
+
Use for:
|
|
905
|
+
- Token prices and liquidity across chains
|
|
906
|
+
- Trading volume and price changes
|
|
907
|
+
- Finding token pairs and contracts
|
|
908
|
+
|
|
909
|
+
Examples:
|
|
910
|
+
blockrun_dex({ query: "SOL" }) -> Search for SOL pairs
|
|
911
|
+
blockrun_dex({ token: "So11...xxx" }) -> Get specific token data
|
|
912
|
+
blockrun_dex({ symbol: "PEPE" }) -> Search by symbol`,
|
|
913
|
+
inputSchema: {
|
|
914
|
+
query: z9.string().optional().describe("Search query (token name, symbol, or address)"),
|
|
915
|
+
token: z9.string().optional().describe("Token address for direct lookup"),
|
|
916
|
+
symbol: z9.string().optional().describe("Token symbol to search"),
|
|
917
|
+
chain: z9.string().optional().describe("Filter by chain (ethereum, solana, base, etc.)")
|
|
918
|
+
}
|
|
919
|
+
},
|
|
920
|
+
async ({ query, token, symbol, chain }) => {
|
|
921
|
+
try {
|
|
922
|
+
let url;
|
|
923
|
+
let searchTerm = query || symbol || "";
|
|
924
|
+
if (token) {
|
|
925
|
+
url = `https://api.dexscreener.com/latest/dex/tokens/${token}`;
|
|
926
|
+
} else if (searchTerm) {
|
|
927
|
+
url = `https://api.dexscreener.com/latest/dex/search?q=${encodeURIComponent(searchTerm)}`;
|
|
928
|
+
} else {
|
|
929
|
+
return {
|
|
930
|
+
content: [{ type: "text", text: "Provide query, token address, or symbol" }],
|
|
931
|
+
isError: true
|
|
932
|
+
};
|
|
933
|
+
}
|
|
934
|
+
const response = await fetch(url);
|
|
935
|
+
if (!response.ok) {
|
|
936
|
+
throw new Error(`DexScreener API error: ${response.status}`);
|
|
937
|
+
}
|
|
938
|
+
const data = await response.json();
|
|
939
|
+
let pairs = data.pairs || [];
|
|
940
|
+
if (chain && pairs.length > 0) {
|
|
941
|
+
const chainLower = chain.toLowerCase();
|
|
942
|
+
pairs = pairs.filter((p) => p.chainId.toLowerCase().includes(chainLower));
|
|
943
|
+
}
|
|
944
|
+
pairs = pairs.sort((a, b) => (b.volume?.h24 || 0) - (a.volume?.h24 || 0)).slice(0, 10);
|
|
945
|
+
if (pairs.length === 0) {
|
|
946
|
+
return {
|
|
947
|
+
content: [{ type: "text", text: `No pairs found for: ${searchTerm || token}` }]
|
|
948
|
+
};
|
|
949
|
+
}
|
|
950
|
+
const lines = pairs.map((p) => {
|
|
951
|
+
const price = p.priceUsd ? `$${parseFloat(p.priceUsd).toFixed(6)}` : "N/A";
|
|
952
|
+
const change = p.priceChange?.h24 ? `${p.priceChange.h24 > 0 ? "+" : ""}${p.priceChange.h24.toFixed(2)}%` : "";
|
|
953
|
+
const vol = p.volume?.h24 ? `$${(p.volume.h24 / 1e6).toFixed(2)}M` : "";
|
|
954
|
+
const liq = p.liquidity?.usd ? `$${(p.liquidity.usd / 1e6).toFixed(2)}M liq` : "";
|
|
955
|
+
const buySell = p.txns?.h24 ? `${p.txns.h24.buys}B/${p.txns.h24.sells}S` : "";
|
|
956
|
+
return `${p.baseToken.symbol}/${p.quoteToken.symbol} (${p.chainId}/${p.dexId})
|
|
957
|
+
Price: ${price} ${change} | Vol: ${vol} | ${liq} | Txns: ${buySell}
|
|
958
|
+
Token: ${p.baseToken.address}`;
|
|
959
|
+
});
|
|
960
|
+
return {
|
|
961
|
+
content: [{ type: "text", text: `[DexScreener - FREE]
|
|
962
|
+
|
|
963
|
+
${lines.join("\n\n")}` }],
|
|
964
|
+
structuredContent: { pairs, count: pairs.length }
|
|
965
|
+
};
|
|
966
|
+
} catch (error) {
|
|
967
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
968
|
+
return {
|
|
969
|
+
content: [{ type: "text", text: `DexScreener error: ${errorMessage}` }],
|
|
970
|
+
isError: true
|
|
971
|
+
};
|
|
972
|
+
}
|
|
973
|
+
}
|
|
974
|
+
);
|
|
975
|
+
}
|
|
976
|
+
|
|
918
977
|
// src/mcp-handler.ts
|
|
919
978
|
function initializeMcpServer(server) {
|
|
920
979
|
const budget = { limit: null, spent: 0, calls: 0, agents: /* @__PURE__ */ new Map() };
|
|
@@ -927,6 +986,7 @@ function initializeMcpServer(server) {
|
|
|
927
986
|
registerSearchTool(server);
|
|
928
987
|
registerExaTool(server);
|
|
929
988
|
registerMarketsTool(server);
|
|
989
|
+
registerDexTool(server);
|
|
930
990
|
server.registerResource(
|
|
931
991
|
"wallet",
|
|
932
992
|
"blockrun://wallet",
|
|
@@ -966,12 +1026,12 @@ function initializeMcpServer(server) {
|
|
|
966
1026
|
async function main() {
|
|
967
1027
|
const server = new McpServer({
|
|
968
1028
|
name: "blockrun-mcp",
|
|
969
|
-
version: "0.6.
|
|
1029
|
+
version: "0.6.1"
|
|
970
1030
|
});
|
|
971
1031
|
initializeMcpServer(server);
|
|
972
1032
|
const transport = new StdioServerTransport();
|
|
973
1033
|
await server.connect(transport);
|
|
974
|
-
console.error("BlockRun MCP Server started (v0.6.
|
|
1034
|
+
console.error("BlockRun MCP Server started (v0.6.1) \u2014 stdio transport");
|
|
975
1035
|
}
|
|
976
1036
|
main().catch((error) => {
|
|
977
1037
|
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.2",
|
|
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",
|