thunderclient-mcp 1.0.4 → 1.0.7

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 CHANGED
@@ -1,6 +1,6 @@
1
- # Thunder Client MCP
1
+ # Thunder Client MCP Server
2
2
 
3
- A Model Context Protocol (MCP) server that integrates Thunder Client functionality into various AI development environments including Cline, Continue.dev, and GitHub Copilot.
3
+ The Thunder Client MCP server leverages AI to create requests and collections. It can be used in various AI development environments, including Cline, Continue.dev, and GitHub Copilot.
4
4
 
5
5
  ## Available Tools
6
6
 
@@ -17,13 +17,7 @@ Saves API endpoints to Thunder Client, automatically creating collections and fo
17
17
  - Add new requests to a specific collection in Thunder Client.
18
18
  - Dynamically create a request using an AI-generated prompt.
19
19
 
20
- ### 2. `tc_help`
21
-
22
- **Description:** Show Thunder Client CLI help using `tc --help` in the given project directory.
23
-
24
- - **Usage:** Get comprehensive help documentation for Thunder Client CLI
25
-
26
- ### 3. `tc_debug`
20
+ ### 2. `tc_debug`
27
21
 
28
22
  **Description:** Show Thunder Client CLI debug information using `tc --debug` in the given project directory.
29
23
 
@@ -113,23 +107,23 @@ This document contains simple example prompts for the `tc_create` tool to extrac
113
107
  ### 1. Extract APIs from Current Project
114
108
 
115
109
  ```
116
- "Get the endpoints from current project and save to Thunder Client with collection name 'My API'."
110
+ "Get the endpoints from the current project and save them with collection name 'My API' using Thunder Client MCP."
117
111
  ```
118
112
 
119
113
  ### 2. Extract APIs from Files and Folders
120
114
 
121
115
  ```
122
- "Get the endpoints from app/main.py and save to Thunder Client with collection name 'E-commerce API' and folder name 'Products'."
116
+ "Get the endpoints from app/main.py and save them with collection name 'E-commerce API' and folder name 'Products' using Thunder Client MCP."
123
117
  ```
124
118
 
125
119
  ```
126
- "Get the endpoints from src/routes/ folder and save to Thunder Client with collection name 'Node API'."
120
+ "Get the endpoints from the src/routes/ folder and save them with collection name 'Node API' using Thunder Client MCP."
127
121
  ```
128
122
 
129
123
  ### 3. Create Simple HTTP Requests
130
124
 
131
125
  ```
132
- "Create a POST request to https://api.example.com/users with a JSON body and with authorization header in Thunder Client."
126
+ "Create a POST request to https://api.example.com/users with a JSON body and an Authorization header using Thunder Client MCP."
133
127
  ```
134
128
 
135
129
  ## Troubleshooting
