@mcp-ts/sdk 2.4.1 → 2.4.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.
- package/dist/adapters/agui-adapter.d.mts +3 -4
- package/dist/adapters/agui-adapter.d.ts +3 -4
- package/dist/adapters/agui-middleware.d.mts +3 -4
- package/dist/adapters/agui-middleware.d.ts +3 -4
- package/dist/adapters/ai-adapter.d.mts +3 -4
- package/dist/adapters/ai-adapter.d.ts +3 -4
- package/dist/adapters/langchain-adapter.d.mts +3 -4
- package/dist/adapters/langchain-adapter.d.ts +3 -4
- package/dist/adapters/mastra-adapter.d.mts +2 -2
- package/dist/adapters/mastra-adapter.d.ts +2 -2
- package/dist/bin/mcp-ts.js +5 -5
- package/dist/bin/mcp-ts.js.map +1 -1
- package/dist/bin/mcp-ts.mjs +5 -5
- package/dist/bin/mcp-ts.mjs.map +1 -1
- package/dist/client/index.d.mts +2 -3
- package/dist/client/index.d.ts +2 -3
- package/dist/client/react.d.mts +4 -6
- package/dist/client/react.d.ts +4 -6
- package/dist/client/vue.d.mts +4 -6
- package/dist/client/vue.d.ts +4 -6
- package/dist/{index-Ch7ouNSa.d.ts → index-B8kJSrBJ.d.ts} +1 -2
- package/dist/{index-L5XoXgsb.d.mts → index-DiJsm_lK.d.mts} +1 -2
- package/dist/index.d.mts +5 -6
- package/dist/index.d.ts +5 -6
- package/dist/index.js +174 -110
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +174 -110
- package/dist/index.mjs.map +1 -1
- package/dist/{multi-session-client-k-9RvWvi.d.mts → multi-session-client-B6hsYO8V.d.mts} +218 -71
- package/dist/{multi-session-client-Bwm-efqg.d.ts → multi-session-client-DOBvtaQV.d.ts} +218 -71
- package/dist/server/index.d.mts +5 -128
- package/dist/server/index.d.ts +5 -128
- package/dist/server/index.js +174 -110
- package/dist/server/index.js.map +1 -1
- package/dist/server/index.mjs +174 -110
- package/dist/server/index.mjs.map +1 -1
- package/dist/shared/index.d.mts +4 -5
- package/dist/shared/index.d.ts +4 -5
- package/dist/{tool-router-CuApsDiV.d.mts → tool-router-CbG4Tum6.d.mts} +1 -1
- package/dist/{tool-router-CZMrOG8J.d.ts → tool-router-ChIhPwgP.d.ts} +1 -1
- package/dist/{types-DCk_IF4L.d.mts → types-CjczQwNX.d.mts} +122 -1
- package/dist/{types-DCk_IF4L.d.ts → types-CjczQwNX.d.ts} +122 -1
- package/package.json +1 -1
- package/src/bin/mcp-ts.ts +5 -5
- package/src/server/mcp/multi-session-client.ts +190 -132
- package/src/server/mcp/oauth-client.ts +49 -7
- package/src/server/storage/index.ts +8 -8
- package/dist/events-C4m7tK1U.d.mts +0 -122
- package/dist/events-C4m7tK1U.d.ts +0 -122
package/dist/shared/index.d.mts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import { B as ToolInfo } from '../types-CjczQwNX.mjs';
|
|
2
|
+
export { C as CallToolParams, a as CallToolRequest, b as CallToolResponse, c as ConnectAuthRequiredResponse, d as ConnectErrorResponse, e as ConnectParams, f as ConnectRequest, g as ConnectResponse, h as ConnectResult, i as ConnectSuccessResponse, D as DisconnectParams, j as DisconnectResult, k as Disposable, l as DisposableStore, E as Emitter, m as Event, F as FinishAuthParams, n as FinishAuthResult, G as GetPromptParams, o as GetSessionResult, L as ListPromptsResult, p as ListResourcesResult, q as ListToolsResponse, r as ListToolsRpcResult, M as McpConnectionEvent, s as McpConnectionState, t as McpObservabilityEvent, u as McpRpcMethod, v as McpRpcParams, w as McpRpcRequest, x as McpRpcResponse, R as ReadResourceParams, S as SessionInfo, y as SessionListResult, z as SessionParams, T as ToolClient, A as ToolClientProvider, H as TransportType, I as isCallToolSuccess, J as isConnectAuthRequired, K as isConnectError, N as isConnectSuccess, O as isListToolsSuccess } from '../types-CjczQwNX.mjs';
|
|
2
3
|
export { A as AuthenticationError, C as ConfigurationError, a as ConnectionError, I as InvalidStateError, M as McpError, N as NotConnectedError, R as RpcErrorCode, b as RpcErrorCodes, S as SessionNotFoundError, c as SessionValidationError, T as ToolExecutionError, U as UnauthorizedError, s as sanitizeServerLabel } from '../utils-DELRKQPU.mjs';
|
|
3
|
-
import {
|
|
4
|
-
export { C as
|
|
5
|
-
import { d as ToolRouter } from '../tool-router-CuApsDiV.mjs';
|
|
6
|
-
export { C as CompactTool, E as EmbedFn, I as IndexedTool, S as SchemaCompressor, T as ToolGroupInfo, a as ToolIndex, b as ToolIndexOptions, c as ToolListResult, e as ToolRouterClientInput, f as ToolRouterOptions, g as ToolRouterStrategy, h as ToolSearchOptions, i as ToolServerSummary, j as ToolSummary } from '../tool-router-CuApsDiV.mjs';
|
|
4
|
+
import { d as ToolRouter } from '../tool-router-CbG4Tum6.mjs';
|
|
5
|
+
export { C as CompactTool, E as EmbedFn, I as IndexedTool, S as SchemaCompressor, T as ToolGroupInfo, a as ToolIndex, b as ToolIndexOptions, c as ToolListResult, e as ToolRouterClientInput, f as ToolRouterOptions, g as ToolRouterStrategy, h as ToolSearchOptions, i as ToolServerSummary, j as ToolSummary } from '../tool-router-CbG4Tum6.mjs';
|
|
7
6
|
import { Tool, CallToolResult } from '@modelcontextprotocol/sdk/types.js';
|
|
8
7
|
|
|
9
8
|
/**
|
package/dist/shared/index.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import { B as ToolInfo } from '../types-CjczQwNX.js';
|
|
2
|
+
export { C as CallToolParams, a as CallToolRequest, b as CallToolResponse, c as ConnectAuthRequiredResponse, d as ConnectErrorResponse, e as ConnectParams, f as ConnectRequest, g as ConnectResponse, h as ConnectResult, i as ConnectSuccessResponse, D as DisconnectParams, j as DisconnectResult, k as Disposable, l as DisposableStore, E as Emitter, m as Event, F as FinishAuthParams, n as FinishAuthResult, G as GetPromptParams, o as GetSessionResult, L as ListPromptsResult, p as ListResourcesResult, q as ListToolsResponse, r as ListToolsRpcResult, M as McpConnectionEvent, s as McpConnectionState, t as McpObservabilityEvent, u as McpRpcMethod, v as McpRpcParams, w as McpRpcRequest, x as McpRpcResponse, R as ReadResourceParams, S as SessionInfo, y as SessionListResult, z as SessionParams, T as ToolClient, A as ToolClientProvider, H as TransportType, I as isCallToolSuccess, J as isConnectAuthRequired, K as isConnectError, N as isConnectSuccess, O as isListToolsSuccess } from '../types-CjczQwNX.js';
|
|
2
3
|
export { A as AuthenticationError, C as ConfigurationError, a as ConnectionError, I as InvalidStateError, M as McpError, N as NotConnectedError, R as RpcErrorCode, b as RpcErrorCodes, S as SessionNotFoundError, c as SessionValidationError, T as ToolExecutionError, U as UnauthorizedError, s as sanitizeServerLabel } from '../utils-DELRKQPU.js';
|
|
3
|
-
import {
|
|
4
|
-
export { C as
|
|
5
|
-
import { d as ToolRouter } from '../tool-router-CZMrOG8J.js';
|
|
6
|
-
export { C as CompactTool, E as EmbedFn, I as IndexedTool, S as SchemaCompressor, T as ToolGroupInfo, a as ToolIndex, b as ToolIndexOptions, c as ToolListResult, e as ToolRouterClientInput, f as ToolRouterOptions, g as ToolRouterStrategy, h as ToolSearchOptions, i as ToolServerSummary, j as ToolSummary } from '../tool-router-CZMrOG8J.js';
|
|
4
|
+
import { d as ToolRouter } from '../tool-router-ChIhPwgP.js';
|
|
5
|
+
export { C as CompactTool, E as EmbedFn, I as IndexedTool, S as SchemaCompressor, T as ToolGroupInfo, a as ToolIndex, b as ToolIndexOptions, c as ToolListResult, e as ToolRouterClientInput, f as ToolRouterOptions, g as ToolRouterStrategy, h as ToolSearchOptions, i as ToolServerSummary, j as ToolSummary } from '../tool-router-ChIhPwgP.js';
|
|
7
6
|
import { Tool, CallToolResult } from '@modelcontextprotocol/sdk/types.js';
|
|
8
7
|
|
|
9
8
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
2
|
-
import {
|
|
2
|
+
import { A as ToolClientProvider, T as ToolClient } from './types-CjczQwNX.mjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* ToolIndex — Lightweight in-memory search index for MCP tool discovery.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
2
|
-
import {
|
|
2
|
+
import { A as ToolClientProvider, T as ToolClient } from './types-CjczQwNX.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* ToolIndex — Lightweight in-memory search index for MCP tool discovery.
|
|
@@ -1,5 +1,126 @@
|
|
|
1
1
|
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* Simple event emitter pattern for MCP connection events
|
|
5
|
+
* Inspired by Cloudflare's agents pattern but adapted for serverless
|
|
6
|
+
*/
|
|
7
|
+
type Disposable = {
|
|
8
|
+
dispose(): void;
|
|
9
|
+
};
|
|
10
|
+
type Event<T> = (listener: (event: T) => void) => Disposable;
|
|
11
|
+
/**
|
|
12
|
+
* Event emitter class for type-safe event handling
|
|
13
|
+
* Similar to Cloudflare's Emitter but simplified for our use case
|
|
14
|
+
*/
|
|
15
|
+
declare class Emitter<T> {
|
|
16
|
+
private listeners;
|
|
17
|
+
/**
|
|
18
|
+
* Subscribe to events
|
|
19
|
+
* @param listener - Callback function to handle events
|
|
20
|
+
* @returns Disposable to unsubscribe
|
|
21
|
+
*/
|
|
22
|
+
get event(): Event<T>;
|
|
23
|
+
/**
|
|
24
|
+
* Fire an event to all listeners
|
|
25
|
+
* @param event - Event data to emit
|
|
26
|
+
*/
|
|
27
|
+
fire(event: T): void;
|
|
28
|
+
/**
|
|
29
|
+
* Clear all listeners
|
|
30
|
+
*/
|
|
31
|
+
dispose(): void;
|
|
32
|
+
/**
|
|
33
|
+
* Get number of active listeners
|
|
34
|
+
*/
|
|
35
|
+
get listenerCount(): number;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Connection state types matching your existing ConnectionStatus
|
|
39
|
+
* Extended with more granular states for better observability
|
|
40
|
+
*/
|
|
41
|
+
type McpConnectionState = 'DISCONNECTED' | 'CONNECTING' | 'AUTHENTICATING' | 'AUTHENTICATED' | 'DISCOVERING' | 'CONNECTED' | 'READY' | 'VALIDATING' | 'RECONNECTING' | 'INITIALIZING' | 'FAILED';
|
|
42
|
+
/**
|
|
43
|
+
* MCP Connection Event Types
|
|
44
|
+
* Discriminated union for type-safe event handling
|
|
45
|
+
*/
|
|
46
|
+
type McpConnectionEvent = {
|
|
47
|
+
type: 'state_changed';
|
|
48
|
+
sessionId: string;
|
|
49
|
+
serverId: string;
|
|
50
|
+
serverName: string;
|
|
51
|
+
serverUrl: string;
|
|
52
|
+
createdAt?: number;
|
|
53
|
+
state: McpConnectionState;
|
|
54
|
+
previousState: McpConnectionState;
|
|
55
|
+
timestamp: number;
|
|
56
|
+
} | {
|
|
57
|
+
type: 'tools_discovered';
|
|
58
|
+
sessionId: string;
|
|
59
|
+
serverId: string;
|
|
60
|
+
toolCount: number;
|
|
61
|
+
tools: any[];
|
|
62
|
+
timestamp: number;
|
|
63
|
+
} | {
|
|
64
|
+
type: 'auth_required';
|
|
65
|
+
sessionId: string;
|
|
66
|
+
serverId: string;
|
|
67
|
+
authUrl: string;
|
|
68
|
+
timestamp: number;
|
|
69
|
+
} | {
|
|
70
|
+
type: 'error';
|
|
71
|
+
sessionId: string;
|
|
72
|
+
serverId: string;
|
|
73
|
+
error: string;
|
|
74
|
+
errorType: 'connection' | 'auth' | 'validation' | 'unknown';
|
|
75
|
+
timestamp: number;
|
|
76
|
+
} | {
|
|
77
|
+
type: 'disconnected';
|
|
78
|
+
sessionId: string;
|
|
79
|
+
serverId: string;
|
|
80
|
+
timestamp: number;
|
|
81
|
+
} | {
|
|
82
|
+
type: 'progress';
|
|
83
|
+
sessionId: string;
|
|
84
|
+
serverId: string;
|
|
85
|
+
message: string;
|
|
86
|
+
timestamp: number;
|
|
87
|
+
};
|
|
88
|
+
/**
|
|
89
|
+
* Event fired when a tool execution returns a UI resource URI
|
|
90
|
+
*/
|
|
91
|
+
interface McpAppsUIEvent {
|
|
92
|
+
type: 'mcp-apps-ui';
|
|
93
|
+
sessionId: string;
|
|
94
|
+
resourceUri: string;
|
|
95
|
+
toolName: string;
|
|
96
|
+
result: unknown;
|
|
97
|
+
timestamp: number;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Observability event for debugging and monitoring
|
|
101
|
+
*/
|
|
102
|
+
interface McpObservabilityEvent {
|
|
103
|
+
type?: string;
|
|
104
|
+
level?: 'debug' | 'info' | 'warn' | 'error';
|
|
105
|
+
message?: string;
|
|
106
|
+
displayMessage?: string;
|
|
107
|
+
sessionId?: string;
|
|
108
|
+
serverId?: string;
|
|
109
|
+
payload?: Record<string, any>;
|
|
110
|
+
metadata?: Record<string, any>;
|
|
111
|
+
timestamp: number;
|
|
112
|
+
id?: string;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* DisposableStore for managing multiple disposables
|
|
116
|
+
* Useful for cleanup in React hooks
|
|
117
|
+
*/
|
|
118
|
+
declare class DisposableStore {
|
|
119
|
+
private disposables;
|
|
120
|
+
add(disposable: Disposable): void;
|
|
121
|
+
dispose(): void;
|
|
122
|
+
}
|
|
123
|
+
|
|
3
124
|
/**
|
|
4
125
|
* Type definitions for MCP operations
|
|
5
126
|
*/
|
|
@@ -186,4 +307,4 @@ interface ListResourcesResult {
|
|
|
186
307
|
}>;
|
|
187
308
|
}
|
|
188
309
|
|
|
189
|
-
export {
|
|
310
|
+
export { type ToolClientProvider as A, type ToolInfo as B, type CallToolParams as C, type DisconnectParams as D, Emitter as E, type FinishAuthParams as F, type GetPromptParams as G, type TransportType as H, isCallToolSuccess as I, isConnectAuthRequired as J, isConnectError as K, type ListPromptsResult as L, type McpConnectionEvent as M, isConnectSuccess as N, isListToolsSuccess as O, type McpAppsUIEvent as P, type ReadResourceParams as R, type SessionInfo as S, type ToolClient as T, type CallToolRequest as a, type CallToolResponse as b, type ConnectAuthRequiredResponse as c, type ConnectErrorResponse as d, type ConnectParams as e, type ConnectRequest as f, type ConnectResponse as g, type ConnectResult as h, type ConnectSuccessResponse as i, type DisconnectResult as j, type Disposable as k, DisposableStore as l, type Event as m, type FinishAuthResult as n, type GetSessionResult as o, type ListResourcesResult as p, type ListToolsResponse as q, type ListToolsRpcResult as r, type McpConnectionState as s, type McpObservabilityEvent as t, type McpRpcMethod as u, type McpRpcParams as v, type McpRpcRequest as w, type McpRpcResponse as x, type SessionListResult as y, type SessionParams as z };
|
|
@@ -1,5 +1,126 @@
|
|
|
1
1
|
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* Simple event emitter pattern for MCP connection events
|
|
5
|
+
* Inspired by Cloudflare's agents pattern but adapted for serverless
|
|
6
|
+
*/
|
|
7
|
+
type Disposable = {
|
|
8
|
+
dispose(): void;
|
|
9
|
+
};
|
|
10
|
+
type Event<T> = (listener: (event: T) => void) => Disposable;
|
|
11
|
+
/**
|
|
12
|
+
* Event emitter class for type-safe event handling
|
|
13
|
+
* Similar to Cloudflare's Emitter but simplified for our use case
|
|
14
|
+
*/
|
|
15
|
+
declare class Emitter<T> {
|
|
16
|
+
private listeners;
|
|
17
|
+
/**
|
|
18
|
+
* Subscribe to events
|
|
19
|
+
* @param listener - Callback function to handle events
|
|
20
|
+
* @returns Disposable to unsubscribe
|
|
21
|
+
*/
|
|
22
|
+
get event(): Event<T>;
|
|
23
|
+
/**
|
|
24
|
+
* Fire an event to all listeners
|
|
25
|
+
* @param event - Event data to emit
|
|
26
|
+
*/
|
|
27
|
+
fire(event: T): void;
|
|
28
|
+
/**
|
|
29
|
+
* Clear all listeners
|
|
30
|
+
*/
|
|
31
|
+
dispose(): void;
|
|
32
|
+
/**
|
|
33
|
+
* Get number of active listeners
|
|
34
|
+
*/
|
|
35
|
+
get listenerCount(): number;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Connection state types matching your existing ConnectionStatus
|
|
39
|
+
* Extended with more granular states for better observability
|
|
40
|
+
*/
|
|
41
|
+
type McpConnectionState = 'DISCONNECTED' | 'CONNECTING' | 'AUTHENTICATING' | 'AUTHENTICATED' | 'DISCOVERING' | 'CONNECTED' | 'READY' | 'VALIDATING' | 'RECONNECTING' | 'INITIALIZING' | 'FAILED';
|
|
42
|
+
/**
|
|
43
|
+
* MCP Connection Event Types
|
|
44
|
+
* Discriminated union for type-safe event handling
|
|
45
|
+
*/
|
|
46
|
+
type McpConnectionEvent = {
|
|
47
|
+
type: 'state_changed';
|
|
48
|
+
sessionId: string;
|
|
49
|
+
serverId: string;
|
|
50
|
+
serverName: string;
|
|
51
|
+
serverUrl: string;
|
|
52
|
+
createdAt?: number;
|
|
53
|
+
state: McpConnectionState;
|
|
54
|
+
previousState: McpConnectionState;
|
|
55
|
+
timestamp: number;
|
|
56
|
+
} | {
|
|
57
|
+
type: 'tools_discovered';
|
|
58
|
+
sessionId: string;
|
|
59
|
+
serverId: string;
|
|
60
|
+
toolCount: number;
|
|
61
|
+
tools: any[];
|
|
62
|
+
timestamp: number;
|
|
63
|
+
} | {
|
|
64
|
+
type: 'auth_required';
|
|
65
|
+
sessionId: string;
|
|
66
|
+
serverId: string;
|
|
67
|
+
authUrl: string;
|
|
68
|
+
timestamp: number;
|
|
69
|
+
} | {
|
|
70
|
+
type: 'error';
|
|
71
|
+
sessionId: string;
|
|
72
|
+
serverId: string;
|
|
73
|
+
error: string;
|
|
74
|
+
errorType: 'connection' | 'auth' | 'validation' | 'unknown';
|
|
75
|
+
timestamp: number;
|
|
76
|
+
} | {
|
|
77
|
+
type: 'disconnected';
|
|
78
|
+
sessionId: string;
|
|
79
|
+
serverId: string;
|
|
80
|
+
timestamp: number;
|
|
81
|
+
} | {
|
|
82
|
+
type: 'progress';
|
|
83
|
+
sessionId: string;
|
|
84
|
+
serverId: string;
|
|
85
|
+
message: string;
|
|
86
|
+
timestamp: number;
|
|
87
|
+
};
|
|
88
|
+
/**
|
|
89
|
+
* Event fired when a tool execution returns a UI resource URI
|
|
90
|
+
*/
|
|
91
|
+
interface McpAppsUIEvent {
|
|
92
|
+
type: 'mcp-apps-ui';
|
|
93
|
+
sessionId: string;
|
|
94
|
+
resourceUri: string;
|
|
95
|
+
toolName: string;
|
|
96
|
+
result: unknown;
|
|
97
|
+
timestamp: number;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Observability event for debugging and monitoring
|
|
101
|
+
*/
|
|
102
|
+
interface McpObservabilityEvent {
|
|
103
|
+
type?: string;
|
|
104
|
+
level?: 'debug' | 'info' | 'warn' | 'error';
|
|
105
|
+
message?: string;
|
|
106
|
+
displayMessage?: string;
|
|
107
|
+
sessionId?: string;
|
|
108
|
+
serverId?: string;
|
|
109
|
+
payload?: Record<string, any>;
|
|
110
|
+
metadata?: Record<string, any>;
|
|
111
|
+
timestamp: number;
|
|
112
|
+
id?: string;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* DisposableStore for managing multiple disposables
|
|
116
|
+
* Useful for cleanup in React hooks
|
|
117
|
+
*/
|
|
118
|
+
declare class DisposableStore {
|
|
119
|
+
private disposables;
|
|
120
|
+
add(disposable: Disposable): void;
|
|
121
|
+
dispose(): void;
|
|
122
|
+
}
|
|
123
|
+
|
|
3
124
|
/**
|
|
4
125
|
* Type definitions for MCP operations
|
|
5
126
|
*/
|
|
@@ -186,4 +307,4 @@ interface ListResourcesResult {
|
|
|
186
307
|
}>;
|
|
187
308
|
}
|
|
188
309
|
|
|
189
|
-
export {
|
|
310
|
+
export { type ToolClientProvider as A, type ToolInfo as B, type CallToolParams as C, type DisconnectParams as D, Emitter as E, type FinishAuthParams as F, type GetPromptParams as G, type TransportType as H, isCallToolSuccess as I, isConnectAuthRequired as J, isConnectError as K, type ListPromptsResult as L, type McpConnectionEvent as M, isConnectSuccess as N, isListToolsSuccess as O, type McpAppsUIEvent as P, type ReadResourceParams as R, type SessionInfo as S, type ToolClient as T, type CallToolRequest as a, type CallToolResponse as b, type ConnectAuthRequiredResponse as c, type ConnectErrorResponse as d, type ConnectParams as e, type ConnectRequest as f, type ConnectResponse as g, type ConnectResult as h, type ConnectSuccessResponse as i, type DisconnectResult as j, type Disposable as k, DisposableStore as l, type Event as m, type FinishAuthResult as n, type GetSessionResult as o, type ListResourcesResult as p, type ListToolsResponse as q, type ListToolsRpcResult as r, type McpConnectionState as s, type McpObservabilityEvent as t, type McpRpcMethod as u, type McpRpcParams as v, type McpRpcRequest as w, type McpRpcResponse as x, type SessionListResult as y, type SessionParams as z };
|
package/package.json
CHANGED
package/src/bin/mcp-ts.ts
CHANGED
|
@@ -82,13 +82,13 @@ async function initSupabase() {
|
|
|
82
82
|
console.log(' npx supabase db push');
|
|
83
83
|
console.log('\n3. Add your Supabase credentials to .env:');
|
|
84
84
|
console.log(' SUPABASE_URL=https://<your-project-id>.supabase.co');
|
|
85
|
-
console.log('
|
|
86
|
-
console.log('\n⚠️ Important: Use the
|
|
87
|
-
console.log(' The
|
|
88
|
-
console.log(' Find it in: Supabase Dashboard -> Project Settings -> API ->
|
|
85
|
+
console.log(' SUPABASE_SECRET_KEY=<your-secret-key>');
|
|
86
|
+
console.log('\n⚠️ Important: Use the secret key (not the anon key) for server-side storage.');
|
|
87
|
+
console.log(' The secret key bypasses RLS policies and is required for mcp-ts to work correctly.');
|
|
88
|
+
console.log(' Find it in: Supabase Dashboard -> Project Settings -> API -> Secret key');
|
|
89
89
|
} else if (files.length > 0) {
|
|
90
90
|
console.log('\n👍 All migration files are already present in your project.');
|
|
91
|
-
console.log(' Ensure
|
|
91
|
+
console.log(' Ensure SUPABASE_SECRET_KEY (not SUPABASE_ANON_KEY) is set in your .env');
|
|
92
92
|
} else {
|
|
93
93
|
console.log('⚠️ No migration files found to copy.');
|
|
94
94
|
}
|