solafon-mcp 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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Solafon
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 ADDED
@@ -0,0 +1,138 @@
1
+ # solafon-mcp
2
+
3
+ Model Context Protocol server for building bots and interacting with Solana wallet on the [Solafon](https://solafon.com) platform.
4
+
5
+ Connect this MCP server to **Claude Desktop**, **Cursor**, **VS Code**, or any MCP-compatible AI tool to build Solafon mini-apps using natural language.
6
+
7
+ ## Quick Start
8
+
9
+ ### Claude Desktop
10
+
11
+ Add to `~/Library/Application Support/Claude/claude_desktop_config.json`:
12
+
13
+ ```json
14
+ {
15
+ "mcpServers": {
16
+ "solafon": {
17
+ "command": "npx",
18
+ "args": ["-y", "solafon-mcp"],
19
+ "env": {
20
+ "SOLAFON_BOT_TOKEN": "your-bot-api-key-here"
21
+ }
22
+ }
23
+ }
24
+ }
25
+ ```
26
+
27
+ ### Cursor
28
+
29
+ Add to `.cursor/mcp.json` in your project:
30
+
31
+ ```json
32
+ {
33
+ "mcpServers": {
34
+ "solafon": {
35
+ "command": "npx",
36
+ "args": ["-y", "solafon-mcp"],
37
+ "env": {
38
+ "SOLAFON_BOT_TOKEN": "your-bot-api-key-here"
39
+ }
40
+ }
41
+ }
42
+ }
43
+ ```
44
+
45
+ ### VS Code
46
+
47
+ Add to your VS Code MCP settings:
48
+
49
+ ```json
50
+ {
51
+ "mcp": {
52
+ "servers": {
53
+ "solafon": {
54
+ "command": "npx",
55
+ "args": ["-y", "solafon-mcp"],
56
+ "env": {
57
+ "SOLAFON_BOT_TOKEN": "your-bot-api-key-here"
58
+ }
59
+ }
60
+ }
61
+ }
62
+ }
63
+ ```
64
+
65
+ ## Requirements
66
+
67
+ - **Node.js 18+** (no other dependencies needed)
68
+
69
+ ## Available Tools
70
+
71
+ ### Bot API
72
+
73
+ | Tool | Description |
74
+ |------|-------------|
75
+ | `get_bot_info` | Get your bot's app info |
76
+ | `send_message` | Send text, images, buttons, carousels |
77
+ | `edit_message` | Edit a previously sent message |
78
+ | `delete_message` | Delete a message |
79
+ | `list_conversations` | List all bot conversations |
80
+ | `get_conversation_messages` | Read messages in a conversation |
81
+ | `get_user` | Get user info |
82
+ | `set_webhook` | Configure webhook URL |
83
+ | `set_welcome_message` | Set greeting for new users |
84
+
85
+ ### Wallet API
86
+
87
+ | Tool | Description |
88
+ |------|-------------|
89
+ | `get_wallet_balance` | SOL + token balances with USD values |
90
+ | `get_token_list` | Supported tokens with metadata |
91
+ | `get_token_prices` | Current USD prices |
92
+ | `get_transaction_history` | Wallet transaction history |
93
+ | `get_transaction_status` | Check transaction confirmation |
94
+ | `get_latest_blockhash` | Get blockhash for transactions |
95
+ | `send_transaction` | Broadcast signed transaction |
96
+ | `simulate_transaction` | Simulate before sending |
97
+
98
+ ## Prompts (Templates)
99
+
100
+ | Prompt | Description |
101
+ |--------|-------------|
102
+ | `create_echo_bot` | Step-by-step echo bot guide |
103
+ | `create_wallet_checker_bot` | Bot that checks wallet balances |
104
+ | `create_interactive_menu_bot` | Bot with button menus and callbacks |
105
+
106
+ ## Environment Variables
107
+
108
+ | Variable | Required | Default | Description |
109
+ |----------|----------|---------|-------------|
110
+ | `SOLAFON_BOT_TOKEN` | Yes | — | Bot API token from developer portal |
111
+ | `SOLAFON_API_URL` | No | `https://api.solafon.com` | API base URL |
112
+
113
+ ## Getting a Bot Token
114
+
115
+ 1. Register at [Solafon](https://solafon.com)
116
+ 2. Go to Developer Portal
117
+ 3. Create a new app
118
+ 4. Copy the API key shown after creation
119
+
120
+ ## Example Usage with Claude
121
+
122
+ After connecting the MCP server, you can say to Claude:
123
+
124
+ > "Check the SOL balance of wallet address 7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU"
125
+
126
+ > "Send a welcome message to conversation abc-123 with two buttons: Check Balance and Help"
127
+
128
+ > "Set up my bot's webhook to https://myserver.com/webhook"
129
+
130
+ > "Show me the last 10 transactions for this wallet"
131
+
132
+ ## Documentation
133
+
134
+ Full documentation: [docs.solafon.com](https://docs.solafon.com)
135
+
136
+ ## License
137
+
138
+ MIT
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Solafon MCP Server
4
+ *
5
+ * Model Context Protocol server that exposes Solafon Bot API and Wallet API
6
+ * as tools for AI assistants (Claude Desktop, Cursor, VS Code, etc.)
7
+ *
8
+ * Usage:
9
+ * npx solafon-mcp
10
+ *
11
+ * Environment variables:
12
+ * SOLAFON_API_URL — API base URL (default: https://api.solafon.com)
13
+ * SOLAFON_BOT_TOKEN — Bot API token (X-Bot-Token)
14
+ * SOLAFON_APP_ID — App ID (auto-detected from bot token if not set)
15
+ */
16
+ export {};
package/dist/index.js ADDED
@@ -0,0 +1,524 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Solafon MCP Server
4
+ *
5
+ * Model Context Protocol server that exposes Solafon Bot API and Wallet API
6
+ * as tools for AI assistants (Claude Desktop, Cursor, VS Code, etc.)
7
+ *
8
+ * Usage:
9
+ * npx solafon-mcp
10
+ *
11
+ * Environment variables:
12
+ * SOLAFON_API_URL — API base URL (default: https://api.solafon.com)
13
+ * SOLAFON_BOT_TOKEN — Bot API token (X-Bot-Token)
14
+ * SOLAFON_APP_ID — App ID (auto-detected from bot token if not set)
15
+ */
16
+ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
17
+ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
18
+ import { z } from "zod";
19
+ const API_URL = process.env.SOLAFON_API_URL || "https://api.solafon.com";
20
+ const BOT_TOKEN = process.env.SOLAFON_BOT_TOKEN || "";
21
+ // ─── HTTP Helper ───────────────────────────────────────────────────────────────
22
+ async function apiCall(method, path, body, query) {
23
+ const url = new URL(`${API_URL}${path}`);
24
+ if (query) {
25
+ for (const [k, v] of Object.entries(query)) {
26
+ if (v)
27
+ url.searchParams.set(k, v);
28
+ }
29
+ }
30
+ const headers = {
31
+ "Content-Type": "application/json",
32
+ };
33
+ if (BOT_TOKEN) {
34
+ headers["X-Bot-Token"] = BOT_TOKEN;
35
+ }
36
+ const res = await fetch(url.toString(), {
37
+ method,
38
+ headers,
39
+ body: body ? JSON.stringify(body) : undefined,
40
+ });
41
+ const text = await res.text();
42
+ try {
43
+ return JSON.parse(text);
44
+ }
45
+ catch {
46
+ return { status: res.status, body: text };
47
+ }
48
+ }
49
+ function ok(data) {
50
+ return {
51
+ content: [{ type: "text", text: JSON.stringify(data, null, 2) }],
52
+ };
53
+ }
54
+ // ─── Server Setup ──────────────────────────────────────────────────────────────
55
+ const server = new McpServer({
56
+ name: "solafon",
57
+ version: "1.0.0",
58
+ });
59
+ // ═══════════════════════════════════════════════════════════════════════════════
60
+ // BOT API TOOLS
61
+ // ═══════════════════════════════════════════════════════════════════════════════
62
+ server.tool("get_bot_info", "Get information about the current bot app (name, description, status, webhook URL)", {}, async () => {
63
+ const result = await apiCall("GET", "/api/bot/me");
64
+ return ok(result);
65
+ });
66
+ server.tool("send_message", "Send a message from the bot to a user in a specific conversation. Supports text, buttons, images, and card carousels.", {
67
+ conversationId: z
68
+ .string()
69
+ .uuid()
70
+ .describe("The conversation ID to send the message to"),
71
+ type: z
72
+ .enum(["text", "image", "carousel"])
73
+ .default("text")
74
+ .describe("Message content type"),
75
+ text: z
76
+ .string()
77
+ .optional()
78
+ .describe("Text content of the message (required for type=text)"),
79
+ imageUrl: z
80
+ .string()
81
+ .url()
82
+ .optional()
83
+ .describe("Image URL (for type=image)"),
84
+ buttons: z
85
+ .array(z.object({
86
+ id: z.string().describe("Unique button ID"),
87
+ text: z.string().describe("Button label"),
88
+ action: z
89
+ .enum(["callback", "url", "webApp"])
90
+ .describe("Button action type"),
91
+ payload: z
92
+ .string()
93
+ .optional()
94
+ .describe("Callback payload (for action=callback)"),
95
+ url: z
96
+ .string()
97
+ .optional()
98
+ .describe("URL to open (for action=url or webApp)"),
99
+ }))
100
+ .optional()
101
+ .describe("Interactive buttons attached to the message"),
102
+ cards: z
103
+ .array(z.object({
104
+ id: z.string().describe("Unique card ID"),
105
+ title: z.string().describe("Card title"),
106
+ subtitle: z.string().optional().describe("Card subtitle"),
107
+ imageUrl: z.string().optional().describe("Card image URL"),
108
+ buttons: z
109
+ .array(z.object({
110
+ id: z.string(),
111
+ text: z.string(),
112
+ action: z.enum(["callback", "url", "webApp"]),
113
+ payload: z.string().optional(),
114
+ url: z.string().optional(),
115
+ }))
116
+ .optional()
117
+ .describe("Card buttons"),
118
+ }))
119
+ .optional()
120
+ .describe("Cards for carousel messages"),
121
+ }, async (args) => {
122
+ const content = { type: args.type };
123
+ if (args.text)
124
+ content.text = args.text;
125
+ if (args.imageUrl)
126
+ content.imageUrl = args.imageUrl;
127
+ if (args.buttons)
128
+ content.buttons = args.buttons;
129
+ if (args.cards)
130
+ content.cards = args.cards;
131
+ const result = await apiCall("POST", "/api/bot/messages", {
132
+ conversationId: args.conversationId,
133
+ content,
134
+ });
135
+ return ok(result);
136
+ });
137
+ server.tool("edit_message", "Edit a previously sent bot message", {
138
+ messageId: z.string().uuid().describe("ID of the message to edit"),
139
+ type: z.enum(["text", "image", "carousel"]).default("text"),
140
+ text: z.string().optional().describe("New text content"),
141
+ buttons: z
142
+ .array(z.object({
143
+ id: z.string(),
144
+ text: z.string(),
145
+ action: z.enum(["callback", "url", "webApp"]),
146
+ payload: z.string().optional(),
147
+ url: z.string().optional(),
148
+ }))
149
+ .optional(),
150
+ }, async (args) => {
151
+ const content = { type: args.type };
152
+ if (args.text)
153
+ content.text = args.text;
154
+ if (args.buttons)
155
+ content.buttons = args.buttons;
156
+ const result = await apiCall("PATCH", `/api/bot/messages/${args.messageId}`, {
157
+ content,
158
+ });
159
+ return ok(result);
160
+ });
161
+ server.tool("delete_message", "Delete a bot message by ID", {
162
+ messageId: z.string().uuid().describe("ID of the message to delete"),
163
+ }, async (args) => {
164
+ const result = await apiCall("DELETE", `/api/bot/messages/${args.messageId}`);
165
+ return ok(result);
166
+ });
167
+ server.tool("list_conversations", "List all conversations for the bot app with pagination", {
168
+ limit: z.number().int().min(1).max(100).default(20).describe("Number of conversations to return"),
169
+ offset: z.number().int().min(0).default(0).describe("Offset for pagination"),
170
+ }, async (args) => {
171
+ const result = await apiCall("GET", "/api/bot/conversations", undefined, {
172
+ limit: args.limit.toString(),
173
+ offset: args.offset.toString(),
174
+ });
175
+ return ok(result);
176
+ });
177
+ server.tool("get_conversation_messages", "Get messages in a specific conversation", {
178
+ conversationId: z.string().uuid().describe("Conversation ID"),
179
+ limit: z.number().int().min(1).max(100).default(50).describe("Number of messages"),
180
+ before: z.string().uuid().optional().describe("Cursor: message ID to paginate before"),
181
+ }, async (args) => {
182
+ const query = { limit: args.limit.toString() };
183
+ if (args.before)
184
+ query.before = args.before;
185
+ const result = await apiCall("GET", `/api/bot/conversations/${args.conversationId}/messages`, undefined, query);
186
+ return ok(result);
187
+ });
188
+ server.tool("get_user", "Get information about a user who has a conversation with this bot", {
189
+ userId: z.string().uuid().describe("User ID"),
190
+ }, async (args) => {
191
+ const result = await apiCall("GET", `/api/bot/users/${args.userId}`);
192
+ return ok(result);
193
+ });
194
+ server.tool("set_webhook", "Configure the webhook URL where the bot receives events (messages, callbacks)", {
195
+ url: z.string().url().describe("Webhook URL (must be HTTPS)"),
196
+ events: z
197
+ .array(z.string())
198
+ .optional()
199
+ .describe("Event types to subscribe to (default: all)"),
200
+ }, async (args) => {
201
+ // Need to get app ID from bot info first
202
+ const botInfo = (await apiCall("GET", "/api/bot/me"));
203
+ const appId = botInfo.id;
204
+ if (!appId)
205
+ return ok({ error: "Could not determine app ID. Check your bot token." });
206
+ const result = await apiCall("PUT", `/api/developer/apps/${appId}/webhook`, {
207
+ url: args.url,
208
+ events: args.events,
209
+ });
210
+ return ok(result);
211
+ });
212
+ server.tool("set_welcome_message", "Set the welcome message shown when a user starts a conversation", {
213
+ text: z.string().describe("Welcome message text"),
214
+ buttons: z
215
+ .array(z.object({
216
+ id: z.string(),
217
+ text: z.string(),
218
+ action: z.enum(["callback", "url", "webApp"]),
219
+ payload: z.string().optional(),
220
+ url: z.string().optional(),
221
+ }))
222
+ .optional()
223
+ .describe("Optional buttons on the welcome message"),
224
+ }, async (args) => {
225
+ const botInfo = (await apiCall("GET", "/api/bot/me"));
226
+ const appId = botInfo.id;
227
+ if (!appId)
228
+ return ok({ error: "Could not determine app ID." });
229
+ const content = { type: "text", text: args.text };
230
+ if (args.buttons)
231
+ content.buttons = args.buttons;
232
+ const result = await apiCall("PUT", `/api/developer/apps/${appId}/welcome-message`, { content });
233
+ return ok(result);
234
+ });
235
+ // ═══════════════════════════════════════════════════════════════════════════════
236
+ // WALLET API TOOLS
237
+ // ═══════════════════════════════════════════════════════════════════════════════
238
+ server.tool("get_wallet_balance", "Get SOL and SPL token balances for a Solana wallet address, including USD values", {
239
+ address: z.string().describe("Solana wallet address (base58)"),
240
+ }, async (args) => {
241
+ const result = await apiCall("GET", "/api/wallet/balance", undefined, {
242
+ address: args.address,
243
+ });
244
+ return ok(result);
245
+ });
246
+ server.tool("get_token_list", "Get the list of supported SPL tokens with mint addresses, symbols, and metadata", {}, async () => {
247
+ const result = await apiCall("GET", "/api/wallet/tokens");
248
+ return ok(result);
249
+ });
250
+ server.tool("get_token_prices", "Get current USD prices for Solana tokens", {
251
+ mints: z
252
+ .string()
253
+ .optional()
254
+ .describe("Comma-separated mint addresses, or 'all' for all supported tokens"),
255
+ }, async (args) => {
256
+ const result = await apiCall("GET", "/api/wallet/prices", undefined, {
257
+ mints: args.mints || "all",
258
+ });
259
+ return ok(result);
260
+ });
261
+ server.tool("get_transaction_history", "Get transaction history for a Solana wallet address", {
262
+ address: z.string().describe("Solana wallet address"),
263
+ limit: z.number().int().min(1).max(50).default(20).describe("Number of transactions"),
264
+ before: z.string().optional().describe("Transaction signature cursor for pagination"),
265
+ }, async (args) => {
266
+ const query = {
267
+ address: args.address,
268
+ limit: args.limit.toString(),
269
+ };
270
+ if (args.before)
271
+ query.before = args.before;
272
+ const result = await apiCall("GET", "/api/wallet/transactions", undefined, query);
273
+ return ok(result);
274
+ });
275
+ server.tool("get_transaction_status", "Check the confirmation status of a Solana transaction", {
276
+ signature: z.string().describe("Transaction signature"),
277
+ }, async (args) => {
278
+ const result = await apiCall("GET", "/api/wallet/status", undefined, {
279
+ signature: args.signature,
280
+ });
281
+ return ok(result);
282
+ });
283
+ server.tool("get_latest_blockhash", "Get the latest blockhash needed for building Solana transactions", {}, async () => {
284
+ const result = await apiCall("GET", "/api/wallet/blockhash");
285
+ return ok(result);
286
+ });
287
+ server.tool("send_transaction", "Send a pre-signed Solana transaction to the network", {
288
+ signedTransaction: z
289
+ .string()
290
+ .describe("Base64-encoded signed transaction"),
291
+ }, async (args) => {
292
+ const result = await apiCall("POST", "/api/wallet/send", {
293
+ signedTransaction: args.signedTransaction,
294
+ });
295
+ return ok(result);
296
+ });
297
+ server.tool("simulate_transaction", "Simulate a Solana transaction to check for errors and estimate fees before sending", {
298
+ transaction: z.string().describe("Base64-encoded transaction to simulate"),
299
+ }, async (args) => {
300
+ const result = await apiCall("POST", "/api/wallet/simulate", {
301
+ transaction: args.transaction,
302
+ });
303
+ return ok(result);
304
+ });
305
+ // ═══════════════════════════════════════════════════════════════════════════════
306
+ // PROMPTS (Reusable templates for common tasks)
307
+ // ═══════════════════════════════════════════════════════════════════════════════
308
+ server.prompt("create_echo_bot", "Step-by-step guide to create a simple echo bot on Solafon", () => ({
309
+ messages: [
310
+ {
311
+ role: "user",
312
+ content: {
313
+ type: "text",
314
+ text: `Create a Solafon echo bot that replies to every user message with the same text.
315
+
316
+ Steps:
317
+ 1. Use get_bot_info to verify the bot token is working
318
+ 2. Use set_webhook to set your webhook URL
319
+ 3. Use set_welcome_message to greet new users
320
+ 4. Here's the webhook handler code (Node.js/Express):
321
+
322
+ \`\`\`javascript
323
+ const express = require('express');
324
+ const app = express();
325
+ app.use(express.json());
326
+
327
+ const BOT_TOKEN = process.env.SOLAFON_BOT_TOKEN;
328
+ const API_URL = 'https://api.solafon.com';
329
+
330
+ app.post('/webhook', async (req, res) => {
331
+ const { event, message } = req.body;
332
+
333
+ if (event === 'message' && message.content.type === 'text') {
334
+ await fetch(\`\${API_URL}/api/bot/messages\`, {
335
+ method: 'POST',
336
+ headers: {
337
+ 'Content-Type': 'application/json',
338
+ 'X-Bot-Token': BOT_TOKEN,
339
+ },
340
+ body: JSON.stringify({
341
+ conversationId: message.conversationId,
342
+ content: {
343
+ type: 'text',
344
+ text: \`Echo: \${message.content.text}\`,
345
+ },
346
+ }),
347
+ });
348
+ }
349
+
350
+ res.json({ ok: true });
351
+ });
352
+
353
+ app.listen(3000);
354
+ \`\`\``,
355
+ },
356
+ },
357
+ ],
358
+ }));
359
+ server.prompt("create_wallet_checker_bot", "Create a bot that checks Solana wallet balances when users send an address", () => ({
360
+ messages: [
361
+ {
362
+ role: "user",
363
+ content: {
364
+ type: "text",
365
+ text: `Create a Solafon bot that checks Solana wallet balances.
366
+
367
+ When a user sends a Solana address, the bot should:
368
+ 1. Call get_wallet_balance with the address
369
+ 2. Format the response showing SOL balance and top tokens
370
+ 3. Send the formatted response back
371
+
372
+ Use these tools:
373
+ - get_bot_info — verify connection
374
+ - set_webhook — configure webhook URL
375
+ - get_wallet_balance — check balances
376
+ - send_message — reply to users
377
+
378
+ The webhook handler should detect Solana addresses (base58, 32-44 chars) in user messages.`,
379
+ },
380
+ },
381
+ ],
382
+ }));
383
+ server.prompt("create_interactive_menu_bot", "Create a bot with interactive button menus and callbacks", () => ({
384
+ messages: [
385
+ {
386
+ role: "user",
387
+ content: {
388
+ type: "text",
389
+ text: `Create a Solafon bot with interactive menus using buttons and callbacks.
390
+
391
+ Features:
392
+ - Welcome message with action buttons
393
+ - Button callbacks that trigger different responses
394
+ - Card carousel for listing items
395
+
396
+ Use send_message with buttons:
397
+ \`\`\`json
398
+ {
399
+ "conversationId": "...",
400
+ "content": {
401
+ "type": "text",
402
+ "text": "What would you like to do?",
403
+ "buttons": [
404
+ {"id": "prices", "text": "Token Prices", "action": "callback", "payload": "show_prices"},
405
+ {"id": "help", "text": "Help", "action": "callback", "payload": "show_help"},
406
+ {"id": "web", "text": "Open dApp", "action": "url", "url": "https://app.solafon.com"}
407
+ ]
408
+ }
409
+ }
410
+ \`\`\`
411
+
412
+ Handle callbacks in webhook:
413
+ \`\`\`javascript
414
+ if (event === 'callback') {
415
+ const { payload, conversationId } = req.body;
416
+ switch (payload) {
417
+ case 'show_prices': /* fetch and send prices */ break;
418
+ case 'show_help': /* send help text */ break;
419
+ }
420
+ }
421
+ \`\`\``,
422
+ },
423
+ },
424
+ ],
425
+ }));
426
+ // ═══════════════════════════════════════════════════════════════════════════════
427
+ // RESOURCES (Documentation links)
428
+ // ═══════════════════════════════════════════════════════════════════════════════
429
+ server.resource("docs://bot-api", "docs://bot-api", async () => ({
430
+ contents: [
431
+ {
432
+ uri: "docs://bot-api",
433
+ mimeType: "text/markdown",
434
+ text: `# Solafon Bot API Reference
435
+
436
+ Base URL: https://api.solafon.com
437
+ Auth: X-Bot-Token header
438
+
439
+ ## Endpoints
440
+
441
+ | Method | Path | Description |
442
+ |--------|------|-------------|
443
+ | GET | /api/bot/me | Get bot info |
444
+ | POST | /api/bot/messages | Send message |
445
+ | PATCH | /api/bot/messages/:id | Edit message |
446
+ | DELETE | /api/bot/messages/:id | Delete message |
447
+ | GET | /api/bot/conversations | List conversations |
448
+ | GET | /api/bot/conversations/:id/messages | Get messages |
449
+ | GET | /api/bot/users/:id | Get user info |
450
+
451
+ ## Message Types
452
+
453
+ - **text**: Simple text with optional buttons
454
+ - **image**: Image with optional caption
455
+ - **carousel**: Card carousel with images and buttons
456
+
457
+ ## Button Actions
458
+
459
+ - **callback**: Triggers webhook callback event
460
+ - **url**: Opens URL in browser
461
+ - **webApp**: Opens URL in Solafon WebView
462
+
463
+ ## Webhook Events
464
+
465
+ Your webhook URL receives POST requests:
466
+ - \`message\` — User sent a message
467
+ - \`callback\` — User clicked a button
468
+
469
+ ## Rate Limits
470
+
471
+ 1000 requests per minute per bot token.
472
+
473
+ Full docs: https://docs.solafon.com/en/docs/bot-api/overview
474
+ `,
475
+ },
476
+ ],
477
+ }));
478
+ server.resource("docs://wallet-api", "docs://wallet-api", async () => ({
479
+ contents: [
480
+ {
481
+ uri: "docs://wallet-api",
482
+ mimeType: "text/markdown",
483
+ text: `# Solafon Wallet API Reference
484
+
485
+ Base URL: https://api.solafon.com
486
+ Auth: None required (public endpoints)
487
+
488
+ ## Endpoints
489
+
490
+ | Method | Path | Description |
491
+ |--------|------|-------------|
492
+ | GET | /api/wallet/balance?address=... | Get wallet balance |
493
+ | GET | /api/wallet/tokens | Supported token list |
494
+ | GET | /api/wallet/prices?mints=... | Token prices (USD) |
495
+ | GET | /api/wallet/transactions?address=... | Transaction history |
496
+ | GET | /api/wallet/status?signature=... | Transaction status |
497
+ | GET | /api/wallet/blockhash | Latest blockhash |
498
+ | POST | /api/wallet/send | Send signed transaction |
499
+ | POST | /api/wallet/simulate | Simulate transaction |
500
+
501
+ ## Non-Custodial Architecture
502
+
503
+ Solafon wallet is non-custodial. Private keys never leave the client.
504
+ The API provides:
505
+ - Balance queries (RPC proxy)
506
+ - Token metadata and prices
507
+ - Transaction broadcasting
508
+ - Transaction simulation
509
+
510
+ Full docs: https://docs.solafon.com/en/docs/wallet-api/overview
511
+ `,
512
+ },
513
+ ],
514
+ }));
515
+ // ─── Start ─────────────────────────────────────────────────────────────────────
516
+ async function main() {
517
+ const transport = new StdioServerTransport();
518
+ await server.connect(transport);
519
+ }
520
+ main().catch((err) => {
521
+ console.error("Solafon MCP Server error:", err);
522
+ process.exit(1);
523
+ });
524
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,eAAe,IAAI,yBAAyB,CAAC;AACzE,MAAM,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,iBAAiB,IAAI,EAAE,CAAC;AAEtD,kFAAkF;AAElF,KAAK,UAAU,OAAO,CACpB,MAAc,EACd,IAAY,EACZ,IAAc,EACd,KAA8B;IAE9B,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,GAAG,OAAO,GAAG,IAAI,EAAE,CAAC,CAAC;IACzC,IAAI,KAAK,EAAE,CAAC;QACV,KAAK,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;YAC3C,IAAI,CAA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,CAAC,QAAQ,CAAC,gBAAgB,EAAE,gBAAgB,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC;IAC/D,QAAQ,EAAE;QACR;YACE,GAAG,EAAE,gBAAgB;YACrB,QAAQ,EAAE,eAAe;YACzB,IAAI,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwCX;SACI;KACF;CACF,CAAC,CAAC,CAAC;AAEJ,MAAM,CAAC,QAAQ,CAAC,mBAAmB,EAAE,mBAAmB,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC;IACrE,QAAQ,EAAE;QACR;YACE,GAAG,EAAE,mBAAmB;YACxB,QAAQ,EAAE,eAAe;YACzB,IAAI,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4BX;SACI;KACF;CACF,CAAC,CAAC,CAAC;AAEJ,kFAAkF;AAElF,KAAK,UAAU,IAAI;IACjB,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;AAClC,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;IACnB,OAAO,CAAC,KAAK,CAAC,2BAA2B,EAAE,GAAG,CAAC,CAAC;IAChD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
package/package.json ADDED
@@ -0,0 +1,54 @@
1
+ {
2
+ "name": "solafon-mcp",
3
+ "version": "1.0.0",
4
+ "description": "Model Context Protocol server for building bots and interacting with Solana wallet on the Solafon platform",
5
+ "type": "module",
6
+ "main": "dist/index.js",
7
+ "bin": {
8
+ "solafon-mcp": "dist/index.js"
9
+ },
10
+ "scripts": {
11
+ "build": "tsc",
12
+ "dev": "tsx src/index.ts",
13
+ "start": "node dist/index.js",
14
+ "prepublishOnly": "echo skip"
15
+ },
16
+ "keywords": [
17
+ "solafon",
18
+ "mcp",
19
+ "model-context-protocol",
20
+ "solana",
21
+ "bot",
22
+ "ai",
23
+ "claude",
24
+ "cursor",
25
+ "vscode"
26
+ ],
27
+ "author": "Solafon",
28
+ "license": "MIT",
29
+ "repository": {
30
+ "type": "git",
31
+ "url": "https://github.com/Solanafon/solafon-mcp.git"
32
+ },
33
+ "homepage": "https://docs.solafon.com/en/docs/mcp-server/overview",
34
+ "bugs": {
35
+ "url": "https://github.com/Solanafon/solafon-mcp/issues"
36
+ },
37
+ "engines": {
38
+ "node": ">=18"
39
+ },
40
+ "files": [
41
+ "dist",
42
+ "README.md",
43
+ "LICENSE"
44
+ ],
45
+ "dependencies": {
46
+ "@modelcontextprotocol/sdk": "^1.12.1",
47
+ "zod": "^3.24.0"
48
+ },
49
+ "devDependencies": {
50
+ "@types/node": "^22.0.0",
51
+ "tsx": "^4.19.0",
52
+ "typescript": "^5.7.0"
53
+ }
54
+ }