@tupaas/mcp 1.1.1 → 1.2.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/dist/index.js +20 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6,9 +6,10 @@ import fs from "fs";
|
|
|
6
6
|
import path from "path";
|
|
7
7
|
import os from "os";
|
|
8
8
|
import { execSync } from "child_process";
|
|
9
|
+
const VERSION = "1.2.0";
|
|
9
10
|
const API_URL = process.env.TUPAAS_API_URL ?? "https://tupaas.dev/api";
|
|
10
11
|
const API_KEY = process.env.TUPAAS_API_KEY ?? "";
|
|
11
|
-
const server = new Server({ name: "tupaas-mcp", version:
|
|
12
|
+
const server = new Server({ name: "tupaas-mcp", version: VERSION }, { capabilities: { tools: {} } });
|
|
12
13
|
function authHeaders() {
|
|
13
14
|
return { "x-api-key": API_KEY };
|
|
14
15
|
}
|
|
@@ -87,6 +88,14 @@ server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
|
87
88
|
required: ["database_id"],
|
|
88
89
|
},
|
|
89
90
|
},
|
|
91
|
+
{
|
|
92
|
+
name: "version",
|
|
93
|
+
description: "Returns the current version of the TuPaaS MCP server and the API URL it is configured to use.",
|
|
94
|
+
inputSchema: {
|
|
95
|
+
type: "object",
|
|
96
|
+
properties: {},
|
|
97
|
+
},
|
|
98
|
+
},
|
|
90
99
|
],
|
|
91
100
|
}));
|
|
92
101
|
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
@@ -325,6 +334,16 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
325
334
|
],
|
|
326
335
|
};
|
|
327
336
|
}
|
|
337
|
+
case "version": {
|
|
338
|
+
return {
|
|
339
|
+
content: [
|
|
340
|
+
{
|
|
341
|
+
type: "text",
|
|
342
|
+
text: `TuPaaS MCP v${VERSION}\nAPI URL: ${API_URL}\nAPI Key: ${API_KEY ? `${API_KEY.slice(0, 12)}...` : "NOT SET"}`,
|
|
343
|
+
},
|
|
344
|
+
],
|
|
345
|
+
};
|
|
346
|
+
}
|
|
328
347
|
default:
|
|
329
348
|
return {
|
|
330
349
|
content: [
|