thunderclient-mcp 1.0.2 → 1.0.3
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definitions.d.ts","sourceRoot":"","sources":["../../src/tools/definitions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AACnC,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"definitions.d.ts","sourceRoot":"","sources":["../../src/tools/definitions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AACnC,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAI1D,UAAU,cAAc,CAAC,OAAO,SAAS,SAAS,EAAE,OAAO;IACzD,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,CAAC,MAAM,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;CAC9E;AAgBD,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyClB,CAAC;AAEX,eAAO,MAAM,KAAK,EAAE,IAAI,EAIrB,CAAC;AAEJ,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAExB,CAAC;AAEF,eAAO,MAAM,SAAS,EAEjB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAE5B,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC;AAEtF,MAAM,MAAM,QAAQ,CAAC,CAAC,SAAS,QAAQ,IAAI,CAAC,CAAC,KAAK,CAChD,CAAC,OAAO,eAAe,CAAC,CAAC,OAAO,CAAC,MAAM,OAAO,eAAe,EAAE,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAClF,CAAC"}
|
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { zodToMCPInputSchema } from "../utils/schema-converter.js";
|
|
3
|
+
import { resolve } from "upath";
|
|
3
4
|
function defineTool(definition) {
|
|
4
5
|
return definition;
|
|
5
6
|
}
|
|
7
|
+
// Helper function to resolve project directory
|
|
8
|
+
function resolveProjectDir(projectDir) {
|
|
9
|
+
if (projectDir === "." || projectDir === "./") {
|
|
10
|
+
return process.cwd();
|
|
11
|
+
}
|
|
12
|
+
return resolve(projectDir);
|
|
13
|
+
}
|
|
6
14
|
export const toolDefinitions = {
|
|
7
15
|
thunder_help: defineTool({
|
|
8
16
|
name: "tc_help",
|
|
@@ -10,7 +18,7 @@ export const toolDefinitions = {
|
|
|
10
18
|
schema: z.object({
|
|
11
19
|
projectDir: z.string().min(1, "projectDir is required"),
|
|
12
20
|
}),
|
|
13
|
-
handler: async (client, args) => client.thunder_help(args.projectDir.trim()),
|
|
21
|
+
handler: async (client, args) => client.thunder_help(resolveProjectDir(args.projectDir.trim())),
|
|
14
22
|
}),
|
|
15
23
|
thunder_debug: defineTool({
|
|
16
24
|
name: "tc_debug",
|
|
@@ -18,7 +26,7 @@ export const toolDefinitions = {
|
|
|
18
26
|
schema: z.object({
|
|
19
27
|
projectDir: z.string().min(1, "projectDir is required"),
|
|
20
28
|
}),
|
|
21
|
-
handler: async (client, args) => client.thunder_debug(args.projectDir.trim()),
|
|
29
|
+
handler: async (client, args) => client.thunder_debug(resolveProjectDir(args.projectDir.trim())),
|
|
22
30
|
}),
|
|
23
31
|
thunder_curl: defineTool({
|
|
24
32
|
name: "tc_create",
|
|
@@ -40,7 +48,7 @@ export const toolDefinitions = {
|
|
|
40
48
|
message: "If 'folder' is provided, you must also provide 'collection'.",
|
|
41
49
|
path: ["collection"],
|
|
42
50
|
}),
|
|
43
|
-
handler: async (client, args) => client.runCurl({ ...args, projectDir: args.projectDir.trim() }),
|
|
51
|
+
handler: async (client, args) => client.runCurl({ ...args, projectDir: resolveProjectDir(args.projectDir.trim()) }),
|
|
44
52
|
}),
|
|
45
53
|
};
|
|
46
54
|
export const tools = Object.values(toolDefinitions).map(def => ({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "thunderclient-mcp",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "Thunder Client MCP Server",
|
|
5
5
|
"main": "dist/index.js`",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@modelcontextprotocol/sdk": "^1.16.0",
|
|
29
|
+
"upath": "^2.0.1",
|
|
29
30
|
"zod": "^3.25.76",
|
|
30
31
|
"zod-to-json-schema": "^3.24.6"
|
|
31
32
|
},
|