gank-mcp-server 2.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/README.md +136 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +100 -0
- package/dist/index.js.map +1 -0
- package/dist/tools/info.d.ts +22 -0
- package/dist/tools/info.d.ts.map +1 -0
- package/dist/tools/info.js +184 -0
- package/dist/tools/info.js.map +1 -0
- package/dist/tools/launch.d.ts +23 -0
- package/dist/tools/launch.d.ts.map +1 -0
- package/dist/tools/launch.js +354 -0
- package/dist/tools/launch.js.map +1 -0
- package/dist/tools/trading.d.ts +12 -0
- package/dist/tools/trading.d.ts.map +1 -0
- package/dist/tools/trading.js +136 -0
- package/dist/tools/trading.js.map +1 -0
- package/dist/tools/wallets.d.ts +21 -0
- package/dist/tools/wallets.d.ts.map +1 -0
- package/dist/tools/wallets.js +273 -0
- package/dist/tools/wallets.js.map +1 -0
- package/package.json +47 -0
package/README.md
ADDED
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
# Playbot MCP Server
|
|
2
|
+
|
|
3
|
+
Enable AI agents to trade on Solana via the Playbot API. Works with Claude, Windsurf, Cursor, and any MCP-compatible AI.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- **Token Launches** - Create and launch tokens on pump.fun with dev buys
|
|
8
|
+
- **Trading** - Buy and sell tokens with customizable slippage
|
|
9
|
+
- **Wallet Management** - Create wallets, check balances, transfer SOL
|
|
10
|
+
- **Swarm & Volume** - Distributed buying and volume generation
|
|
11
|
+
- **Positions & Fees** - Track holdings and claim creator fees
|
|
12
|
+
|
|
13
|
+
## Installation
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm install -g playbot-mcp-server
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Configuration
|
|
20
|
+
|
|
21
|
+
Set your API key as an environment variable:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
export PLAYBOT_API_KEY="your-api-key-here"
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Get your API key from [gank.dev](https://gank.dev) → Profile → API Keys
|
|
28
|
+
|
|
29
|
+
### Optional Configuration
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
# Custom API URL (default: https://gank.dev/api/v2)
|
|
33
|
+
export PLAYBOT_API_URL="https://gank.dev/api/v2"
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Usage with Claude Desktop
|
|
37
|
+
|
|
38
|
+
Add to your Claude Desktop config (`~/Library/Application Support/Claude/claude_desktop_config.json`):
|
|
39
|
+
|
|
40
|
+
```json
|
|
41
|
+
{
|
|
42
|
+
"mcpServers": {
|
|
43
|
+
"playbot": {
|
|
44
|
+
"command": "playbot-mcp",
|
|
45
|
+
"env": {
|
|
46
|
+
"PLAYBOT_API_KEY": "your-api-key-here"
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Usage with Windsurf/Cursor
|
|
54
|
+
|
|
55
|
+
Add to your MCP settings:
|
|
56
|
+
|
|
57
|
+
```json
|
|
58
|
+
{
|
|
59
|
+
"mcpServers": {
|
|
60
|
+
"playbot": {
|
|
61
|
+
"command": "npx",
|
|
62
|
+
"args": ["playbot-mcp-server"],
|
|
63
|
+
"env": {
|
|
64
|
+
"PLAYBOT_API_KEY": "your-api-key-here"
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Available Tools
|
|
72
|
+
|
|
73
|
+
### Trading
|
|
74
|
+
- `buy_token` - Buy a token with SOL
|
|
75
|
+
- `sell_token` - Sell a percentage of holdings
|
|
76
|
+
- `get_token_price` - Get current token price
|
|
77
|
+
|
|
78
|
+
### Wallets
|
|
79
|
+
- `list_wallets` - List all your wallets
|
|
80
|
+
- `get_wallet_balance` - Check SOL and token balances
|
|
81
|
+
- `create_wallet` - Create a new wallet
|
|
82
|
+
- `fund_wallet` - Transfer SOL between wallets
|
|
83
|
+
- `consolidate_wallets` - Consolidate SOL from child wallets
|
|
84
|
+
|
|
85
|
+
### Launches
|
|
86
|
+
- `launch_token` - Launch a new token on pump.fun
|
|
87
|
+
- `get_launch_status` - Check launch progress
|
|
88
|
+
- `execute_snipe` - Snipe a newly launched token
|
|
89
|
+
- `run_volume_bot` - Generate trading volume
|
|
90
|
+
|
|
91
|
+
### Info
|
|
92
|
+
- `get_positions` - View all token holdings
|
|
93
|
+
- `get_account_info` - Account details and limits
|
|
94
|
+
- `get_pending_fees` - Check unclaimed creator fees
|
|
95
|
+
- `claim_creator_fees` - Claim all pending fees
|
|
96
|
+
- `search_tokens` - Search for tokens
|
|
97
|
+
- `get_trending_tokens` - Get trending tokens
|
|
98
|
+
- `get_trade_history` - View trade history
|
|
99
|
+
- `vamp_all` - Sell everything and consolidate
|
|
100
|
+
|
|
101
|
+
## Examples
|
|
102
|
+
|
|
103
|
+
### Launch a Token
|
|
104
|
+
|
|
105
|
+
```
|
|
106
|
+
AI: Use the launch_token tool to create a token called "Test Token" with symbol "TEST" and description "A test token for AI trading"
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### Buy a Token
|
|
110
|
+
|
|
111
|
+
```
|
|
112
|
+
AI: Buy 0.1 SOL worth of token ABC123...pump
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### Check Positions
|
|
116
|
+
|
|
117
|
+
```
|
|
118
|
+
AI: Show me all my current token positions
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## Security
|
|
122
|
+
|
|
123
|
+
- API keys are transmitted securely over HTTPS
|
|
124
|
+
- Keys are never logged or stored by the MCP server
|
|
125
|
+
- Each API key is scoped to a single user account
|
|
126
|
+
- Rate limits apply based on your account tier
|
|
127
|
+
|
|
128
|
+
## Support
|
|
129
|
+
|
|
130
|
+
- Documentation: [docs.playbot.gg](https://docs.playbot.gg)
|
|
131
|
+
- Discord: [discord.gg/playbot](https://discord.gg/playbot)
|
|
132
|
+
- Twitter: [@playaborgg](https://twitter.com/playaborgg)
|
|
133
|
+
|
|
134
|
+
## License
|
|
135
|
+
|
|
136
|
+
MIT
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Gank MCP Server
|
|
4
|
+
*
|
|
5
|
+
* Enables AI agents to trade on Solana via the Gank API.
|
|
6
|
+
* Supports token launches, buying, selling, wallet management, and more.
|
|
7
|
+
*
|
|
8
|
+
* Configuration via environment variables:
|
|
9
|
+
* - GANK_API_URL: API base URL (default: https://gank.dev/api/v2)
|
|
10
|
+
* - GANK_API_KEY: Your API key for authentication
|
|
11
|
+
*/
|
|
12
|
+
export declare function apiCall(method: "GET" | "POST" | "PUT" | "DELETE", path: string, body?: any): Promise<any>;
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;;;;;;GASG;AA0BH,wBAAsB,OAAO,CAC3B,MAAM,EAAE,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,QAAQ,EACzC,IAAI,EAAE,MAAM,EACZ,IAAI,CAAC,EAAE,GAAG,GACT,OAAO,CAAC,GAAG,CAAC,CAkBd"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Gank MCP Server
|
|
4
|
+
*
|
|
5
|
+
* Enables AI agents to trade on Solana via the Gank API.
|
|
6
|
+
* Supports token launches, buying, selling, wallet management, and more.
|
|
7
|
+
*
|
|
8
|
+
* Configuration via environment variables:
|
|
9
|
+
* - GANK_API_URL: API base URL (default: https://gank.dev/api/v2)
|
|
10
|
+
* - GANK_API_KEY: Your API key for authentication
|
|
11
|
+
*/
|
|
12
|
+
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
13
|
+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
14
|
+
import { CallToolRequestSchema, ListToolsRequestSchema, } from "@modelcontextprotocol/sdk/types.js";
|
|
15
|
+
import { tradingTools, handleTradingTool } from "./tools/trading.js";
|
|
16
|
+
import { walletTools, handleWalletTool } from "./tools/wallets.js";
|
|
17
|
+
import { launchTools, handleLaunchTool } from "./tools/launch.js";
|
|
18
|
+
import { infoTools, handleInfoTool } from "./tools/info.js";
|
|
19
|
+
// API Configuration
|
|
20
|
+
const API_URL = process.env.GANK_API_URL || process.env.PLAYBOT_API_URL || "https://gank.dev/api/v2";
|
|
21
|
+
const API_KEY = process.env.GANK_API_KEY || process.env.PLAYBOT_API_KEY;
|
|
22
|
+
if (!API_KEY) {
|
|
23
|
+
console.error("Error: GANK_API_KEY environment variable is required");
|
|
24
|
+
console.error("Get your API key from https://gank.dev → Profile → API Keys");
|
|
25
|
+
process.exit(1);
|
|
26
|
+
}
|
|
27
|
+
// HTTP client for API calls
|
|
28
|
+
export async function apiCall(method, path, body) {
|
|
29
|
+
const url = `${API_URL}${path}`;
|
|
30
|
+
const response = await fetch(url, {
|
|
31
|
+
method,
|
|
32
|
+
headers: {
|
|
33
|
+
"Content-Type": "application/json",
|
|
34
|
+
"Authorization": `Bearer ${API_KEY}`,
|
|
35
|
+
},
|
|
36
|
+
body: body ? JSON.stringify(body) : undefined,
|
|
37
|
+
});
|
|
38
|
+
if (!response.ok) {
|
|
39
|
+
const error = await response.text();
|
|
40
|
+
throw new Error(`API Error ${response.status}: ${error}`);
|
|
41
|
+
}
|
|
42
|
+
return response.json();
|
|
43
|
+
}
|
|
44
|
+
// Collect all tools
|
|
45
|
+
const allTools = [
|
|
46
|
+
...tradingTools,
|
|
47
|
+
...walletTools,
|
|
48
|
+
...launchTools,
|
|
49
|
+
...infoTools,
|
|
50
|
+
];
|
|
51
|
+
// Create MCP server
|
|
52
|
+
const server = new Server({
|
|
53
|
+
name: "gank-mcp",
|
|
54
|
+
version: "1.0.0",
|
|
55
|
+
}, {
|
|
56
|
+
capabilities: {
|
|
57
|
+
tools: {},
|
|
58
|
+
},
|
|
59
|
+
});
|
|
60
|
+
// List available tools
|
|
61
|
+
server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
62
|
+
return { tools: allTools };
|
|
63
|
+
});
|
|
64
|
+
// Handle tool calls
|
|
65
|
+
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
66
|
+
const { name, arguments: args } = request.params;
|
|
67
|
+
try {
|
|
68
|
+
// Route to appropriate handler
|
|
69
|
+
if (tradingTools.some(t => t.name === name)) {
|
|
70
|
+
return await handleTradingTool(name, args || {});
|
|
71
|
+
}
|
|
72
|
+
if (walletTools.some(t => t.name === name)) {
|
|
73
|
+
return await handleWalletTool(name, args || {});
|
|
74
|
+
}
|
|
75
|
+
if (launchTools.some(t => t.name === name)) {
|
|
76
|
+
return await handleLaunchTool(name, args || {});
|
|
77
|
+
}
|
|
78
|
+
if (infoTools.some(t => t.name === name)) {
|
|
79
|
+
return await handleInfoTool(name, args || {});
|
|
80
|
+
}
|
|
81
|
+
return {
|
|
82
|
+
content: [{ type: "text", text: `Unknown tool: ${name}` }],
|
|
83
|
+
isError: true,
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
catch (error) {
|
|
87
|
+
return {
|
|
88
|
+
content: [{ type: "text", text: `Error: ${error.message}` }],
|
|
89
|
+
isError: true,
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
// Start server
|
|
94
|
+
async function main() {
|
|
95
|
+
const transport = new StdioServerTransport();
|
|
96
|
+
await server.connect(transport);
|
|
97
|
+
console.error("Gank MCP Server running");
|
|
98
|
+
}
|
|
99
|
+
main().catch(console.error);
|
|
100
|
+
//# sourceMappingURL=index.js.map
|
|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AAO,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Info tools - Account info, positions, fees, and market data
|
|
3
|
+
*
|
|
4
|
+
* Routes (v2 API):
|
|
5
|
+
* GET /auth/me - account info
|
|
6
|
+
* GET /auth/user-stats - user stats (level, points)
|
|
7
|
+
* GET /user/positions - token positions
|
|
8
|
+
* GET /fees/creator - pending creator fees
|
|
9
|
+
* POST /fees/creator/claim - claim creator fees
|
|
10
|
+
* GET /search?q= - search tokens
|
|
11
|
+
* GET /token/:mint - token info + price
|
|
12
|
+
* POST /phases/vamp/execute - vamp (sell + consolidate)
|
|
13
|
+
*/
|
|
14
|
+
import { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
15
|
+
export declare const infoTools: Tool[];
|
|
16
|
+
export declare function handleInfoTool(name: string, args: Record<string, any>): Promise<{
|
|
17
|
+
content: {
|
|
18
|
+
type: string;
|
|
19
|
+
text: string;
|
|
20
|
+
}[];
|
|
21
|
+
}>;
|
|
22
|
+
//# sourceMappingURL=info.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"info.d.ts","sourceRoot":"","sources":["../../src/tools/info.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAG1D,eAAO,MAAM,SAAS,EAAE,IAAI,EAsF3B,CAAC;AAEF,wBAAsB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;;;;;GAwF3E"}
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Info tools - Account info, positions, fees, and market data
|
|
3
|
+
*
|
|
4
|
+
* Routes (v2 API):
|
|
5
|
+
* GET /auth/me - account info
|
|
6
|
+
* GET /auth/user-stats - user stats (level, points)
|
|
7
|
+
* GET /user/positions - token positions
|
|
8
|
+
* GET /fees/creator - pending creator fees
|
|
9
|
+
* POST /fees/creator/claim - claim creator fees
|
|
10
|
+
* GET /search?q= - search tokens
|
|
11
|
+
* GET /token/:mint - token info + price
|
|
12
|
+
* POST /phases/vamp/execute - vamp (sell + consolidate)
|
|
13
|
+
*/
|
|
14
|
+
import { apiCall } from "../index.js";
|
|
15
|
+
export const infoTools = [
|
|
16
|
+
{
|
|
17
|
+
name: "get_positions",
|
|
18
|
+
description: "Get all current token positions (holdings) across all wallets",
|
|
19
|
+
inputSchema: {
|
|
20
|
+
type: "object",
|
|
21
|
+
properties: {},
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
name: "get_account_info",
|
|
26
|
+
description: "Get account information including user handle, referral code, and creation date",
|
|
27
|
+
inputSchema: {
|
|
28
|
+
type: "object",
|
|
29
|
+
properties: {},
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
name: "get_user_stats",
|
|
34
|
+
description: "Get user stats including level, points, total trades, and total volume",
|
|
35
|
+
inputSchema: {
|
|
36
|
+
type: "object",
|
|
37
|
+
properties: {},
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
name: "get_pending_fees",
|
|
42
|
+
description: "Get pending creator fees that can be claimed from pump.fun",
|
|
43
|
+
inputSchema: {
|
|
44
|
+
type: "object",
|
|
45
|
+
properties: {},
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
name: "claim_creator_fees",
|
|
50
|
+
description: "Claim all pending creator fees from tokens you've launched",
|
|
51
|
+
inputSchema: {
|
|
52
|
+
type: "object",
|
|
53
|
+
properties: {},
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
name: "search_tokens",
|
|
58
|
+
description: "Search for tokens by name, symbol, or address",
|
|
59
|
+
inputSchema: {
|
|
60
|
+
type: "object",
|
|
61
|
+
properties: {
|
|
62
|
+
query: {
|
|
63
|
+
type: "string",
|
|
64
|
+
description: "Search query",
|
|
65
|
+
},
|
|
66
|
+
limit: {
|
|
67
|
+
type: "number",
|
|
68
|
+
description: "Maximum results to return (default: 10)",
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
required: ["query"],
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
name: "vamp_all",
|
|
76
|
+
description: "FULL RECOVERY: Discover ALL tokens on source wallets, sell everything (100%), close empty token accounts to recover rent (~0.002 SOL each), and transfer all remaining SOL to destination. Use this to recover all funds from wallets.",
|
|
77
|
+
inputSchema: {
|
|
78
|
+
type: "object",
|
|
79
|
+
properties: {
|
|
80
|
+
source_wallets: {
|
|
81
|
+
type: "array",
|
|
82
|
+
items: { type: "string" },
|
|
83
|
+
description: "Array of wallet addresses to vamp from",
|
|
84
|
+
},
|
|
85
|
+
destination_wallet: {
|
|
86
|
+
type: "string",
|
|
87
|
+
description: "Wallet address to send all recovered SOL to",
|
|
88
|
+
},
|
|
89
|
+
close_accounts: {
|
|
90
|
+
type: "boolean",
|
|
91
|
+
description: "Close empty token accounts to recover rent (default: true)",
|
|
92
|
+
},
|
|
93
|
+
slippage_bps: {
|
|
94
|
+
type: "number",
|
|
95
|
+
description: "Slippage for sells in basis points (default: 2000 = 20%)",
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
required: ["source_wallets", "destination_wallet"],
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
];
|
|
102
|
+
export async function handleInfoTool(name, args) {
|
|
103
|
+
switch (name) {
|
|
104
|
+
case "get_positions": {
|
|
105
|
+
const result = await apiCall("GET", "/user/positions");
|
|
106
|
+
return {
|
|
107
|
+
content: [{
|
|
108
|
+
type: "text",
|
|
109
|
+
text: JSON.stringify(result, null, 2),
|
|
110
|
+
}],
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
case "get_account_info": {
|
|
114
|
+
const result = await apiCall("GET", "/auth/me");
|
|
115
|
+
return {
|
|
116
|
+
content: [{
|
|
117
|
+
type: "text",
|
|
118
|
+
text: JSON.stringify({
|
|
119
|
+
success: result.success,
|
|
120
|
+
user: result.user,
|
|
121
|
+
}, null, 2),
|
|
122
|
+
}],
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
case "get_user_stats": {
|
|
126
|
+
const result = await apiCall("GET", "/auth/user-stats");
|
|
127
|
+
return {
|
|
128
|
+
content: [{
|
|
129
|
+
type: "text",
|
|
130
|
+
text: JSON.stringify(result, null, 2),
|
|
131
|
+
}],
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
case "get_pending_fees": {
|
|
135
|
+
const result = await apiCall("GET", "/fees/creator");
|
|
136
|
+
return {
|
|
137
|
+
content: [{
|
|
138
|
+
type: "text",
|
|
139
|
+
text: JSON.stringify(result, null, 2),
|
|
140
|
+
}],
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
case "claim_creator_fees": {
|
|
144
|
+
const result = await apiCall("POST", "/fees/creator/claim");
|
|
145
|
+
return {
|
|
146
|
+
content: [{
|
|
147
|
+
type: "text",
|
|
148
|
+
text: JSON.stringify(result, null, 2),
|
|
149
|
+
}],
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
case "search_tokens": {
|
|
153
|
+
const result = await apiCall("GET", `/search?q=${encodeURIComponent(args.query)}&limit=${args.limit || 10}`);
|
|
154
|
+
return {
|
|
155
|
+
content: [{
|
|
156
|
+
type: "text",
|
|
157
|
+
text: JSON.stringify(result, null, 2),
|
|
158
|
+
}],
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
case "vamp_all": {
|
|
162
|
+
const result = await apiCall("POST", "/wallets/vamp-all", {
|
|
163
|
+
source_wallets: args.source_wallets,
|
|
164
|
+
destination_wallet: args.destination_wallet,
|
|
165
|
+
close_accounts: args.close_accounts !== false,
|
|
166
|
+
slippage_bps: args.slippage_bps || 2000,
|
|
167
|
+
});
|
|
168
|
+
return {
|
|
169
|
+
content: [{
|
|
170
|
+
type: "text",
|
|
171
|
+
text: JSON.stringify({
|
|
172
|
+
success: result.success,
|
|
173
|
+
summary: result.summary,
|
|
174
|
+
destination: result.destination_wallet,
|
|
175
|
+
results: result.results,
|
|
176
|
+
}, null, 2),
|
|
177
|
+
}],
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
default:
|
|
181
|
+
throw new Error(`Unknown info tool: ${name}`);
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
//# sourceMappingURL=info.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"info.js","sourceRoot":"","sources":["../../src/tools/info.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,MAAM,CAAC,MAAM,SAAS,GAAW;IAC/B;QACE,IAAI,EAAE,eAAe;QACrB,WAAW,EAAE,+DAA+D;QAC5E,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE,EAAE;SACf;KACF;IACD;QACE,IAAI,EAAE,kBAAkB;QACxB,WAAW,EAAE,iFAAiF;QAC9F,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE,EAAE;SACf;KACF;IACD;QACE,IAAI,EAAE,gBAAgB;QACtB,WAAW,EAAE,wEAAwE;QACrF,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE,EAAE;SACf;KACF;IACD;QACE,IAAI,EAAE,kBAAkB;QACxB,WAAW,EAAE,4DAA4D;QACzE,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE,EAAE;SACf;KACF;IACD;QACE,IAAI,EAAE,oBAAoB;QAC1B,WAAW,EAAE,4DAA4D;QACzE,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE,EAAE;SACf;KACF;IACD;QACE,IAAI,EAAE,eAAe;QACrB,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/offchain - create offchain token record
|
|
7
|
+
* GET /launch/history - list user launches
|
|
8
|
+
* GET /launch/:id - launch details + phases
|
|
9
|
+
* GET /launch/by-token/:mint - lookup launch by token mint
|
|
10
|
+
* POST /sniper/execute - snipe a token
|
|
11
|
+
* POST /phases/volume/start - start volume bot
|
|
12
|
+
* POST /phases/volume/stop - stop volume bot
|
|
13
|
+
* POST /phases/swarm/buy - swarm buy (parallel multi-wallet)
|
|
14
|
+
*/
|
|
15
|
+
import { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
16
|
+
export declare const launchTools: Tool[];
|
|
17
|
+
export declare function handleLaunchTool(name: string, args: Record<string, any>): Promise<{
|
|
18
|
+
content: {
|
|
19
|
+
type: string;
|
|
20
|
+
text: string;
|
|
21
|
+
}[];
|
|
22
|
+
}>;
|
|
23
|
+
//# sourceMappingURL=launch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"launch.d.ts","sourceRoot":"","sources":["../../src/tools/launch.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAG1D,eAAO,MAAM,WAAW,EAAE,IAAI,EAuM7B,CAAC;AAEF,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;;;;;GAiJ7E"}
|