@@ -1,17 +1,17 @@
1
1
  export declare class ThunderClient {
2
2
  private validateProjectDir;
3
3
  private execCommand;
4
- thunder_help(projectDir: string): Promise<{
5
- projectDir: string;
4
+ runHelp(projectDir: string): Promise<{
6
5
  success: boolean;
7
- result?: string;
8
6
  error?: string;
7
+ projectDir?: string;
8
+ version: string;
9
9
  }>;
10
- thunder_debug(projectDir: string): Promise<{
11
- projectDir: string;
10
+ runDebug(projectDir: string): Promise<{
12
11
  success: boolean;
13
- result?: string;
14
12
  error?: string;
13
+ projectDir?: string;
14
+ version: string;
15
15
  }>;
16
16
  runCurl({ curlInput, name, collection, folder, projectDir, }: {
17
17
  curlInput: string;
@@ -22,6 +22,8 @@ export declare class ThunderClient {
22
22
  }): Promise<{
23
23
  success: boolean;
24
24
  error?: string;
25
+ projectDir?: string;
26
+ version: string;
25
27
  }>;
26
28
  }
27
29
  //# sourceMappingURL=thunder-client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"thunder-client.d.ts","sourceRoot":"","sources":["../src/thunder-client.ts"],"names":[],"mappings":"AAiBA,qBAAa,aAAa;IACxB,OAAO,CAAC,kBAAkB;YAUZ,WAAW;IAYnB,YAAY,CAAC,UAAU,EAAE,MAAM;;iBAZuC,OAAO;iBAAW,MAAM;gBAAU,MAAM;;IAoB9G,aAAa,CAAC,UAAU,EAAE,MAAM;;iBApBsC,OAAO;iBAAW,MAAM;gBAAU,MAAM;;IA4B9G,OAAO,CAAC,EACZ,SAAS,EACT,IAAI,EACJ,UAAU,EACV,MAAM,EACN,UAAU,GACX,EAAE;QACD,SAAS,EAAE,MAAM,CAAC;QAClB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,UAAU,EAAE,MAAM,CAAC;KACpB,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CA4BlD"}
1
+ {"version":3,"file":"thunder-client.d.ts","sourceRoot":"","sources":["../src/thunder-client.ts"],"names":[],"mappings":"AAmBA,qBAAa,aAAa;IACtB,OAAO,CAAC,kBAAkB;YAUZ,WAAW;IAqBnB,OAAO,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IAQhH,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IAQjH,OAAO,CAAC,EACV,SAAS,EACT,IAAI,EACJ,UAAU,EACV,MAAM,EACN,UAAU,GACb,EAAE;QACC,SAAS,EAAE,MAAM,CAAC;QAClB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,UAAU,EAAE,MAAM,CAAC;KACtB,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;CA4B1F"}
@@ -1,6 +1,8 @@
1
1
  import { exec } from "child_process";
2
2
  import { promisify } from "util";
3
3
  import * as fs from "fs";
4
+ import pkg from '../package.json' with { type: 'json' };
5
+ const version = pkg.version;
4
6
  const execAsync = promisify(exec);
5
7
  // Support multiple data flags in curl
6
8
  function normalizeCurlInputForWindows(curlInput) {
@@ -21,43 +23,51 @@ export class ThunderClient {
21
23
  }
22
24
  async execCommand(command, cwd) {
23
25
  try {
24
- const { stdout } = await execAsync(command, { cwd });
25
- return { success: true, result: stdout };
26
+ const { stdout, stderr } = await execAsync(command, { cwd });
27
+ let succeeded = true;
28
+ let errorMessage = stderr ? stderr.trim() : undefined;
29
+ if ((stderr && stderr.trim()) || stdout?.trim().toLowerCase().includes("error")) {
30
+ succeeded = false;
31
+ if (stdout?.trim().toLowerCase().includes("error")) {
32
+ errorMessage = stdout?.trim();
33
+ }
34
+ }
35
+ return { success: succeeded, result: stdout?.trim(), error: errorMessage };
26
36
  }
27
37
  catch (error) {
28
38
  return {
29
39
  success: false,
30
- error: error?.stderr || error?.message || "Unknown error",
40
+ error: error?.message || "Unknown error",
31
41
  };
32
42
  }
33
43
  }
34
- async thunder_help(projectDir) {
44
+ async runHelp(projectDir) {
35
45
  const check = this.validateProjectDir(projectDir);
36
46
  if (!check.valid)
37
- return { success: false, error: check.error, projectDir };
47
+ return { success: false, error: check.error, projectDir, version };
38
48
  const result = await this.execCommand("tc --help", projectDir);
39
- return { ...result, projectDir };
49
+ return { ...result, projectDir, version };
40
50
  }
41
- async thunder_debug(projectDir) {
51
+ async runDebug(projectDir) {
42
52
  const check = this.validateProjectDir(projectDir);
43
53
  if (!check.valid)
44
- return { success: false, error: check.error, projectDir };
54
+ return { success: false, error: check.error, projectDir, version };
45
55
  const result = await this.execCommand("tc --debug", projectDir);
46
- return { ...result, projectDir };
56
+ return { ...result, projectDir, version, };
47
57
  }
48
58
  async runCurl({ curlInput, name, collection, folder, projectDir, }) {
49
59
  const check = this.validateProjectDir(projectDir);
50
60
  if (!check.valid)
51
- return { success: false, error: check.error };
61
+ return { success: false, error: check.error, version };
52
62
  const trimmedInput = curlInput.trim();
53
63
  if (!trimmedInput.toLowerCase().startsWith("curl ")) {
54
- return { success: false, error: "Input must start with 'curl '" };
64
+ return { success: false, error: "Input must start with 'curl '", version };
55
65
  }
56
66
  let curlArgs = trimmedInput.slice(5).trim();
57
67
  if (process.platform === "win32") {
58
68
  curlArgs = normalizeCurlInputForWindows(curlArgs);
59
69
  }
60
- let cmd = `tc curl ${curlArgs} --ws .`;
70
+ let cmd = `tc curl ${curlArgs}`;
61
71
  if (name)
62
72
  cmd += ` --name "${name}"`;
63
73
  if (collection)
@@ -67,10 +77,10 @@ export class ThunderClient {
67
77
  cmd += ` --mcp`;
68
78
  const result = await this.execCommand(cmd, projectDir);
69
79
  if (result.success) {
70
- return { success: true }; // ✅ Return only success: true
80
+ return { ...result, projectDir, version }; // ✅ Return only success: true
71
81
  }
72
82
  else {
73
- return { success: false, error: result.error };
83
+ return { ...result, projectDir, version };
74
84
  }
75
85
  }
76
86
  }
@@ -4,34 +4,11 @@ import { Tool } from "@modelcontextprotocol/sdk/types.js";
4
4
  interface ToolDefinition<TSchema extends ZodSchema, TResult> {
5
5
  name: string;
6
6
  description: string;
7
+ keywords?: string[];
7
8
  schema: TSchema;
8
9
  handler: (client: ThunderClient, args: z.infer<TSchema>) => Promise<TResult>;
9
10
  }
10
11
  export declare const toolDefinitions: {
11
- readonly thunder_help: ToolDefinition<z.ZodObject<{
12
- projectDir: z.ZodString;
13
- }, "strip", z.ZodTypeAny, {
14
- projectDir: string;
15
- }, {
16
- projectDir: string;
17
- }>, {
18
- projectDir: string;
19
- success: boolean;
20
- result?: string;
21
- error?: string;
22
- }>;
23
- readonly thunder_debug: ToolDefinition<z.ZodObject<{
24
- projectDir: z.ZodString;
25
- }, "strip", z.ZodTypeAny, {
26
- projectDir: string;
27
- }, {
28
- projectDir: string;
29
- }>, {
30
- projectDir: string;
31
- success: boolean;
32
- result?: string;
33
- error?: string;
34
- }>;
35
12
  readonly thunder_curl: ToolDefinition<z.ZodEffects<z.ZodObject<{
36
13
  curlInput: z.ZodEffects<z.ZodString, string, string>;
37
14
  name: z.ZodString;
@@ -39,91 +16,96 @@ export declare const toolDefinitions: {
39
16
  folder: z.ZodOptional<z.ZodString>;
40
17
  projectDir: z.ZodString;
41
18
  }, "strip", z.ZodTypeAny, {
19
+ projectDir: string;
42
20
  curlInput: string;
43
21
  name: string;
44
- projectDir: string;
45
22
  collection?: string | undefined;
46
23
  folder?: string | undefined;
47
24
  }, {
25
+ projectDir: string;
48
26
  curlInput: string;
49
27
  name: string;
50
- projectDir: string;
51
28
  collection?: string | undefined;
52
29
  folder?: string | undefined;
53
30
  }>, {
31
+ projectDir: string;
54
32
  curlInput: string;
55
33
  name: string;
56
- projectDir: string;
57
34
  collection?: string | undefined;
58
35
  folder?: string | undefined;
59
36
  }, {
37
+ projectDir: string;
60
38
  curlInput: string;
61
39
  name: string;
62
- projectDir: string;
63
40
  collection?: string | undefined;
64
41
  folder?: string | undefined;
65
42
  }>, {
66
43
  success: boolean;
67
44
  error?: string;
45
+ projectDir?: string;
46
+ version: string;
68
47
  }>;
69
- };
70
- export declare const tools: Tool[];
71
- export declare const toolHandlers: {
72
- [k: string]: ToolDefinition<z.ZodObject<{
73
- projectDir: z.ZodString;
74
- }, "strip", z.ZodTypeAny, {
75
- projectDir: string;
76
- }, {
77
- projectDir: string;
78
- }>, {
79
- projectDir: string;
80
- success: boolean;
81
- result?: string;
82
- error?: string;
83
- }> | ToolDefinition<z.ZodObject<{
48
+ readonly thunder_debug: ToolDefinition<z.ZodObject<{
84
49
  projectDir: z.ZodString;
85
50
  }, "strip", z.ZodTypeAny, {
86
51
  projectDir: string;
87
52
  }, {
88
53
  projectDir: string;
89
54
  }>, {
90
- projectDir: string;
91
55
  success: boolean;
92
- result?: string;
93
56
  error?: string;
94
- }> | ToolDefinition<z.ZodEffects<z.ZodObject<{
57
+ projectDir?: string;
58
+ version: string;
59
+ }>;
60
+ };
61
+ export declare const tools: Tool[];
62
+ export declare const toolHandlers: {
63
+ [k: string]: ToolDefinition<z.ZodEffects<z.ZodObject<{
95
64
  curlInput: z.ZodEffects<z.ZodString, string, string>;
96
65
  name: z.ZodString;
97
66
  collection: z.ZodOptional<z.ZodString>;
98
67
  folder: z.ZodOptional<z.ZodString>;
99
68
  projectDir: z.ZodString;
100
69
  }, "strip", z.ZodTypeAny, {
70
+ projectDir: string;
101
71
  curlInput: string;
102
72
  name: string;
103
- projectDir: string;
104
73
  collection?: string | undefined;
105
74
  folder?: string | undefined;
106
75
  }, {
76
+ projectDir: string;
107
77
  curlInput: string;
108
78
  name: string;
109
- projectDir: string;
110
79
  collection?: string | undefined;
111
80
  folder?: string | undefined;
112
81
  }>, {
82
+ projectDir: string;
113
83
  curlInput: string;
114
84
  name: string;
115
- projectDir: string;
116
85
  collection?: string | undefined;
117
86
  folder?: string | undefined;
118
87
  }, {
88
+ projectDir: string;
119
89
  curlInput: string;
120
90
  name: string;
121
- projectDir: string;
122
91
  collection?: string | undefined;
123
92
  folder?: string | undefined;
124
93
  }>, {
125
94
  success: boolean;
126
95
  error?: string;
96
+ projectDir?: string;
97
+ version: string;
98
+ }> | ToolDefinition<z.ZodObject<{
99
+ projectDir: z.ZodString;
100
+ }, "strip", z.ZodTypeAny, {
101
+ projectDir: string;
102
+ }, {
103
+ projectDir: string;
104
+ }>, {
105
+ success: boolean;
106
+ error?: string;
107
+ projectDir?: string;
108
+ version: string;
127
109
  }>;
128
110
  };
129
111
  export declare const toolNames: Record<string, string>;
@@ -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;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;AA8BD,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsDlB,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
+ {"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;AAK1D,UAAU,cAAc,CAAC,OAAO,SAAS,SAAS,EAAE,OAAO;IACvD,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,EAAE,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;CAChF;AAmBD,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwClB,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,CAC9C,CAAC,OAAO,eAAe,CAAC,CAAC,OAAO,CAAC,MAAM,OAAO,eAAe,EAAE,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CACpF,CAAC"}
@@ -1,47 +1,24 @@
1
1
  import { z } from "zod";
2
2
  import { zodToMCPInputSchema } from "../utils/schema-converter.js";
3
3
  import { resolve } from "path";
4
+ import { execSync } from 'child_process';
4
5
  function defineTool(definition) {
5
6
  return definition;
6
7
  }
7
- // Debug logging helper
8
- function debugLog(message, data) {
9
- // if (process.env.DEBUG || process.env.MCP_DEBUG) {
10
- console.error(`[MCP-DEBUG] ${message}`, data ? JSON.stringify(data, null, 2) : '');
11
- // }
12
- }
13
8
  // Helper function to resolve project directory
14
9
  function resolveProjectDir(projectDir) {
15
- debugLog(`Input projectDir: ${projectDir}`);
16
10
  if (projectDir === "." || projectDir === "./") {
17
- const resolved = process.cwd();
18
- debugLog(`Resolved "." to: ${resolved}`);
19
- return resolved;
11
+ // Execute pwd command and get the current working directory
12
+ const currentDir = execSync('pwd', { encoding: 'utf8' }).trim();
13
+ return currentDir;
20
14
  }
21
- const resolved = resolve(projectDir);
22
- debugLog(`Resolved path: ${resolved}`);
23
- return resolved;
15
+ return resolve(projectDir);
24
16
  }
25
17
  export const toolDefinitions = {
26
- thunder_help: defineTool({
27
- name: "tc_help",
28
- description: "Show Thunder Client CLI help using `tc --help` in the given project directory.",
29
- schema: z.object({
30
- projectDir: z.string().min(1, "projectDir is required"),
31
- }),
32
- handler: async (client, args) => client.thunder_help(resolveProjectDir(args.projectDir.trim())),
33
- }),
34
- thunder_debug: defineTool({
35
- name: "tc_debug",
36
- description: "Show Thunder Client CLI debug using `tc --debug` in the given project directory.",
37
- schema: z.object({
38
- projectDir: z.string().min(1, "projectDir is required"),
39
- }),
40
- handler: async (client, args) => client.thunder_debug(resolveProjectDir(args.projectDir.trim())),
41
- }),
42
18
  thunder_curl: defineTool({
43
19
  name: "tc_create",
44
- description: "Saves API endpoints to Thunder Client, automatically creating collections and folders if they do not already exist.",
20
+ description: "Create API endpoints to Thunder Client, automatically creating collections and folders if they do not already exist.",
21
+ keywords: ["thunder client", "thunder client mcp", "tc mcp", "thunder mcp", "thunderclient"],
45
22
  schema: z
46
23
  .object({
47
24
  curlInput: z
@@ -53,26 +30,26 @@ export const toolDefinitions = {
53
30
  name: z.string().min(2, { message: "Name must be at least 2 characters" }),
54
31
  collection: z.string().optional(),
55
32
  folder: z.string().optional(),
56
- projectDir: z.string().min(1, { message: "projectDir is required" }),
33
+ projectDir: z.string()
34
+ .min(1, "projectDir is required")
35
+ .describe("Get the full path to the project's directory (use process.cwd() and get it)."),
57
36
  })
58
37
  .refine(data => !(data.folder && !data.collection), {
59
38
  message: "If 'folder' is provided, you must also provide 'collection'.",
60
39
  path: ["collection"],
61
40
  }),
62
- handler: async (client, args) => {
63
- debugLog('tc_create called with args', args);
64
- const resolvedProjectDir = resolveProjectDir(args.projectDir.trim());
65
- debugLog(`tc_create using resolved project dir: ${resolvedProjectDir}`);
66
- try {
67
- const result = await client.runCurl({ ...args, projectDir: resolvedProjectDir });
68
- debugLog('tc_create result', result);
69
- return result;
70
- }
71
- catch (error) {
72
- debugLog('tc_create error', error);
73
- throw error;
74
- }
75
- },
41
+ handler: async (client, args) => client.runCurl({ ...args, projectDir: resolveProjectDir(args.projectDir.trim()) }),
42
+ }),
43
+ thunder_debug: defineTool({
44
+ name: "tc_debug",
45
+ description: "Runs the Thunder Client debug command and display the result.",
46
+ keywords: ["thunder client", "thunder client mcp", "tc mcp", "thunder mcp", "thunderclient"],
47
+ schema: z.object({
48
+ projectDir: z.string()
49
+ .min(1, "projectDir is required")
50
+ .describe("Get the full path to the project's directory (use process.cwd() and get it)."),
51
+ }),
52
+ handler: async (client, args) => client.runDebug(resolveProjectDir(args.projectDir.trim())),
76
53
  }),
77
54
  };
78
55
  export const tools = Object.values(toolDefinitions).map(def => ({
@@ -1 +1 @@
1
- {"version":3,"file":"schema-converter.d.ts","sourceRoot":"","sources":["../../src/utils/schema-converter.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,CAAC,CAAC,SAAS,GAAG;IACxD,IAAI,EAAE,QAAQ,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACjC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAuDA"}
1
+ {"version":3,"file":"schema-converter.d.ts","sourceRoot":"","sources":["../../src/utils/schema-converter.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,CAAC,CAAC,SAAS,GAAG;IACtD,IAAI,EAAE,QAAQ,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACjC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB,CAuDA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "thunderclient-mcp",
3
- "version": "1.0.4",
3
+ "version": "1.0.7",
4
4
  "description": "Thunder Client MCP Server",
5
5
  "main": "dist/index.js`",
6
6
  "types": "dist/index.d.ts",
@@ -19,14 +19,14 @@
19
19
  "thunderclient-mcp": "dist/index.js"
20
20
  },
21
21
  "author": "Thunder Client Limited",
22
+ "homepage": "https://www.thunderclient.com",
22
23
  "license": "MIT",
23
24
  "repository": {
24
25
  "type": "git",
25
- "url": "https://github.com/thunderclient/thunder-mcp"
26
+ "url": "https://github.com/thunderclient/thunderclient-mcp"
26
27
  },
27
28
  "dependencies": {
28
29
  "@modelcontextprotocol/sdk": "^1.16.0",
29
- "upath": "^2.0.1",
30
30
  "zod": "^3.25.76",
31
31
  "zod-to-json-schema": "^3.24.6"
32
32
  },