mcp-server-madeonsol 0.1.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/LICENSE +1 -0
- package/README.md +52 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +89 -0
- package/package.json +31 -0
package/LICENSE
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
MIT License
|
package/README.md
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
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
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### Cursor
|
|
31
|
+
|
|
32
|
+
Add to MCP settings with the same command and env vars.
|
|
33
|
+
|
|
34
|
+
## Tools
|
|
35
|
+
|
|
36
|
+
| Tool | Price | Description |
|
|
37
|
+
|---|---|---|
|
|
38
|
+
| `madeonsol_kol_feed` | $0.005 | Real-time KOL trade feed (946 wallets) |
|
|
39
|
+
| `madeonsol_kol_coordination` | $0.02 | Multi-KOL convergence signals |
|
|
40
|
+
| `madeonsol_kol_leaderboard` | $0.005 | KOL PnL and win rate rankings |
|
|
41
|
+
| `madeonsol_deployer_alerts` | $0.01 | Elite Pump.fun deployer launches |
|
|
42
|
+
| `madeonsol_discovery` | Free | List all endpoints and prices |
|
|
43
|
+
|
|
44
|
+
## How It Works
|
|
45
|
+
|
|
46
|
+
The server uses the x402 payment protocol. Each tool call triggers a USDC micropayment on Solana. Your wallet needs SOL (for fees) and USDC.
|
|
47
|
+
|
|
48
|
+
Without `SVM_PRIVATE_KEY`, tools return payment requirement info instead of data.
|
|
49
|
+
|
|
50
|
+
## License
|
|
51
|
+
|
|
52
|
+
MIT
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
3
|
+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
const BASE_URL = process.env.MADEONSOL_API_URL || "https://madeonsol.com";
|
|
6
|
+
const PRIVATE_KEY = process.env.SVM_PRIVATE_KEY;
|
|
7
|
+
let paidFetch = fetch;
|
|
8
|
+
async function initPayment() {
|
|
9
|
+
if (!PRIVATE_KEY) {
|
|
10
|
+
console.error("[madeonsol-mcp] No SVM_PRIVATE_KEY — tools will return 402 payment info");
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
try {
|
|
14
|
+
const { wrapFetchWithPayment } = await import("@x402/fetch");
|
|
15
|
+
const { x402Client } = await import("@x402/core/client");
|
|
16
|
+
const { ExactSvmScheme } = await import("@x402/svm/exact/client");
|
|
17
|
+
const { createKeyPairSignerFromBytes } = await import("@solana/kit");
|
|
18
|
+
const { base58 } = await import("@scure/base");
|
|
19
|
+
const signer = await createKeyPairSignerFromBytes(base58.decode(PRIVATE_KEY));
|
|
20
|
+
const client = new x402Client();
|
|
21
|
+
client.register("solana:*", new ExactSvmScheme(signer));
|
|
22
|
+
paidFetch = wrapFetchWithPayment(fetch, client);
|
|
23
|
+
console.error(`[madeonsol-mcp] x402 payments enabled, wallet: ${signer.address}`);
|
|
24
|
+
}
|
|
25
|
+
catch (err) {
|
|
26
|
+
console.error("[madeonsol-mcp] x402 setup failed:", err);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
async function query(path, params) {
|
|
30
|
+
const url = new URL(path, BASE_URL);
|
|
31
|
+
if (params) {
|
|
32
|
+
for (const [k, v] of Object.entries(params)) {
|
|
33
|
+
if (v !== undefined)
|
|
34
|
+
url.searchParams.set(k, String(v));
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
const res = await paidFetch(url.toString());
|
|
38
|
+
if (!res.ok) {
|
|
39
|
+
const body = await res.text().catch(() => "");
|
|
40
|
+
return `Error ${res.status}: ${body}`;
|
|
41
|
+
}
|
|
42
|
+
return JSON.stringify(await res.json(), null, 2);
|
|
43
|
+
}
|
|
44
|
+
const server = new McpServer({
|
|
45
|
+
name: "madeonsol",
|
|
46
|
+
version: "0.1.0",
|
|
47
|
+
});
|
|
48
|
+
server.tool("madeonsol_kol_feed", "Get real-time Solana KOL trades from 946 tracked wallets. Costs $0.005 USDC per request via x402.", {
|
|
49
|
+
limit: z.number().min(1).max(100).default(10).describe("Number of trades to return"),
|
|
50
|
+
action: z.enum(["buy", "sell"]).optional().describe("Filter by trade type"),
|
|
51
|
+
kol: z.string().optional().describe("Filter by KOL wallet address"),
|
|
52
|
+
}, async ({ limit, action, kol }) => {
|
|
53
|
+
const params = { limit };
|
|
54
|
+
if (action)
|
|
55
|
+
params.action = action;
|
|
56
|
+
if (kol)
|
|
57
|
+
params.kol = kol;
|
|
58
|
+
return { content: [{ type: "text", text: await query("/api/x402/kol/feed", params) }] };
|
|
59
|
+
});
|
|
60
|
+
server.tool("madeonsol_kol_coordination", "Get KOL convergence signals — tokens being accumulated by multiple KOLs simultaneously. Costs $0.02 USDC per request via x402.", {
|
|
61
|
+
period: z.enum(["1h", "6h", "24h", "7d"]).default("24h").describe("Time period"),
|
|
62
|
+
min_kols: z.number().min(2).max(50).default(3).describe("Minimum KOLs converging"),
|
|
63
|
+
limit: z.number().min(1).max(50).default(20).describe("Number of results"),
|
|
64
|
+
}, async ({ period, min_kols, limit }) => ({
|
|
65
|
+
content: [{ type: "text", text: await query("/api/x402/kol/coordination", { period, min_kols, limit }) }],
|
|
66
|
+
}));
|
|
67
|
+
server.tool("madeonsol_kol_leaderboard", "Get KOL performance rankings by PnL and win rate. Costs $0.005 USDC per request via x402.", {
|
|
68
|
+
period: z.enum(["today", "7d", "30d"]).default("7d").describe("Time period"),
|
|
69
|
+
limit: z.number().min(1).max(50).default(20).describe("Number of KOLs"),
|
|
70
|
+
}, async ({ period, limit }) => ({
|
|
71
|
+
content: [{ type: "text", text: await query("/api/x402/kol/leaderboard", { period, limit }) }],
|
|
72
|
+
}));
|
|
73
|
+
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.", {
|
|
74
|
+
limit: z.number().min(1).max(100).default(10).describe("Number of alerts"),
|
|
75
|
+
offset: z.number().min(0).default(0).describe("Pagination offset"),
|
|
76
|
+
}, async ({ limit, offset }) => ({
|
|
77
|
+
content: [{ type: "text", text: await query("/api/x402/deployer-hunter/alerts", { limit, offset }) }],
|
|
78
|
+
}));
|
|
79
|
+
server.tool("madeonsol_discovery", "List all available MadeOnSol x402 API endpoints with prices and parameter docs. Free, no payment required.", {}, async () => {
|
|
80
|
+
const res = await fetch(new URL("/api/x402", BASE_URL).toString());
|
|
81
|
+
const data = await res.json();
|
|
82
|
+
return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
|
|
83
|
+
});
|
|
84
|
+
async function main() {
|
|
85
|
+
await initPayment();
|
|
86
|
+
const transport = new StdioServerTransport();
|
|
87
|
+
await server.connect(transport);
|
|
88
|
+
}
|
|
89
|
+
main().catch(console.error);
|
package/package.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "mcp-server-madeonsol",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "MCP server for MadeOnSol Solana KOL intelligence API — use from Claude, Cursor, or any MCP client",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"mcp-server-madeonsol": "dist/index.js"
|
|
8
|
+
},
|
|
9
|
+
"main": "dist/index.js",
|
|
10
|
+
"files": ["dist", "README.md"],
|
|
11
|
+
"scripts": {
|
|
12
|
+
"build": "tsc",
|
|
13
|
+
"prepublishOnly": ""
|
|
14
|
+
},
|
|
15
|
+
"keywords": ["mcp", "solana", "x402", "kol", "trading", "claude", "cursor"],
|
|
16
|
+
"license": "MIT",
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "https://github.com/LamboPoewert/mcp-server-madeonsol"
|
|
20
|
+
},
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"@modelcontextprotocol/sdk": "^1.12.1"
|
|
23
|
+
},
|
|
24
|
+
"peerDependencies": {
|
|
25
|
+
"@x402/fetch": ">=0.1.0",
|
|
26
|
+
"@x402/core": ">=0.1.0",
|
|
27
|
+
"@x402/svm": ">=0.1.0",
|
|
28
|
+
"@solana/kit": ">=2.0.0",
|
|
29
|
+
"@scure/base": ">=1.0.0"
|
|
30
|
+
}
|
|
31
|
+
}
|