@runpod/mcp-server 3.3.0 → 4.0.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/http.d.cts CHANGED
@@ -1,10 +1,8 @@
1
- import { ToolContext } from './tools.cjs';
2
- export { registerTools } from './tools.cjs';
3
1
  import { IncomingMessage, ServerResponse } from 'node:http';
4
- import '@modelcontextprotocol/sdk/server/mcp.js';
5
2
 
6
3
  type CredentialVerdict = {
7
4
  status: 'valid';
5
+ accountId?: string;
8
6
  } | {
9
7
  status: 'invalid';
10
8
  reason: string;
@@ -17,12 +15,14 @@ interface CredentialCheckerHandle {
17
15
  invalidate: (token: string) => void;
18
16
  }
19
17
 
18
+ declare function getBaseUrl(req: {
19
+ headers: {
20
+ host?: string;
21
+ 'x-forwarded-proto'?: string | string[];
22
+ };
23
+ }): string;
20
24
  declare const defaultCredentialChecker: CredentialCheckerHandle;
21
25
  declare function bodyIsCheckable(body: unknown): boolean;
22
- declare function buildToolContext(req: IncomingMessage, bearerToken: string, opts?: {
23
- serverVersion?: string;
24
- invalidateCredential?: (token: string) => void;
25
- }): ToolContext;
26
26
  /**
27
27
  * Handle an incoming HTTP request as a streamable MCP session.
28
28
  *
@@ -48,4 +48,4 @@ declare function handleMcpRequest(req: IncomingMessage, res: ServerResponse, opt
48
48
  invalidateCredential?: (token: string) => void;
49
49
  }): Promise<void>;
50
50
 
51
- export { ToolContext, bodyIsCheckable, buildToolContext, defaultCredentialChecker, handleMcpRequest };
51
+ export { bodyIsCheckable, defaultCredentialChecker, getBaseUrl, handleMcpRequest };
package/dist/http.d.ts CHANGED
@@ -1,10 +1,8 @@
1
- import { ToolContext } from './tools.js';
2
- export { registerTools } from './tools.js';
3
1
  import { IncomingMessage, ServerResponse } from 'node:http';
4
- import '@modelcontextprotocol/sdk/server/mcp.js';
5
2
 
6
3
  type CredentialVerdict = {
7
4
  status: 'valid';
5
+ accountId?: string;
8
6
  } | {
9
7
  status: 'invalid';
10
8
  reason: string;
@@ -17,12 +15,14 @@ interface CredentialCheckerHandle {
17
15
  invalidate: (token: string) => void;
18
16
  }
19
17
 
18
+ declare function getBaseUrl(req: {
19
+ headers: {
20
+ host?: string;
21
+ 'x-forwarded-proto'?: string | string[];
22
+ };
23
+ }): string;
20
24
  declare const defaultCredentialChecker: CredentialCheckerHandle;
21
25
  declare function bodyIsCheckable(body: unknown): boolean;
22
- declare function buildToolContext(req: IncomingMessage, bearerToken: string, opts?: {
23
- serverVersion?: string;
24
- invalidateCredential?: (token: string) => void;
25
- }): ToolContext;
26
26
  /**
27
27
  * Handle an incoming HTTP request as a streamable MCP session.
28
28
  *
@@ -48,4 +48,4 @@ declare function handleMcpRequest(req: IncomingMessage, res: ServerResponse, opt
48
48
  invalidateCredential?: (token: string) => void;
49
49
  }): Promise<void>;
50
50
 
51
- export { ToolContext, bodyIsCheckable, buildToolContext, defaultCredentialChecker, handleMcpRequest };
51
+ export { bodyIsCheckable, defaultCredentialChecker, getBaseUrl, handleMcpRequest };