mcp-server-madeonsol 1.15.0 → 1.15.1
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 +31 -0
- package/dist/index.d.ts +16 -1
- package/dist/index.js +34 -9
- package/glama.json +1 -1
- package/package.json +4 -2
package/README.md
CHANGED
|
@@ -65,6 +65,37 @@ Add to `claude_desktop_config.json` or Cursor MCP settings (free tier at https:/
|
|
|
65
65
|
|
|
66
66
|
Restart Claude Desktop and ask: *"What are KOLs buying right now?"*
|
|
67
67
|
|
|
68
|
+
## AI agent quickstart (x402 / pay-per-call)
|
|
69
|
+
|
|
70
|
+
Building an autonomous agent? Skip the signup. Point a **funded Solana wallet** at the server and every tool call **auto-pays a micropayment** over [x402](https://x402.org) — no API key, no account, no rate-limit dance.
|
|
71
|
+
|
|
72
|
+
```json
|
|
73
|
+
{
|
|
74
|
+
"mcpServers": {
|
|
75
|
+
"madeonsol": {
|
|
76
|
+
"command": "mcp-server-madeonsol",
|
|
77
|
+
"env": {
|
|
78
|
+
"SVM_PRIVATE_KEY": "<base58 solana private key>"
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
How it works:
|
|
86
|
+
|
|
87
|
+
- The wallet behind `SVM_PRIVATE_KEY` settles each request as a **USDC micropayment on Solana** (~$0.005–$0.02 per call, settled on-chain). No subscription, no quota.
|
|
88
|
+
- The free **`madeonsol_discovery`** tool needs no auth and returns every endpoint with its exact per-call price — call it first to see what each tool costs.
|
|
89
|
+
- Install the x402 peer deps alongside the server (only required for this mode):
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
npm install -g mcp-server-madeonsol @x402/fetch @x402/svm @x402/core @solana/kit @scure/base
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
> **Data only.** MadeOnSol returns trading *intelligence* — it never trades, signs swaps, or takes custody of funds. The only thing your wallet ever pays for is the per-call data fee.
|
|
96
|
+
|
|
97
|
+
Prefer a fixed monthly bill, free tier, or no wallet? Use the developer path below.
|
|
98
|
+
|
|
68
99
|
## Authentication
|
|
69
100
|
|
|
70
101
|
Two options (in priority order):
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,17 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
export
|
|
2
|
+
export type AuthMode = "madeonsol" | "x402" | "none";
|
|
3
|
+
/**
|
|
4
|
+
* Pure selection of the auth mode from environment. Extracted from initAuth()
|
|
5
|
+
* so the routing/auth-mode logic is unit-testable without setting up signers or
|
|
6
|
+
* network. Priority: MADEONSOL_API_KEY (Bearer) > SVM_PRIVATE_KEY (x402) > none.
|
|
7
|
+
*/
|
|
8
|
+
export declare function resolveAuthMode(env?: {
|
|
9
|
+
MADEONSOL_API_KEY?: string;
|
|
10
|
+
SVM_PRIVATE_KEY?: string;
|
|
11
|
+
}): AuthMode;
|
|
12
|
+
/**
|
|
13
|
+
* Pure path rewrite. Tools are authored against /api/x402/ paths. In x402 / none
|
|
14
|
+
* mode the path is kept as-is; in madeonsol (API key) mode the prefix is
|
|
15
|
+
* rewritten to /api/v1/. Extracted from query() so it is unit-testable.
|
|
16
|
+
*/
|
|
17
|
+
export declare function rewritePath(path: string, mode: AuthMode): string;
|
package/dist/index.js
CHANGED
|
@@ -11,7 +11,29 @@ const PORT = parseInt(process.env.PORT || "3100", 10);
|
|
|
11
11
|
const MODE = process.env.MCP_TRANSPORT || "stdio"; // "stdio" or "http"
|
|
12
12
|
let authMode = "none";
|
|
13
13
|
let paidFetch = fetch;
|
|
14
|
-
|
|
14
|
+
/**
|
|
15
|
+
* Pure selection of the auth mode from environment. Extracted from initAuth()
|
|
16
|
+
* so the routing/auth-mode logic is unit-testable without setting up signers or
|
|
17
|
+
* network. Priority: MADEONSOL_API_KEY (Bearer) > SVM_PRIVATE_KEY (x402) > none.
|
|
18
|
+
*/
|
|
19
|
+
export function resolveAuthMode(env = process.env) {
|
|
20
|
+
if (env.MADEONSOL_API_KEY)
|
|
21
|
+
return "madeonsol";
|
|
22
|
+
if (env.SVM_PRIVATE_KEY)
|
|
23
|
+
return "x402";
|
|
24
|
+
return "none";
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Pure path rewrite. Tools are authored against /api/x402/ paths. In x402 / none
|
|
28
|
+
* mode the path is kept as-is; in madeonsol (API key) mode the prefix is
|
|
29
|
+
* rewritten to /api/v1/. Extracted from query() so it is unit-testable.
|
|
30
|
+
*/
|
|
31
|
+
export function rewritePath(path, mode) {
|
|
32
|
+
return mode === "x402" || mode === "none"
|
|
33
|
+
? path
|
|
34
|
+
: path.replace("/api/x402/", "/api/v1/");
|
|
35
|
+
}
|
|
36
|
+
const UA = "mcp-server-madeonsol/1.15.1";
|
|
15
37
|
function apiKeyHeaders() {
|
|
16
38
|
const h = { "User-Agent": UA };
|
|
17
39
|
if (authMode === "madeonsol") {
|
|
@@ -20,12 +42,13 @@ function apiKeyHeaders() {
|
|
|
20
42
|
return h;
|
|
21
43
|
}
|
|
22
44
|
async function initAuth() {
|
|
23
|
-
|
|
45
|
+
const mode = resolveAuthMode({ MADEONSOL_API_KEY, SVM_PRIVATE_KEY: PRIVATE_KEY });
|
|
46
|
+
if (mode === "madeonsol") {
|
|
24
47
|
authMode = "madeonsol";
|
|
25
48
|
console.error("[madeonsol-mcp] Using MadeOnSol API key (Bearer auth)");
|
|
26
49
|
return;
|
|
27
50
|
}
|
|
28
|
-
if (PRIVATE_KEY) {
|
|
51
|
+
if (mode === "x402" && PRIVATE_KEY) {
|
|
29
52
|
try {
|
|
30
53
|
const { wrapFetchWithPayment } = await import("@x402/fetch");
|
|
31
54
|
const { x402Client } = await import("@x402/core/client");
|
|
@@ -50,9 +73,7 @@ async function initAuth() {
|
|
|
50
73
|
}
|
|
51
74
|
async function query(path, params) {
|
|
52
75
|
// API key uses /api/v1/ endpoints; x402 uses /api/x402/
|
|
53
|
-
const apiPath =
|
|
54
|
-
? path
|
|
55
|
-
: path.replace("/api/x402/", "/api/v1/");
|
|
76
|
+
const apiPath = rewritePath(path, authMode);
|
|
56
77
|
const url = new URL(apiPath, BASE_URL);
|
|
57
78
|
if (params) {
|
|
58
79
|
for (const [k, v] of Object.entries(params)) {
|
|
@@ -928,7 +949,7 @@ async function main() {
|
|
|
928
949
|
res.end(JSON.stringify({
|
|
929
950
|
name: "madeonsol",
|
|
930
951
|
description: "Solana KOL trading intelligence and deployer analytics. Real-time data from 1,000+ KOL wallets, 6,700+ Pump.fun deployers, 47,000+ scored alpha wallets, copy-trade rules, and wallet tracker. Supports MadeOnSol API key (msk_) or x402 micropayments.",
|
|
931
|
-
version: "1.
|
|
952
|
+
version: "1.15.1",
|
|
932
953
|
tools: [
|
|
933
954
|
{ name: "madeonsol_kol_feed", description: "Get real-time Solana KOL trades from 1,000+ tracked wallets." },
|
|
934
955
|
{ name: "madeonsol_kol_coordination", description: "Get KOL convergence signals — tokens multiple KOLs are accumulating." },
|
|
@@ -1013,7 +1034,7 @@ async function main() {
|
|
|
1013
1034
|
transport = new StreamableHTTPServerTransport({
|
|
1014
1035
|
sessionIdGenerator: undefined,
|
|
1015
1036
|
});
|
|
1016
|
-
const server = new McpServer({ name: "madeonsol", version: "1.
|
|
1037
|
+
const server = new McpServer({ name: "madeonsol", version: "1.15.1" });
|
|
1017
1038
|
registerTools(server);
|
|
1018
1039
|
await server.connect(transport);
|
|
1019
1040
|
}
|
|
@@ -1057,4 +1078,8 @@ async function main() {
|
|
|
1057
1078
|
await server.connect(transport);
|
|
1058
1079
|
}
|
|
1059
1080
|
}
|
|
1060
|
-
|
|
1081
|
+
// Only auto-run when executed as a program (CLI / spawned process), not when
|
|
1082
|
+
// the module is imported by a test for its exported pure helpers.
|
|
1083
|
+
if (process.env.MADEONSOL_MCP_NO_AUTORUN !== "1") {
|
|
1084
|
+
main().catch(console.error);
|
|
1085
|
+
}
|
package/glama.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "mcp-server-madeonsol",
|
|
3
3
|
"display_name": "MadeOnSol — Solana memecoin intelligence",
|
|
4
4
|
"description": "Real-time Solana memecoin trading intelligence — track 1,000+ KOL wallets with <3s latency, score 6,700+ Pump.fun deployers, surface multi-KOL coordination signals, run server-side copy-trade rules, and stream every DEX trade across 9+ programs. Backtested first-touch scout signal (S-tier scouts attract ≥3 follow-on KOLs ~50% of the time vs 14% baseline). Free tier 200 requests per day; auth via msk_ API key or x402 micropayments.",
|
|
5
|
-
"version": "1.
|
|
5
|
+
"version": "1.15.1",
|
|
6
6
|
"homepage": "https://madeonsol.com/solana-api",
|
|
7
7
|
"repository": "https://github.com/LamboPoewert/mcp-server-madeonsol",
|
|
8
8
|
"license": "MIT",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mcp-server-madeonsol",
|
|
3
|
-
"version": "1.15.
|
|
3
|
+
"version": "1.15.1",
|
|
4
4
|
"mcpName": "io.github.LamboPoewert/madeonsol",
|
|
5
5
|
"description": "MCP server for MadeOnSol Solana KOL intelligence API — use from Claude, Cursor, or any MCP client",
|
|
6
6
|
"type": "module",
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
],
|
|
17
17
|
"scripts": {
|
|
18
18
|
"build": "tsc",
|
|
19
|
+
"test": "vitest run",
|
|
19
20
|
"preflight": "bash ../../scripts/preflight-publish.sh",
|
|
20
21
|
"prepublishOnly": "npm run preflight && npm run build"
|
|
21
22
|
},
|
|
@@ -61,6 +62,7 @@
|
|
|
61
62
|
},
|
|
62
63
|
"devDependencies": {
|
|
63
64
|
"@types/node": "^20",
|
|
64
|
-
"typescript": "^5"
|
|
65
|
+
"typescript": "^5",
|
|
66
|
+
"vitest": "^4.1.5"
|
|
65
67
|
}
|
|
66
68
|
}
|