@onchainpulse/mcp-server 1.0.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/README.md +52 -0
- package/index.js +84 -0
- package/package.json +27 -0
package/README.md
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# OnChain Pulse MCP Server
|
|
2
|
+
|
|
3
|
+
Official Model Context Protocol (MCP) server for OnChain Pulse Intelligence. This server provides a secure bridge between AI agents and real-time institutional blockchain data.
|
|
4
|
+
|
|
5
|
+
## 🔐 Hybrid-Auth V3 Architecture
|
|
6
|
+
|
|
7
|
+
This server supports two methods of authentication and monetization:
|
|
8
|
+
|
|
9
|
+
1. **SaaS Mode (API Key):** Users with an active OnChain Pulse account can use their `PULSE_API_KEY`. Credits are deducted from their Cerebro balance ($0.05 per query).
|
|
10
|
+
2. **Agentic Mode (x402 / Solana Pay):** Autonomous agents can bypass API keys by providing a valid Solana transaction hash (`x-solana-pay-tx`) for 0.05 SOL.
|
|
11
|
+
|
|
12
|
+
## 🛠️ Tools Available
|
|
13
|
+
|
|
14
|
+
- `get_latest_alpha`: Intercept high-conviction institutional whale movements.
|
|
15
|
+
- `check_wallet_reputation`: Verify insider status and wallet intent.
|
|
16
|
+
- `get_terminal_stats`: Access global performance metrics (Win Rate, Avg ROI).
|
|
17
|
+
|
|
18
|
+
## 🚀 Installation
|
|
19
|
+
|
|
20
|
+
### 1. Via NPX (Recommended for Agents)
|
|
21
|
+
```bash
|
|
22
|
+
export PULSE_API_KEY=your_key_here
|
|
23
|
+
npx @onchainpulse/mcp-server
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### 2. Manual Config (Claude Desktop)
|
|
27
|
+
Add this to your `claude_desktop_config.json`:
|
|
28
|
+
|
|
29
|
+
```json
|
|
30
|
+
{
|
|
31
|
+
"mcpServers": {
|
|
32
|
+
"onchain-pulse": {
|
|
33
|
+
"command": "npx",
|
|
34
|
+
"args": ["-y", "@onchainpulse/mcp-server"],
|
|
35
|
+
"env": {
|
|
36
|
+
"PULSE_API_KEY": "YOUR_ACTUAL_API_KEY"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## 🛡️ Security Mandate
|
|
44
|
+
|
|
45
|
+
- **Stateless:** The server does not store any keys locally. All authentication is injected via environment variables.
|
|
46
|
+
- **Sanitized:** All error messages are sanitized to prevent API key leaks in logs.
|
|
47
|
+
- **Anti-Replay:** The x402 system includes a 10-minute window and a global registry of processed transaction hashes to prevent double-spending.
|
|
48
|
+
|
|
49
|
+
## 📄 Support
|
|
50
|
+
|
|
51
|
+
Technical specs: [https://onchainpulse.online/pulse-mcp](https://onchainpulse.online/pulse-mcp)
|
|
52
|
+
Developer support: `robinaffiliateclaw@gmail.com`
|
package/index.js
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
3
|
+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
4
|
+
import { CallToolRequestSchema, ListToolsRequestSchema } from "@modelcontextprotocol/sdk/types.js";
|
|
5
|
+
import fetch from "node-fetch";
|
|
6
|
+
|
|
7
|
+
const API_KEY = process.env.PULSE_API_KEY;
|
|
8
|
+
const API_URL = "http://178.156.252.122:3001/api/v1/mcp";
|
|
9
|
+
|
|
10
|
+
if (!API_KEY) {
|
|
11
|
+
console.error("Error: PULSE_API_KEY environment variable is required.");
|
|
12
|
+
process.exit(1);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const server = new Server({
|
|
16
|
+
name: "onchain-pulse",
|
|
17
|
+
version: "1.0.0",
|
|
18
|
+
}, {
|
|
19
|
+
capabilities: { tools: {} }
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
23
|
+
tools: [
|
|
24
|
+
{
|
|
25
|
+
name: "get_latest_alpha",
|
|
26
|
+
description: "Obtain the most recent institutional whale signals from OnChain Pulse.",
|
|
27
|
+
inputSchema: {
|
|
28
|
+
type: "object",
|
|
29
|
+
properties: {
|
|
30
|
+
limit: { type: "number", default: 5, description: "Number of signals to retrieve." }
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
name: "check_wallet_reputation",
|
|
36
|
+
description: "Verify if a wallet address is a known 'Insider' or 'Smart Wallet'.",
|
|
37
|
+
inputSchema: {
|
|
38
|
+
type: "object",
|
|
39
|
+
properties: {
|
|
40
|
+
address: { type: "string", description: "The Solana or Base address to check." }
|
|
41
|
+
},
|
|
42
|
+
required: ["address"]
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
name: "get_terminal_stats",
|
|
47
|
+
description: "Get global performance metrics (Win Rate, Avg ROI) from the OnChain Pulse ecosystem.",
|
|
48
|
+
inputSchema: { type: "object", properties: {} }
|
|
49
|
+
}
|
|
50
|
+
]
|
|
51
|
+
}));
|
|
52
|
+
|
|
53
|
+
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
54
|
+
const { name, arguments: args } = request.params;
|
|
55
|
+
|
|
56
|
+
let action;
|
|
57
|
+
if (name === "get_latest_alpha") action = "get_signals";
|
|
58
|
+
else if (name === "check_wallet_reputation") action = "check_reputation";
|
|
59
|
+
else if (name === "get_terminal_stats") action = "get_stats";
|
|
60
|
+
|
|
61
|
+
try {
|
|
62
|
+
const res = await fetch(API_URL, {
|
|
63
|
+
method: "POST",
|
|
64
|
+
headers: { "Content-Type": "application/json", "x-pulse-key": API_KEY },
|
|
65
|
+
body: JSON.stringify({
|
|
66
|
+
action,
|
|
67
|
+
payload: args
|
|
68
|
+
})
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
const data = await res.json();
|
|
72
|
+
return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
|
|
73
|
+
} catch (error) {
|
|
74
|
+
return { content: [{ type: "text", text: `Error connecting to Pulse: ${error.message}` }], isError: true };
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
async function run() {
|
|
79
|
+
const transport = new StdioServerTransport();
|
|
80
|
+
await server.connect(transport);
|
|
81
|
+
console.error("OnChain Pulse MCP Server running");
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
run().catch(console.error);
|
package/package.json
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@onchainpulse/mcp-server",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Official OnChain Pulse MCP Server. Real-time institutional liquidity surveillance for AI agents.",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"bin": {
|
|
8
|
+
"onchainpulse-mcp": "./index.js"
|
|
9
|
+
},
|
|
10
|
+
"scripts": {
|
|
11
|
+
"start": "node index.js"
|
|
12
|
+
},
|
|
13
|
+
"keywords": [
|
|
14
|
+
"mcp",
|
|
15
|
+
"onchain-pulse",
|
|
16
|
+
"ai-agents",
|
|
17
|
+
"blockchain",
|
|
18
|
+
"solana",
|
|
19
|
+
"alpha"
|
|
20
|
+
],
|
|
21
|
+
"author": "OnChain Pulse",
|
|
22
|
+
"license": "ISC",
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"@modelcontextprotocol/sdk": "^1.0.1",
|
|
25
|
+
"node-fetch": "^3.3.2"
|
|
26
|
+
}
|
|
27
|
+
}
|