mcp-server-madeonsol 0.5.0 → 0.7.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 (5) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +64 -78
  3. package/dist/index.js +81 -166
  4. package/glama.json +35 -55
  5. package/package.json +49 -45
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 MadeOnSol
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.
1
+ MIT License
2
+
3
+ Copyright (c) 2026 MadeOnSol
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,78 +1,64 @@
1
- # mcp-server-madeonsol
2
-
3
- MCP server for [MadeOnSol](https://madeonsol.com) Solana KOL intelligence API. Use from Claude Desktop, Cursor, or any MCP-compatible client.
4
-
5
- > Real-time Solana trading intelligence: track 1,000+ KOL wallets with <3s latency, score 6,700+ Pump.fun deployers by reputation, detect multi-KOL coordination signals, and stream every DEX trade. Free tier: 200 requests/day at [madeonsol.com/developer](https://madeonsol.com/developer) — no credit card required.
6
-
7
- ## Authentication
8
-
9
- Three options (in priority order):
10
-
11
- | Method | Env var | Best for |
12
- |---|---|---|
13
- | **MadeOnSol API key** (recommended) | `MADEONSOL_API_KEY` | Developers — [get a free key](https://madeonsol.com/developer) |
14
- | RapidAPI key | `RAPIDAPI_KEY` | RapidAPI subscribers |
15
- | x402 micropayments | `SVM_PRIVATE_KEY` | AI agents with Solana wallets |
16
-
17
- ## Install
18
-
19
- ```bash
20
- npm install -g mcp-server-madeonsol
21
- ```
22
-
23
- > x402 peer deps (`@x402/fetch @x402/svm @x402/core @solana/kit @scure/base`) are only needed when using `SVM_PRIVATE_KEY`.
24
-
25
- ## Configure
26
-
27
- ### Claude Desktop
28
-
29
- Add to `claude_desktop_config.json`:
30
-
31
- ```json
32
- {
33
- "mcpServers": {
34
- "madeonsol": {
35
- "command": "mcp-server-madeonsol",
36
- "env": {
37
- "MADEONSOL_API_KEY": "msk_your_api_key_here"
38
- }
39
- }
40
- }
41
- }
42
- ```
43
-
44
- ### Cursor
45
-
46
- Add to MCP settings with the same command and env vars.
47
-
48
- ## Tools
49
-
50
- | Tool | Description |
51
- |---|---|
52
- | `madeonsol_kol_feed` | Real-time KOL trade feed (1,000+ wallets) |
53
- | `madeonsol_kol_coordination` | Multi-KOL convergence signals |
54
- | `madeonsol_kol_leaderboard` | KOL PnL and win rate rankings (180 days of trade history; periods: today, 7d, 30d, 90d, 180d) |
55
- | `madeonsol_deployer_alerts` | Pump.fun deployer launches. PRO/ULTRA: filter by deployer tier (elite/good/moderate/rising/cold). |
56
- | `madeonsol_token_info` | Token intelligence — price, market cap, volume, deployer, KOL activity |
57
- | `madeonsol_api_status` | System health — service status and uptime (no auth required) |
58
- | `madeonsol_discovery` | List all endpoints and prices (free) |
59
-
60
- **With Pro/Ultra subscription:**
61
-
62
- | Tool | Description |
63
- |---|---|
64
- | `madeonsol_stream_token` | Get 24h WebSocket token for KOL/deployer streaming and DEX trade stream |
65
- | Webhook CRUD tools | Create, list, update, delete, test webhooks |
66
-
67
- ## Also Available
68
-
69
- | Platform | Package |
70
- |---|---|
71
- | TypeScript SDK | [`madeonsol-x402`](https://www.npmjs.com/package/madeonsol-x402) |
72
- | Python (LangChain, CrewAI) | [`madeonsol-x402`](https://github.com/LamboPoewert/madeonsol-python) on PyPI |
73
- | ElizaOS | [`@madeonsol/plugin-madeonsol`](https://www.npmjs.com/package/@madeonsol/plugin-madeonsol) |
74
- | Solana Agent Kit | [`solana-agent-kit-plugin-madeonsol`](https://www.npmjs.com/package/solana-agent-kit-plugin-madeonsol) |
75
-
76
- ## License
77
-
78
- MIT
1
+ # mcp-server-madeonsol
2
+
3
+ MCP server for [MadeOnSol](https://madeonsol.com) Solana KOL intelligence API. Use from Claude Desktop, Cursor, or any MCP-compatible client.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install -g mcp-server-madeonsol @x402/fetch @x402/svm @x402/core @solana/kit @scure/base
9
+ ```
10
+
11
+ ## Configure
12
+
13
+ ### Claude Desktop
14
+
15
+ Add to `claude_desktop_config.json`:
16
+
17
+ ```json
18
+ {
19
+ "mcpServers": {
20
+ "madeonsol": {
21
+ "command": "mcp-server-madeonsol",
22
+ "env": {
23
+ "SVM_PRIVATE_KEY": "your_solana_private_key_base58",
24
+ "MADEONSOL_API_KEY": "msk_your_api_key_here"
25
+ }
26
+ }
27
+ }
28
+ }
29
+ ```
30
+
31
+ `SVM_PRIVATE_KEY` enables x402 micropayments. `MADEONSOL_API_KEY` (get one free at [madeonsol.com/developer](https://madeonsol.com/developer)) enables webhook, streaming, and alpha wallet intelligence tools.
32
+
33
+ ### Cursor
34
+
35
+ Add to MCP settings with the same command and env vars.
36
+
37
+ ## Tools
38
+
39
+ | Tool | Price | Description |
40
+ |---|---|---|
41
+ | `madeonsol_kol_feed` | $0.005 | Real-time KOL trade feed (946 wallets) |
42
+ | `madeonsol_kol_coordination` | $0.02 | Multi-KOL convergence signals |
43
+ | `madeonsol_kol_leaderboard` | $0.005 | KOL PnL and win rate rankings |
44
+ | `madeonsol_deployer_alerts` | $0.01 | Elite Pump.fun deployer launches |
45
+ | `madeonsol_discovery` | Free | List all endpoints and prices |
46
+
47
+ ## How It Works
48
+
49
+ The server uses the x402 payment protocol. Each tool call triggers a USDC micropayment on Solana. Your wallet needs SOL (for fees) and USDC.
50
+
51
+ Without `SVM_PRIVATE_KEY`, tools return payment requirement info instead of data.
52
+
53
+ ## Also Available
54
+
55
+ | Platform | Package |
56
+ |---|---|
57
+ | TypeScript SDK | [`madeonsol-x402`](https://www.npmjs.com/package/madeonsol-x402) |
58
+ | Python (LangChain, CrewAI) | [`madeonsol-x402`](https://github.com/LamboPoewert/madeonsol-python) on PyPI |
59
+ | ElizaOS | [`@madeonsol/plugin-madeonsol`](https://www.npmjs.com/package/@madeonsol/plugin-madeonsol) |
60
+ | Solana Agent Kit | [`solana-agent-kit-plugin-madeonsol`](https://www.npmjs.com/package/solana-agent-kit-plugin-madeonsol) |
61
+
62
+ ## License
63
+
64
+ MIT
package/dist/index.js CHANGED
@@ -5,73 +5,41 @@ import { StreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/
5
5
  import { z } from "zod";
6
6
  import { createServer } from "node:http";
7
7
  const BASE_URL = process.env.MADEONSOL_API_URL || "https://madeonsol.com";
8
- const MADEONSOL_API_KEY = process.env.MADEONSOL_API_KEY; // Native key from madeonsol.com/developer
9
- const RAPIDAPI_KEY = process.env.RAPIDAPI_KEY; // RapidAPI subscription key
10
- const PRIVATE_KEY = process.env.SVM_PRIVATE_KEY; // x402 micropayments (for AI agents)
8
+ const PRIVATE_KEY = process.env.SVM_PRIVATE_KEY;
9
+ const MADEONSOL_API_KEY = process.env.MADEONSOL_API_KEY; // For webhook/streaming/alpha features (Pro/Ultra)
11
10
  const PORT = parseInt(process.env.PORT || "3100", 10);
12
11
  const MODE = process.env.MCP_TRANSPORT || "stdio"; // "stdio" or "http"
13
- let authMode = "none";
14
12
  let paidFetch = fetch;
15
- function apiKeyHeaders() {
16
- if (authMode === "madeonsol") {
17
- return { Authorization: `Bearer ${MADEONSOL_API_KEY}` };
18
- }
19
- if (authMode === "rapidapi") {
20
- return {
21
- "x-rapidapi-key": RAPIDAPI_KEY,
22
- "x-rapidapi-host": "madeonsol-solana-kol-tracker-tools-api.p.rapidapi.com",
23
- };
24
- }
25
- return {};
26
- }
27
- async function initAuth() {
28
- if (MADEONSOL_API_KEY) {
29
- authMode = "madeonsol";
30
- console.error("[madeonsol-mcp] Using MadeOnSol API key (Bearer auth)");
13
+ async function initPayment() {
14
+ if (!PRIVATE_KEY) {
15
+ console.error("[madeonsol-mcp] No SVM_PRIVATE_KEY tools will return 402 payment info");
31
16
  return;
32
17
  }
33
- if (RAPIDAPI_KEY) {
34
- authMode = "rapidapi";
35
- console.error("[madeonsol-mcp] Using RapidAPI key");
36
- return;
18
+ try {
19
+ const { wrapFetchWithPayment } = await import("@x402/fetch");
20
+ const { x402Client } = await import("@x402/core/client");
21
+ const { ExactSvmScheme } = await import("@x402/svm/exact/client");
22
+ const { createKeyPairSignerFromBytes } = await import("@solana/kit");
23
+ const { base58 } = await import("@scure/base");
24
+ const signer = await createKeyPairSignerFromBytes(base58.decode(PRIVATE_KEY));
25
+ const client = new x402Client();
26
+ client.register("solana:*", new ExactSvmScheme(signer));
27
+ paidFetch = wrapFetchWithPayment(fetch, client);
28
+ console.error(`[madeonsol-mcp] x402 payments enabled, wallet: ${signer.address}`);
37
29
  }
38
- if (PRIVATE_KEY) {
39
- try {
40
- const { wrapFetchWithPayment } = await import("@x402/fetch");
41
- const { x402Client } = await import("@x402/core/client");
42
- const { ExactSvmScheme } = await import("@x402/svm/exact/client");
43
- const { createKeyPairSignerFromBytes } = await import("@solana/kit");
44
- const { base58 } = await import("@scure/base");
45
- const signer = await createKeyPairSignerFromBytes(base58.decode(PRIVATE_KEY));
46
- const client = new x402Client();
47
- client.register("solana:*", new ExactSvmScheme(signer));
48
- paidFetch = wrapFetchWithPayment(fetch, client);
49
- authMode = "x402";
50
- console.error(`[madeonsol-mcp] x402 payments enabled, wallet: ${signer.address}`);
51
- return;
52
- }
53
- catch (err) {
54
- console.error("[madeonsol-mcp] x402 setup failed:", err);
55
- }
30
+ catch (err) {
31
+ console.error("[madeonsol-mcp] x402 setup failed:", err);
56
32
  }
57
- console.error("[madeonsol-mcp] No auth configured. Set MADEONSOL_API_KEY (get one free at madeonsol.com/developer), RAPIDAPI_KEY, or SVM_PRIVATE_KEY.");
58
33
  }
59
34
  async function query(path, params) {
60
- // API key and RapidAPI auth use /api/v1/ endpoints; x402 uses /api/x402/
61
- const apiPath = authMode === "x402" || authMode === "none"
62
- ? path
63
- : path.replace("/api/x402/", "/api/v1/");
64
- const url = new URL(apiPath, BASE_URL);
35
+ const url = new URL(path, BASE_URL);
65
36
  if (params) {
66
37
  for (const [k, v] of Object.entries(params)) {
67
38
  if (v !== undefined)
68
39
  url.searchParams.set(k, String(v));
69
40
  }
70
41
  }
71
- const headers = apiKeyHeaders();
72
- const res = authMode === "x402"
73
- ? await paidFetch(url.toString())
74
- : await fetch(url.toString(), { headers });
42
+ const res = await paidFetch(url.toString());
75
43
  if (!res.ok) {
76
44
  const body = await res.text().catch(() => "");
77
45
  return `Error ${res.status}: ${body}`;
@@ -80,7 +48,7 @@ async function query(path, params) {
80
48
  }
81
49
  function registerTools(server) {
82
50
  const readOnlyAnnotations = { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true };
83
- server.tool("madeonsol_kol_feed", "Get real-time Solana KOL trades from 1,000+ tracked wallets.", {
51
+ server.tool("madeonsol_kol_feed", "Get real-time Solana KOL trades from 946 tracked wallets. Costs $0.005 USDC per request via x402.", {
84
52
  limit: z.number().min(1).max(100).default(10).describe("Number of trades to return (1-100)"),
85
53
  action: z.enum(["buy", "sell"]).optional().describe("Filter by trade type: buy or sell"),
86
54
  kol: z.string().optional().describe("Filter by specific KOL wallet address (base58)"),
@@ -92,110 +60,40 @@ function registerTools(server) {
92
60
  params.kol = kol;
93
61
  return { content: [{ type: "text", text: await query("/api/x402/kol/feed", params) }] };
94
62
  });
95
- server.tool("madeonsol_kol_coordination", "Get KOL convergence signals — tokens being accumulated by multiple KOLs simultaneously.", {
63
+ server.tool("madeonsol_kol_coordination", "Get KOL convergence signals — tokens being accumulated by multiple KOLs simultaneously. Costs $0.02 USDC per request via x402.", {
96
64
  period: z.enum(["1h", "6h", "24h", "7d"]).default("24h").describe("Time period for coordination analysis"),
97
65
  min_kols: z.number().min(2).max(50).default(3).describe("Minimum number of KOLs converging on the same token"),
98
66
  limit: z.number().min(1).max(50).default(20).describe("Number of coordination signals to return"),
99
67
  }, readOnlyAnnotations, async ({ period, min_kols, limit }) => ({
100
68
  content: [{ type: "text", text: await query("/api/x402/kol/coordination", { period, min_kols, limit }) }],
101
69
  }));
102
- server.tool("madeonsol_kol_leaderboard", "Get KOL performance rankings by PnL and win rate.", {
70
+ server.tool("madeonsol_kol_leaderboard", "Get KOL performance rankings by PnL and win rate. Costs $0.005 USDC per request via x402.", {
103
71
  period: z.enum(["today", "7d", "30d"]).default("7d").describe("Time period for leaderboard: today, 7d, or 30d"),
104
72
  limit: z.number().min(1).max(50).default(20).describe("Number of KOLs to return in ranking"),
105
73
  }, readOnlyAnnotations, async ({ period, limit }) => ({
106
74
  content: [{ type: "text", text: await query("/api/x402/kol/leaderboard", { period, limit }) }],
107
75
  }));
108
- server.tool("madeonsol_deployer_alerts", "Get real-time alerts from Pump.fun deployers with KOL buy enrichment. PRO/ULTRA subscribers can filter by deployer tier (elite/good/moderate/rising/cold).", {
76
+ server.tool("madeonsol_deployer_alerts", "Get real-time alerts from elite Pump.fun deployers with KOL buy enrichment. Costs $0.01 USDC per request via x402.", {
109
77
  limit: z.number().min(1).max(100).default(10).describe("Number of deployer alerts to return (1-100)"),
110
78
  offset: z.number().min(0).default(0).describe("Pagination offset for deployer alerts"),
111
- tier: z.enum(["elite", "good", "moderate", "rising", "cold"]).optional().describe("Filter by deployer tier. PRO/ULTRA only — BASIC callers receive HTTP 403."),
112
- }, readOnlyAnnotations, async ({ limit, offset, tier }) => ({
113
- content: [{ type: "text", text: await query("/api/x402/deployer-hunter/alerts", { limit, offset, ...(tier ? { tier } : {}) }) }],
114
- }));
115
- server.tool("madeonsol_kol_pairs", "KOL affinity matrix — discover which KOLs frequently co-trade the same tokens within a time window.", {
116
- period: z.enum(["7d", "30d"]).default("7d").describe("Time period: 7d or 30d"),
117
- min_shared: z.number().min(1).max(20).default(3).describe("Minimum number of shared tokens to qualify as a pair"),
118
- limit: z.number().min(1).max(50).default(20).describe("Number of KOL pairs to return"),
119
- }, readOnlyAnnotations, async ({ period, min_shared, limit }) => ({
120
- content: [{ type: "text", text: await query("/api/x402/kol/pairs", { period, min_shared, limit }) }],
121
- }));
122
- server.tool("madeonsol_kol_timing", "KOL entry/exit timing profile — hold duration, exit speed, and activity patterns for a specific KOL.", {
123
- wallet: z.string().describe("KOL wallet address (base58)"),
124
- period: z.enum(["7d", "30d"]).default("30d").describe("Time period: 7d or 30d"),
125
- }, readOnlyAnnotations, async ({ wallet, period }) => {
126
- const hasRestAuth = authMode === "madeonsol" || authMode === "rapidapi";
127
- if (hasRestAuth) {
128
- const headers = { ...apiKeyHeaders() };
129
- const res = await fetch(`${BASE_URL}/api/v1/kol/${wallet}/timing?period=${period}`, { headers });
130
- if (!res.ok) {
131
- const body = await res.text().catch(() => "");
132
- return { content: [{ type: "text", text: `Error ${res.status}: ${body}` }] };
133
- }
134
- return { content: [{ type: "text", text: JSON.stringify(await res.json(), null, 2) }] };
135
- }
136
- return { content: [{ type: "text", text: "KOL timing requires API key or RapidAPI key auth." }] };
137
- });
138
- server.tool("madeonsol_deployer_trajectory", "Deployer skill curve — streaks, rolling bond rate, improvement trend, and deployment cadence for a Pump.fun deployer.", {
139
- wallet: z.string().describe("Deployer wallet address (base58)"),
140
- }, readOnlyAnnotations, async ({ wallet }) => {
141
- const hasRestAuth = authMode === "madeonsol" || authMode === "rapidapi";
142
- if (hasRestAuth) {
143
- const headers = { ...apiKeyHeaders() };
144
- const res = await fetch(`${BASE_URL}/api/v1/deployer-hunter/${wallet}/trajectory`, { headers });
145
- if (!res.ok) {
146
- const body = await res.text().catch(() => "");
147
- return { content: [{ type: "text", text: `Error ${res.status}: ${body}` }] };
148
- }
149
- return { content: [{ type: "text", text: JSON.stringify(await res.json(), null, 2) }] };
150
- }
151
- return { content: [{ type: "text", text: "Deployer trajectory requires API key or RapidAPI key auth (Pro/Ultra)." }] };
152
- });
153
- server.tool("madeonsol_kol_hot_tokens", "KOL momentum tokens — tokens with accelerating KOL buy interest, early signals before coordination triggers.", {
154
- period: z.enum(["1h", "6h"]).default("6h").describe("Time period: 1h or 6h"),
155
- min_kols: z.number().min(1).max(20).default(1).describe("Minimum KOL buyers to include a token"),
156
- limit: z.number().min(1).max(50).default(20).describe("Number of hot tokens to return"),
157
- }, readOnlyAnnotations, async ({ period, min_kols, limit }) => ({
158
- content: [{ type: "text", text: await query("/api/x402/kol/tokens/hot", { period, min_kols, limit }) }],
159
- }));
160
- server.tool("madeonsol_kol_pnl", "Deep per-wallet PnL breakdown — realized PnL, win rate, profit factor, max drawdown, daily equity curve, closed/open positions. BASIC: summary only. PRO: + curve + closed. ULTRA: + open positions.", {
161
- wallet: z.string().describe("KOL wallet address (base58)"),
162
- period: z.enum(["7d", "30d", "90d", "180d"]).default("30d").describe("Time period for PnL calculation"),
163
- }, readOnlyAnnotations, async ({ wallet, period }) => {
164
- const hasRestAuth = authMode === "madeonsol" || authMode === "rapidapi";
165
- if (hasRestAuth) {
166
- const headers = { ...apiKeyHeaders() };
167
- const res = await fetch(`${BASE_URL}/api/v1/kol/${wallet}/pnl?period=${period}`, { headers });
168
- if (!res.ok) {
169
- const body = await res.text().catch(() => "");
170
- return { content: [{ type: "text", text: `Error ${res.status}: ${body}` }] };
171
- }
172
- return { content: [{ type: "text", text: JSON.stringify(await res.json(), null, 2) }] };
173
- }
174
- return { content: [{ type: "text", text: "KOL PnL requires API key or RapidAPI key auth." }] };
175
- });
176
- server.tool("madeonsol_kol_trending_tokens", "Tokens ranked by KOL buy volume — pure capital-flow signal. Sub-hour periods (5m/15m/30m) require PRO/ULTRA.", {
177
- period: z.enum(["5m", "15m", "30m", "1h", "2h", "4h", "12h"]).default("1h").describe("Time window"),
178
- min_kols: z.number().min(1).max(20).default(1).describe("Minimum KOL buyers"),
179
- limit: z.number().min(1).max(50).default(20).describe("Number of trending tokens to return"),
180
- }, readOnlyAnnotations, async ({ period, min_kols, limit }) => ({
181
- content: [{ type: "text", text: await query("/api/x402/kol/tokens/trending", { period, min_kols, limit }) }],
79
+ }, readOnlyAnnotations, async ({ limit, offset }) => ({
80
+ content: [{ type: "text", text: await query("/api/x402/deployer-hunter/alerts", { limit, offset }) }],
182
81
  }));
183
- server.tool("madeonsol_discovery", "List all available MadeOnSol API endpoints with prices and parameter docs. Free, no auth required.", {}, { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false }, async () => {
82
+ server.tool("madeonsol_discovery", "List all available MadeOnSol x402 API endpoints with prices and parameter docs. Free, no payment required.", {}, { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false }, async () => {
184
83
  const res = await fetch(new URL("/api/x402", BASE_URL).toString());
185
84
  const data = await res.json();
186
85
  return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
187
86
  });
188
- // ── Webhook & Streaming tools (require API key or RapidAPI key — Pro/Ultra tier) ──
189
- const hasRestAuth = authMode === "madeonsol" || authMode === "rapidapi";
190
- if (hasRestAuth) {
87
+ // ── Webhook & Streaming tools (require MADEONSOL_API_KEY env var) ──
88
+ if (MADEONSOL_API_KEY) {
89
+ const restHeaders = {
90
+ "Content-Type": "application/json",
91
+ "Authorization": `Bearer ${MADEONSOL_API_KEY}`,
92
+ };
191
93
  async function restQuery(method, path, body) {
192
- const headers = {
193
- "Content-Type": "application/json",
194
- ...apiKeyHeaders(),
195
- };
196
94
  const res = await fetch(`${BASE_URL}/api/v1${path}`, {
197
95
  method,
198
- headers,
96
+ headers: restHeaders,
199
97
  ...(body ? { body: JSON.stringify(body) } : {}),
200
98
  });
201
99
  if (!res.ok) {
@@ -205,7 +103,7 @@ function registerTools(server) {
205
103
  return JSON.stringify(await res.json(), null, 2);
206
104
  }
207
105
  const webhookAnnotations = { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: true };
208
- server.tool("madeonsol_create_webhook", "Register a webhook URL to receive real-time push notifications for KOL trades and deployer alerts. Requires Pro/Ultra subscription.", {
106
+ server.tool("madeonsol_create_webhook", "Register a webhook URL to receive real-time push notifications for KOL trades and deployer alerts. Requires MADEONSOL_API_KEY (Pro/Ultra).", {
209
107
  url: z.string().url().describe("HTTPS webhook URL to receive events"),
210
108
  events: z.array(z.enum(["kol:trade", "kol:coordination", "deployer:alert", "deployer:bond"])).min(1).describe("Event types to subscribe to"),
211
109
  min_sol: z.number().optional().describe("Optional: minimum SOL amount filter (for kol:trade)"),
@@ -221,7 +119,7 @@ function registerTools(server) {
221
119
  filters.deployer_tier = deployer_tier;
222
120
  return { content: [{ type: "text", text: await restQuery("POST", "/webhooks", { url, events, filters }) }] };
223
121
  });
224
- server.tool("madeonsol_list_webhooks", "List all your registered webhooks with delivery status and failure counts.", {}, { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true }, async () => ({
122
+ server.tool("madeonsol_list_webhooks", "List all your registered webhooks with delivery status and failure counts. Requires MADEONSOL_API_KEY env var.", {}, { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true }, async () => ({
225
123
  content: [{ type: "text", text: await restQuery("GET", "/webhooks") }],
226
124
  }));
227
125
  server.tool("madeonsol_delete_webhook", "Delete a webhook by ID. Permanently removes the webhook and its delivery history.", {
@@ -234,13 +132,42 @@ function registerTools(server) {
234
132
  }, { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true }, async ({ webhook_id }) => ({
235
133
  content: [{ type: "text", text: await restQuery("POST", "/webhooks/test", { webhook_id }) }],
236
134
  }));
237
- server.tool("madeonsol_stream_token", "Generate a 24h WebSocket streaming token. Includes ws_url for KOL/deployer streaming (Pro/Ultra) and dex_ws_url for all-DEX trade streaming (Ultra only).", {}, { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: true }, async () => ({
135
+ server.tool("madeonsol_stream_token", "Generate a 24-hour WebSocket streaming token for real-time event streaming. Connect to wss://madeonsol.com/ws/v1/stream?token=TOKEN", {}, { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: true }, async () => ({
238
136
  content: [{ type: "text", text: await restQuery("POST", "/stream/token") }],
239
137
  }));
240
- console.error("[madeonsol-mcp] Webhook & streaming tools enabled");
138
+ // ── Alpha wallet intelligence tools ──
139
+ server.tool("madeonsol_alpha_leaderboard", "Get a leaderboard of statistically profitable Solana wallets ranked by win rate, PnL, or ROI. Scored from 47,000+ early buyers tracked across Pump.fun tokens. BASIC: 25 results. PRO: 100. ULTRA: 500 + behavioral signals.", {
140
+ period: z.enum(["7d", "30d", "all"]).default("all").describe("Time period: 7d, 30d, or all"),
141
+ min_tokens: z.number().min(1).max(20).default(5).describe("Minimum tokens traded to qualify (1-20)"),
142
+ sort: z.enum(["win_rate", "pnl", "roi"]).default("win_rate").describe("Sort by win_rate, pnl, or roi"),
143
+ exclude_bots: z.enum(["true", "false"]).default("true").describe("Exclude medium/high bot-confidence wallets"),
144
+ }, readOnlyAnnotations, async ({ period, min_tokens, sort, exclude_bots }) => ({
145
+ content: [{ type: "text", text: await restQuery("GET", `/alpha/leaderboard?period=${period}&min_tokens=${min_tokens}&sort=${sort}&exclude_bots=${exclude_bots}`) }],
146
+ }));
147
+ server.tool("madeonsol_alpha_wallet", "Full alpha profile for a single wallet — per-token trade history, win rate, realized PnL, and bot_signals array explaining the confidence rating. ULTRA only.", {
148
+ wallet: z.string().describe("Solana wallet address (base58)"),
149
+ }, readOnlyAnnotations, async ({ wallet }) => ({
150
+ content: [{ type: "text", text: await restQuery("GET", `/alpha/${encodeURIComponent(wallet)}`) }],
151
+ }));
152
+ server.tool("madeonsol_alpha_linked", "Find wallets behaviorally linked to a target wallet — co-bought 3+ of the same tokens within a 2-second window (likely same actor or coordinated group). Returns similarity scores. ULTRA only.", {
153
+ wallet: z.string().describe("Solana wallet address to find linked wallets for"),
154
+ }, readOnlyAnnotations, async ({ wallet }) => ({
155
+ content: [{ type: "text", text: await restQuery("GET", `/alpha/${encodeURIComponent(wallet)}/linked`) }],
156
+ }));
157
+ server.tool("madeonsol_token_cap_table", "Get the first 10-20 non-deployer early buyers for a token mint, enriched with historical win rates, PnL, KOL identity, and bundle flags. Includes a buyer quality summary. BASIC: 403. PRO: top 10. ULTRA: top 20.", {
158
+ mint: z.string().describe("Token mint address (base58)"),
159
+ }, readOnlyAnnotations, async ({ mint }) => ({
160
+ content: [{ type: "text", text: await restQuery("GET", `/tokens/${encodeURIComponent(mint)}/cap-table`) }],
161
+ }));
162
+ server.tool("madeonsol_token_buyer_quality", "Get a 0-100 buyer quality score for a token's early-buyer cohort. Signal: positive (>60), neutral (40-60), negative (<40). BASIC: score + signal only. PRO/ULTRA: + full breakdown. Cached 5 minutes per mint.", {
163
+ mint: z.string().describe("Token mint address (base58)"),
164
+ }, readOnlyAnnotations, async ({ mint }) => ({
165
+ content: [{ type: "text", text: await restQuery("GET", `/tokens/${encodeURIComponent(mint)}/buyer-quality`) }],
166
+ }));
167
+ console.error("[madeonsol-mcp] Webhook, streaming & alpha tools enabled (MADEONSOL_API_KEY set)");
241
168
  }
242
169
  else {
243
- console.error("[madeonsol-mcp] Webhook/streaming tools disabled (requires MADEONSOL_API_KEY or RAPIDAPI_KEY)");
170
+ console.error("[madeonsol-mcp] No MADEONSOL_API_KEY — webhook/streaming/alpha tools disabled");
244
171
  }
245
172
  // Prompts — pre-built analysis templates
246
173
  server.prompt("solana_kol_analysis", "Analyze current Solana KOL trading activity — what are smart money wallets buying and selling?", { period: z.string().default("24h").describe("Time period: 1h, 6h, 24h, or 7d") }, ({ period }) => ({
@@ -263,7 +190,7 @@ function registerTools(server) {
263
190
  });
264
191
  }
265
192
  async function main() {
266
- await initAuth();
193
+ await initPayment();
267
194
  if (MODE === "http") {
268
195
  // HTTP transport for hosted environments (Smithery, etc.)
269
196
  const httpServer = createServer();
@@ -280,25 +207,19 @@ async function main() {
280
207
  res.writeHead(200, { "Content-Type": "application/json" });
281
208
  res.end(JSON.stringify({
282
209
  name: "madeonsol",
283
- description: "Solana KOL trading intelligence and deployer analytics. Real-time data from 1,000+ KOL wallets and 4000+ Pump.fun deployers. Supports API key, RapidAPI, or x402 micropayments.",
210
+ description: "Solana KOL trading intelligence and deployer analytics via x402 micropayments. Real-time data from 946 KOL wallets and 4000+ Pump.fun deployers.",
284
211
  version: "0.1.0",
285
212
  tools: [
286
- { name: "madeonsol_kol_feed", description: "Get real-time Solana KOL trades from 1,000+ tracked wallets." },
287
- { name: "madeonsol_kol_coordination", description: "Get KOL convergence signals — tokens multiple KOLs are accumulating." },
288
- { name: "madeonsol_kol_leaderboard", description: "Get KOL performance rankings by PnL and win rate." },
289
- { name: "madeonsol_deployer_alerts", description: "Get elite Pump.fun deployer alerts with KOL enrichment." },
290
- { name: "madeonsol_kol_pairs", description: "KOL affinity matrix — which KOLs co-trade the same tokens." },
291
- { name: "madeonsol_kol_timing", description: "KOL entry/exit timing profile. Pro/Ultra." },
292
- { name: "madeonsol_deployer_trajectory", description: "Deployer skill curve — streaks, trend. Pro/Ultra." },
293
- { name: "madeonsol_kol_hot_tokens", description: "KOL momentum tokens — accelerating buy interest." },
294
- { name: "madeonsol_kol_pnl", description: "Deep per-wallet PnL: equity curve, risk metrics, positions." },
295
- { name: "madeonsol_kol_trending_tokens", description: "Tokens ranked by KOL buy volume (5m–12h windows)." },
213
+ { name: "madeonsol_kol_feed", description: "Get real-time Solana KOL trades from 946 tracked wallets. $0.005 USDC/req." },
214
+ { name: "madeonsol_kol_coordination", description: "Get KOL convergence signals — tokens multiple KOLs are accumulating. $0.02 USDC/req." },
215
+ { name: "madeonsol_kol_leaderboard", description: "Get KOL performance rankings by PnL and win rate. $0.005 USDC/req." },
216
+ { name: "madeonsol_deployer_alerts", description: "Get elite Pump.fun deployer alerts with KOL enrichment. $0.01 USDC/req." },
296
217
  { name: "madeonsol_discovery", description: "List all available endpoints with prices. Free." },
297
- { name: "madeonsol_create_webhook", description: "Register a webhook for real-time push notifications. Pro/Ultra." },
298
- { name: "madeonsol_list_webhooks", description: "List your registered webhooks. Pro/Ultra." },
299
- { name: "madeonsol_delete_webhook", description: "Delete a webhook by ID. Pro/Ultra." },
300
- { name: "madeonsol_test_webhook", description: "Send a test payload to verify a webhook. Pro/Ultra." },
301
- { name: "madeonsol_stream_token", description: "Get a 24h WebSocket streaming token. Pro/Ultra." },
218
+ { name: "madeonsol_create_webhook", description: "Register a webhook for real-time push notifications. Requires MADEONSOL_API_KEY." },
219
+ { name: "madeonsol_list_webhooks", description: "List your registered webhooks. Requires MADEONSOL_API_KEY." },
220
+ { name: "madeonsol_delete_webhook", description: "Delete a webhook by ID. Requires MADEONSOL_API_KEY." },
221
+ { name: "madeonsol_test_webhook", description: "Send a test payload to verify a webhook. Requires MADEONSOL_API_KEY." },
222
+ { name: "madeonsol_stream_token", description: "Get a 24h WebSocket streaming token. Requires MADEONSOL_API_KEY." },
302
223
  ],
303
224
  homepage: "https://madeonsol.com/solana-api",
304
225
  repository: "https://github.com/LamboPoewert/mcp-server-madeonsol",
@@ -340,14 +261,8 @@ async function main() {
340
261
  res.writeHead(404);
341
262
  res.end("Not found");
342
263
  });
343
- // Bind to 127.0.0.1 only defense in depth. UFW already blocks the port
344
- // externally, but binding to all interfaces would expose the server to any
345
- // misconfigured firewall rule. Override with HOST=0.0.0.0 if you ever need
346
- // to expose it directly (e.g. for hosted environments behind a separate
347
- // reverse proxy).
348
- const HOST = process.env.HOST || "127.0.0.1";
349
- httpServer.listen(PORT, HOST, () => {
350
- console.error(`[madeonsol-mcp] HTTP server listening on ${HOST}:${PORT}`);
264
+ httpServer.listen(PORT, () => {
265
+ console.error(`[madeonsol-mcp] HTTP server listening on port ${PORT}`);
351
266
  });
352
267
  }
353
268
  else {
package/glama.json CHANGED
@@ -1,55 +1,35 @@
1
- {
2
- "name": "mcp-server-madeonsol",
3
- "display_name": "MadeOnSol",
4
- "description": "Solana KOL trading intelligence and deployer analytics. Real-time data from 950+ KOL wallets and 6,700+ Pump.fun deployers. Supports free API key, RapidAPI, or x402 micropayments.",
5
- "version": "0.3.0",
6
- "homepage": "https://madeonsol.com/solana-api",
7
- "repository": "https://github.com/LamboPoewert/mcp-server-madeonsol",
8
- "license": "MIT",
9
- "categories": ["blockchain", "finance", "web3"],
10
- "tags": ["solana", "kol", "trading", "x402", "micropayments", "defi", "api", "deployer", "pump-fun"],
11
- "tools": [
12
- {
13
- "name": "madeonsol_kol_feed",
14
- "description": "Get real-time Solana KOL trades from 950+ tracked wallets."
15
- },
16
- {
17
- "name": "madeonsol_kol_coordination",
18
- "description": "Get KOL convergence signals — tokens multiple KOLs are accumulating."
19
- },
20
- {
21
- "name": "madeonsol_kol_leaderboard",
22
- "description": "Get KOL performance rankings by PnL and win rate."
23
- },
24
- {
25
- "name": "madeonsol_deployer_alerts",
26
- "description": "Get elite Pump.fun deployer alerts with KOL enrichment."
27
- },
28
- {
29
- "name": "madeonsol_discovery",
30
- "description": "List all available endpoints with prices. Free, no auth required."
31
- },
32
- {
33
- "name": "madeonsol_create_webhook",
34
- "description": "Register a webhook for real-time push notifications. Pro/Ultra."
35
- },
36
- {
37
- "name": "madeonsol_list_webhooks",
38
- "description": "List your registered webhooks. Pro/Ultra."
39
- },
40
- {
41
- "name": "madeonsol_delete_webhook",
42
- "description": "Delete a webhook by ID. Pro/Ultra."
43
- },
44
- {
45
- "name": "madeonsol_test_webhook",
46
- "description": "Send a test payload to verify a webhook. Pro/Ultra."
47
- },
48
- {
49
- "name": "madeonsol_stream_token",
50
- "description": "Get a 24h WebSocket streaming token. Pro/Ultra."
51
- }
52
- ],
53
- "transports": ["stdio", "http"],
54
- "runtime": "node"
55
- }
1
+ {
2
+ "name": "mcp-server-madeonsol",
3
+ "display_name": "MadeOnSol",
4
+ "description": "Solana KOL trading intelligence and deployer analytics via x402 micropayments. Real-time data from 946 KOL wallets and 4000+ Pump.fun deployers.",
5
+ "version": "0.1.0",
6
+ "homepage": "https://madeonsol.com/solana-api",
7
+ "repository": "https://github.com/LamboPoewert/mcp-server-madeonsol",
8
+ "license": "MIT",
9
+ "categories": ["blockchain", "finance", "web3"],
10
+ "tags": ["solana", "kol", "trading", "x402", "micropayments", "defi"],
11
+ "tools": [
12
+ {
13
+ "name": "madeonsol_kol_feed",
14
+ "description": "Get real-time Solana KOL trades from 946 tracked wallets. $0.005 USDC/req."
15
+ },
16
+ {
17
+ "name": "madeonsol_kol_coordination",
18
+ "description": "Get KOL convergence signals — tokens multiple KOLs are accumulating. $0.02 USDC/req."
19
+ },
20
+ {
21
+ "name": "madeonsol_kol_leaderboard",
22
+ "description": "Get KOL performance rankings by PnL and win rate. $0.005 USDC/req."
23
+ },
24
+ {
25
+ "name": "madeonsol_deployer_alerts",
26
+ "description": "Get elite Pump.fun deployer alerts with KOL enrichment. $0.01 USDC/req."
27
+ },
28
+ {
29
+ "name": "madeonsol_discovery",
30
+ "description": "List all available endpoints with prices. Free."
31
+ }
32
+ ],
33
+ "transports": ["stdio", "http"],
34
+ "runtime": "node"
35
+ }
package/package.json CHANGED
@@ -1,45 +1,49 @@
1
- {
2
- "name": "mcp-server-madeonsol",
3
- "version": "0.5.0",
4
- "mcpName": "io.github.lambopoewert/madeonsol",
5
- "description": "MCP server for MadeOnSol Solana KOL intelligence API \u00e2\u20ac\u201d use from Claude, Cursor, or any MCP client",
6
- "type": "module",
7
- "bin": {
8
- "mcp-server-madeonsol": "dist/index.js"
9
- },
10
- "main": "dist/index.js",
11
- "files": [
12
- "dist",
13
- "README.md",
14
- "LICENSE",
15
- "glama.json"
16
- ],
17
- "scripts": {
18
- "build": "tsc",
19
- "prepublishOnly": ""
20
- },
21
- "keywords": [
22
- "mcp",
23
- "solana",
24
- "x402",
25
- "kol",
26
- "trading",
27
- "claude",
28
- "cursor"
29
- ],
30
- "license": "MIT",
31
- "repository": {
32
- "type": "git",
33
- "url": "https://github.com/LamboPoewert/mcp-server-madeonsol"
34
- },
35
- "dependencies": {
36
- "@modelcontextprotocol/sdk": "^1.12.1"
37
- },
38
- "peerDependencies": {
39
- "@x402/fetch": ">=0.1.0",
40
- "@x402/core": ">=0.1.0",
41
- "@x402/svm": ">=0.1.0",
42
- "@solana/kit": ">=2.0.0",
43
- "@scure/base": ">=1.0.0"
44
- }
45
- }
1
+ {
2
+ "name": "mcp-server-madeonsol",
3
+ "version": "0.7.0",
4
+ "mcpName": "io.github.lambopoewert/madeonsol",
5
+ "description": "MCP server for MadeOnSol Solana KOL intelligence API use from Claude, Cursor, or any MCP client",
6
+ "type": "module",
7
+ "bin": {
8
+ "mcp-server-madeonsol": "dist/index.js"
9
+ },
10
+ "main": "dist/index.js",
11
+ "files": [
12
+ "dist",
13
+ "README.md",
14
+ "LICENSE",
15
+ "glama.json"
16
+ ],
17
+ "scripts": {
18
+ "build": "tsc",
19
+ "prepublishOnly": ""
20
+ },
21
+ "keywords": [
22
+ "mcp",
23
+ "solana",
24
+ "x402",
25
+ "kol",
26
+ "trading",
27
+ "claude",
28
+ "cursor"
29
+ ],
30
+ "license": "MIT",
31
+ "repository": {
32
+ "type": "git",
33
+ "url": "https://github.com/LamboPoewert/mcp-server-madeonsol"
34
+ },
35
+ "dependencies": {
36
+ "@modelcontextprotocol/sdk": "^1.12.1"
37
+ },
38
+ "peerDependencies": {
39
+ "@scure/base": ">=1.0.0",
40
+ "@solana/kit": ">=2.0.0",
41
+ "@x402/core": ">=0.1.0",
42
+ "@x402/fetch": ">=0.1.0",
43
+ "@x402/svm": ">=0.1.0"
44
+ },
45
+ "devDependencies": {
46
+ "@types/node": "^25.6.0",
47
+ "typescript": "^5.9.3"
48
+ }
49
+ }