mcp-proxy 6.1.10 → 6.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/jsr.json CHANGED
@@ -3,5 +3,5 @@
3
3
  "include": ["src/index.ts", "src/bin/mcp-proxy.ts"],
4
4
  "license": "MIT",
5
5
  "name": "@punkpeye/mcp-proxy",
6
- "version": "6.1.10"
6
+ "version": "6.2.0"
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mcp-proxy",
3
- "version": "6.1.10",
3
+ "version": "6.2.0",
4
4
  "main": "dist/index.mjs",
5
5
  "scripts": {
6
6
  "build": "tsdown",
@@ -47,6 +47,12 @@ const argv = await yargs(hideBin(process.argv))
47
47
  describe: "API key for authenticating requests (uses X-API-Key header)",
48
48
  type: "string",
49
49
  },
50
+ connectionTimeout: {
51
+ default: 60000,
52
+ describe:
53
+ "The timeout (in milliseconds) for initial connection to the MCP server (default: 60 seconds)",
54
+ type: "number",
55
+ },
50
56
  debug: {
51
57
  default: false,
52
58
  describe: "Enable debug logging",
@@ -144,7 +150,7 @@ if (dashDashArgs && dashDashArgs.length > 0) {
144
150
  process.exit(1);
145
151
  }
146
152
 
147
- const connect = async (client: Client) => {
153
+ const connect = async (client: Client, connectionTimeout: number) => {
148
154
  const transport = new StdioClientTransport({
149
155
  args: finalArgs,
150
156
  command: finalCommand,
@@ -159,7 +165,7 @@ const connect = async (client: Client) => {
159
165
  stderr: "inherit",
160
166
  });
161
167
 
162
- await client.connect(transport);
168
+ await client.connect(transport, { timeout: connectionTimeout });
163
169
  };
164
170
 
165
171
  const proxy = async () => {
@@ -173,7 +179,7 @@ const proxy = async () => {
173
179
  },
174
180
  );
175
181
 
176
- await connect(client);
182
+ await connect(client, argv.connectionTimeout);
177
183
 
178
184
  const serverVersion = client.getServerVersion() as {
179
185
  name: string;