@runpod/mcp-server 2.0.0 → 3.1.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/tools.d.cts CHANGED
@@ -25,6 +25,18 @@ declare function createHttpClient(deps: {
25
25
  errorPrefix: string;
26
26
  }): HttpClient;
27
27
 
28
+ interface SseResponse {
29
+ ok: boolean;
30
+ status: number;
31
+ text(): Promise<string>;
32
+ body: AsyncIterable<Buffer> | null;
33
+ }
34
+ type SseFetch = (url: string, init: {
35
+ method: string;
36
+ headers: Record<string, string>;
37
+ signal: AbortSignal;
38
+ }) => Promise<SseResponse>;
39
+
28
40
  /**
29
41
  * Context passed to every tool handler. Contains the API key used to
30
42
  * authenticate against the Runpod REST and Serverless APIs, the transport the
@@ -36,12 +48,14 @@ interface ToolContext {
36
48
  transport: 'stdio' | 'http';
37
49
  clientUserAgent?: string;
38
50
  serverVersion?: string;
51
+ onUnauthorized?: () => void;
39
52
  }
40
53
  type HttpFetch = Parameters<typeof createHttpClient>[0]['fetch'];
41
54
  interface ToolDeps {
42
55
  fetch?: HttpFetch;
43
56
  v2Available?: boolean;
44
57
  streamSse?: StreamSse;
58
+ sseFetch?: SseFetch;
45
59
  }
46
60
  interface StreamSseResult {
47
61
  raw: string;
package/dist/tools.d.ts CHANGED
@@ -25,6 +25,18 @@ declare function createHttpClient(deps: {
25
25
  errorPrefix: string;
26
26
  }): HttpClient;
27
27
 
28
+ interface SseResponse {
29
+ ok: boolean;
30
+ status: number;
31
+ text(): Promise<string>;
32
+ body: AsyncIterable<Buffer> | null;
33
+ }
34
+ type SseFetch = (url: string, init: {
35
+ method: string;
36
+ headers: Record<string, string>;
37
+ signal: AbortSignal;
38
+ }) => Promise<SseResponse>;
39
+
28
40
  /**
29
41
  * Context passed to every tool handler. Contains the API key used to
30
42
  * authenticate against the Runpod REST and Serverless APIs, the transport the
@@ -36,12 +48,14 @@ interface ToolContext {
36
48
  transport: 'stdio' | 'http';
37
49
  clientUserAgent?: string;
38
50
  serverVersion?: string;
51
+ onUnauthorized?: () => void;
39
52
  }
40
53
  type HttpFetch = Parameters<typeof createHttpClient>[0]['fetch'];
41
54
  interface ToolDeps {
42
55
  fetch?: HttpFetch;
43
56
  v2Available?: boolean;
44
57
  streamSse?: StreamSse;
58
+ sseFetch?: SseFetch;
45
59
  }
46
60
  interface StreamSseResult {
47
61
  raw: string;
package/dist/tools.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  registerTools
3
- } from "./chunk-ZP3TCVXG.mjs";
3
+ } from "./chunk-OM6RHPQC.mjs";
4
4
  export {
5
5
  registerTools
6
6
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@runpod/mcp-server",
3
- "version": "2.0.0",
3
+ "version": "3.1.0",
4
4
  "description": "MCP server for interacting with Runpod API",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",