@rekog/mcp-nest 1.2.0 → 1.3.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.
Files changed (64) hide show
  1. package/.github/workflows/pipeline.yml +26 -0
  2. package/.prettierrc +4 -0
  3. package/README.md +51 -190
  4. package/dist/controllers/sse.controller.factory.d.ts +4 -6
  5. package/dist/controllers/sse.controller.factory.d.ts.map +1 -1
  6. package/dist/controllers/sse.controller.factory.js +13 -6
  7. package/dist/controllers/sse.controller.factory.js.map +1 -1
  8. package/dist/decorators/constants.d.ts +1 -0
  9. package/dist/decorators/constants.d.ts.map +1 -1
  10. package/dist/decorators/constants.js +2 -1
  11. package/dist/decorators/constants.js.map +1 -1
  12. package/dist/decorators/index.d.ts +1 -0
  13. package/dist/decorators/index.d.ts.map +1 -1
  14. package/dist/decorators/index.js +1 -0
  15. package/dist/decorators/index.js.map +1 -1
  16. package/dist/decorators/resource.decorator.d.ts +9 -0
  17. package/dist/decorators/resource.decorator.d.ts.map +1 -0
  18. package/dist/decorators/resource.decorator.js +10 -0
  19. package/dist/decorators/resource.decorator.js.map +1 -0
  20. package/dist/decorators/tool.decorator.d.ts +4 -3
  21. package/dist/decorators/tool.decorator.d.ts.map +1 -1
  22. package/dist/decorators/tool.decorator.js +2 -6
  23. package/dist/decorators/tool.decorator.js.map +1 -1
  24. package/dist/index.d.ts +2 -2
  25. package/dist/index.d.ts.map +1 -1
  26. package/dist/index.js +2 -2
  27. package/dist/index.js.map +1 -1
  28. package/dist/interfaces/index.d.ts +1 -0
  29. package/dist/interfaces/index.d.ts.map +1 -1
  30. package/dist/interfaces/index.js +1 -0
  31. package/dist/interfaces/index.js.map +1 -1
  32. package/dist/interfaces/mcp-tool.interface.d.ts +15 -0
  33. package/dist/interfaces/mcp-tool.interface.d.ts.map +1 -0
  34. package/dist/interfaces/mcp-tool.interface.js +3 -0
  35. package/dist/interfaces/mcp-tool.interface.js.map +1 -0
  36. package/dist/mcp.module.d.ts.map +1 -1
  37. package/dist/mcp.module.js +8 -25
  38. package/dist/mcp.module.js.map +1 -1
  39. package/dist/services/mcp-executor.service.d.ts +15 -0
  40. package/dist/services/mcp-executor.service.d.ts.map +1 -0
  41. package/dist/services/mcp-executor.service.js +172 -0
  42. package/dist/services/mcp-executor.service.js.map +1 -0
  43. package/dist/services/mcp-registry.service.d.ts +31 -0
  44. package/dist/services/mcp-registry.service.d.ts.map +1 -0
  45. package/dist/services/mcp-registry.service.js +119 -0
  46. package/dist/services/mcp-registry.service.js.map +1 -0
  47. package/dist/services/mcp-registry.service.spec.d.ts +2 -0
  48. package/dist/services/mcp-registry.service.spec.d.ts.map +1 -0
  49. package/dist/services/mcp-registry.service.spec.js +61 -0
  50. package/dist/services/mcp-registry.service.spec.js.map +1 -0
  51. package/eslint.config.mjs +38 -0
  52. package/image.png +0 -0
  53. package/package.json +22 -5
  54. package/playground/README.md +17 -0
  55. package/playground/greeting.resource.ts +25 -0
  56. package/playground/greeting.tool.ts +36 -0
  57. package/playground/server.ts +25 -0
  58. package/tests/mcp-resource.e2e.spec.ts +179 -0
  59. package/tests/{mcp-auth.e2e.spec.ts → mcp-tool-auth.e2e.spec.ts} +72 -83
  60. package/tests/mcp-tool.e2e.spec.ts +235 -0
  61. package/tests/utils.ts +42 -0
  62. package/tsconfig.build.json +11 -0
  63. package/tsconfig.build.tsbuildinfo +1 -0
  64. package/tests/mcp.e2e.spec.ts +0 -115
@@ -0,0 +1,26 @@
1
+ name: Node.js CI and Publish
2
+
3
+ on:
4
+ push:
5
+ branches: [main, master]
6
+ pull_request:
7
+ branches: [main, master]
8
+
9
+ jobs:
10
+ test:
11
+ runs-on: ubuntu-latest
12
+ strategy:
13
+ matrix:
14
+ node-version: [18.x, 20.x]
15
+
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+ - name: Use Node.js ${{ matrix.node-version }}
19
+ uses: actions/setup-node@v4
20
+ with:
21
+ node-version: ${{ matrix.node-version }}
22
+ cache: 'npm'
23
+ - name: Install dependencies
24
+ run: npm ci
25
+ - name: Run tests
26
+ run: npm run test
package/.prettierrc ADDED
@@ -0,0 +1,4 @@
1
+ {
2
+ "singleQuote": true,
3
+ "trailingComma": "all"
4
+ }
package/README.md CHANGED
@@ -1,19 +1,23 @@
1
1
  # NestJS MCP Server Module
2
2
 
3
- A NestJS module for exposing your services as an MCP (Model Context Protocol) server with Server-Sent Events (SSE) transport. This package simplifies exposing tools that clients can discover and execute via SSE.
3
+ A NestJS module for creating an MCP (Model Context Protocol) server with Server-Sent Events (SSE) transport.
4
+
5
+ <p align="center">
6
+ <img src="./image.png" height="200">
7
+ </p>
4
8
 
5
9
  ## Features
6
10
 
7
- - **SSE Transport**: Built-in `/sse` endpoint for streaming and `/messages` for handling tool execution
8
- - **Tool Discovery**: Automatically discover and register tools using decorators
9
- - **Tool Request Validation**: Define Zod schemas to validate tool requests.
10
- - **Progress Notifications**: Send continuous progress updates from tools to clients.
11
- - **Authentication**: Integrates with NestJS Guards for securing endpoints.
11
+ - 🚀 SSE Transport for streaming and tool execution
12
+ - 🔍 Automatic `tool` and `resource` discovery and registration
13
+ - 💯 Zod-based request validation
14
+ - 📊 Progress notifications
15
+ - 🔒 Guard-based authentication
12
16
 
13
17
  ## Installation
14
18
 
15
19
  ```bash
16
- npm install @rekog/mcp-nest reflect-metadata @modelcontextprotocol/sdk zod @nestjs/common @nestjs/core
20
+ npm install @rekog/mcp-nest @modelcontextprotocol/sdk zod
17
21
  ```
18
22
 
19
23
  ## Quick Start
@@ -31,14 +35,14 @@ import { GreetingTool } from './greeting.tool';
31
35
  McpModule.forRoot({
32
36
  name: 'my-mcp-server',
33
37
  version: '1.0.0',
34
- })
38
+ }),
35
39
  ],
36
- providers: [GreetingTool]
40
+ providers: [GreetingTool],
37
41
  })
38
42
  export class AppModule {}
39
43
  ```
40
44
 
41
- ### 2. Define Tools
45
+ ### 2. Define Tools and Resource
42
46
 
43
47
  ```typescript
44
48
  // greeting.tool.ts
@@ -77,50 +81,52 @@ export class GreetingTool {
77
81
  content: [{ type: 'text', text: greeting }],
78
82
  };
79
83
  }
84
+
85
+ @Resource({
86
+ uri: 'mcp://hello-world/{userName}',
87
+ name: 'Hello World',
88
+ description: 'A simple greeting resource',
89
+ mimeType: 'text/plain',
90
+ })
91
+ // Different from the SDK, we put the parameters and URI in the same object.
92
+ async getCurrentSchema({ uri, userName }) {
93
+ return {
94
+ content: [
95
+ {
96
+ uri,
97
+ text: `User is ${userName}`,
98
+ mimeType: 'text/plain',
99
+ },
100
+ ],
101
+ };
102
+ }
80
103
  }
81
104
  ```
82
105
 
83
106
  You are done!
84
107
 
85
- ## Authentication
108
+ ## API Endpoints
86
109
 
87
- You can secure your MCP endpoints using standard NestJS Guards.
110
+ - `GET /sse`: SSE connection endpoint (Protected by guards if configured)
111
+ - `POST /messages`: Tool execution endpoint (Protected by guards if configured)
88
112
 
89
- ### 1. Create a Guard
113
+ ### Tips
90
114
 
91
- Implement the `CanActivate` interface. The guard should handle request validation (e.g., checking JWTs, API keys) and optionally attach user information to the request object.
92
- <details>
93
- <summary>Example Guard Implementation</summary>
115
+ It's possible to use the module with global prefix, but the recommended way is to exclude those endpoints with:
94
116
 
95
117
  ```typescript
96
- // auth.guard.ts
97
- import { Injectable, CanActivate, ExecutionContext } from '@nestjs/common';
98
- import { Observable } from 'rxjs';
118
+ app.setGlobalPrefix('/api', { exclude: ['sse', 'messages'] });
119
+ ```
99
120
 
100
- @Injectable()
101
- export class AuthGuard implements CanActivate {
102
- canActivate(
103
- context: ExecutionContext,
104
- ): boolean | Promise<boolean> | Observable<boolean> {
105
- const request = context.switchToHttp().getRequest();
106
- const authorization = request.headers.authorization;
107
-
108
- // Example: Check for a specific Bearer token
109
- if (authorization && authorization.startsWith('Bearer ')) {
110
- const token = authorization.substring(7);
111
- if (token === 'your-secret-token') {
112
- // Attach user info if needed (optional)
113
- request.user = { id: 'user-123', roles: ['admin'] };
114
- return true; // Allow access
115
- }
116
- }
121
+ ## Authentication
117
122
 
118
- return false; // Deny access
119
- }
120
- }
121
- ```
123
+ You can secure your MCP endpoints using standard NestJS Guards.
124
+
125
+ ### 1. Create a Guard
126
+
127
+ Implement the `CanActivate` interface. The guard should handle request validation (e.g., checking JWTs, API keys) and optionally attach user information to the request object.
122
128
 
123
- </details>
129
+ Nothing special, check the NestJS documentation for more details.
124
130
 
125
131
  ### 2. Apply the Guard
126
132
 
@@ -138,157 +144,12 @@ import { AuthGuard } from './auth.guard';
138
144
  McpModule.forRoot({
139
145
  name: 'my-mcp-server',
140
146
  version: '1.0.0',
141
- guards: [AuthGuard] // Apply the guard here
142
- })
147
+ guards: [AuthGuard], // Apply the guard here
148
+ }),
143
149
  ],
144
- providers: [GreetingTool, AuthGuard] // Ensure the Guard is also provided
150
+ providers: [GreetingTool, AuthGuard], // Ensure the Guard is also provided
145
151
  })
146
152
  export class AppModule {}
147
153
  ```
148
154
 
149
- ### 3. Access User Context in Tools (Optional)
150
-
151
- If your guard attaches user information to the `request` object (e.g., `request.user = ...`), you can access it in your tool as the third parameter.
152
-
153
- ```typescript
154
- // authenticated-greeting.tool.ts
155
- import { Injectable } from '@nestjs/common';
156
- import { Tool, Context } from '@rekog/mcp-nest';
157
- import { z } from 'zod';
158
- import { Request } from 'express'; // Import Request from express
159
-
160
- @Injectable()
161
- export class AuthenticatedGreetingTool {
162
-
163
- @Tool({
164
- name: 'auth-hello-world',
165
- description: 'Greets the authenticated user',
166
- parameters: z.object({}), // No parameters needed for this example
167
- })
168
- // Add 'request' as the third parameter
169
- async sayAuthHello(args: {}, context: Context, request: Request & { user?: { id: string } }) {
170
- const userId = request.user?.id || 'Anonymous';
171
- const greeting = `Hello, user ${userId}!`;
172
-
173
- return {
174
- content: [{ type: 'text', text: greeting }],
175
- };
176
- }
177
- }
178
- ```
179
-
180
- *Note: Ensure your tool (`AuthenticatedGreetingTool` in this example) is added to the `providers` array in your `AppModule`.*
181
-
182
- ## Client Connection
183
-
184
- Clients need to provide the necessary credentials (e.g., Authorization header) when connecting if authentication is enabled.
185
-
186
- ### Unauthenticated Client
187
-
188
- ```typescript
189
- // client.ts (no authentication)
190
- import { Client } from '@modelcontextprotocol/sdk/client';
191
- import { SSEClientTransport } from '@modelcontextprotocol/sdk/client/sse';
192
-
193
- const client = new Client(
194
- { name: 'client-name', version: '1.0.0' },
195
- { capabilities: {} }
196
- );
197
-
198
- await client.connect(
199
- new SSEClientTransport(new URL('http://localhost:3000/sse'))
200
- );
201
-
202
- // ... list tools, call tools etc.
203
- ```
204
-
205
- ### Authenticated Client
206
-
207
- Pass request options (like headers) to the `SSEClientTransport`.
208
-
209
- ```typescript
210
- // client.ts (with authentication)
211
- import { Client } from '@modelcontextprotocol/sdk/client';
212
- import { SSEClientTransport } from '@modelcontextprotocol/sdk/client/sse';
213
-
214
- const client = new Client(
215
- { name: 'client-name', version: '1.0.0' },
216
- { capabilities: {} }
217
- );
218
-
219
- const transport = new SSEClientTransport(
220
- new URL('http://localhost:3000/sse'),
221
- {
222
- // Provide necessary credentials here
223
- requestInit: {
224
- headers: {
225
- Authorization: 'Bearer your-secret-token' // Match guard expectation
226
- }
227
- }
228
- }
229
- );
230
-
231
- await client.connect(transport);
232
-
233
-
234
- // Execute the 'auth-hello-world' tool
235
- const greetResult = await client.callTool(
236
- {
237
- name: 'auth-hello-world',
238
- arguments: {},
239
- },
240
- undefined, // responseSchema is optional
241
- {
242
- onprogress: (progress) => { // Example progress handler
243
- console.log(
244
- `Progress: ${progress.progress}/${progress.total}`
245
- );
246
- },
247
- },
248
- );
249
-
250
- console.log(greetResult.content[0].text); // Output: Hello, user user-123!
251
- ```
252
-
253
- ## API Endpoints
254
-
255
- - `GET /sse`: SSE connection endpoint (Protected by guards if configured)
256
- - `POST /messages`: Tool execution endpoint (Protected by guards if configured)
257
-
258
- ## Configuration Reference
259
-
260
- ### `McpOptions`
261
-
262
- | Property | Type | Description | Default Value |
263
- |----------------------|---------------------------|-----------------------------------------------------------------------------|---------------|
264
- | `name` | string | Server name | - |
265
- | `version` | string | Server version | - |
266
- | `capabilities` | Record<string, any> | Server capabilities, defines what the server can do. | `{}` |
267
- | `guards` | `any[]` (NestJS Guards) | An array of NestJS Guards to apply to the MCP endpoints. | `[]` |
268
- | `sseEndpoint` | string (optional) | Endpoint for SSE connections. | `'sse'` |
269
- | `messagesEndpoint` | string (optional) | Endpoint for handling tool execution. | `'messages'` |
270
- | `globalApiPrefix` | string (optional) | Global API prefix for all endpoints. | `''` |
271
-
272
- ### Tool Decorator
273
-
274
- The `@Tool` decorator is used to define a method as an MCP tool.
275
-
276
- ```typescript
277
- @Tool({ name: string, description: string, parameters?: z.ZodObject<any> })
278
- ```
279
-
280
- - `name`: The name of the tool. This will be used to list it in the `listTools` request.
281
- - `description`: A description of the tool.
282
- - `parameters`: (Optional) A Zod schema defining the expected structure of the tool's input arguments.
283
-
284
- ### Context Parameter
285
-
286
- The second parameter passed to a `@Tool` decorated method is the `Context` object.
287
-
288
- - `context.reportProgress(progress: Progress)`: Sends a progress update message to the client. `Progress` typically has `{ progress: number, total: number }`.
289
-
290
- ### Request Paramter
291
-
292
- The third parameter passed to a `@Tool` decorated method is the `Request` object.
293
-
294
- - `request`: The request object from the underlying HTTP framework (e.g., Express). This can be used to access headers, query parameters, etc.
155
+ That's it! The rest is the same as NestJS Guards.
@@ -5,18 +5,16 @@ import { ModuleRef } from '@nestjs/core';
5
5
  import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
6
6
  import { SSEServerTransport } from '@modelcontextprotocol/sdk/server/sse.js';
7
7
  import { McpOptions } from '../interfaces';
8
- import { McpToolRegistryService } from '../services/mcp-tool-registry.service';
8
+ import { McpRegistryService } from '../services/mcp-registry.service';
9
9
  export declare function createSseController(sseEndpoint: string, messagesEndpoint: string, globalApiPrefix: string, guards?: Type<CanActivate>[]): {
10
- new (options: McpOptions, moduleRef: ModuleRef, toolRegistry: McpToolRegistryService): {
10
+ new (options: McpOptions, moduleRef: ModuleRef, toolRegistry: McpRegistryService): {
11
11
  transports: Map<string, SSEServerTransport>;
12
12
  mcpServers: Map<string, McpServer>;
13
13
  readonly options: McpOptions;
14
14
  readonly moduleRef: ModuleRef;
15
- readonly toolRegistry: McpToolRegistryService;
15
+ readonly toolRegistry: McpRegistryService;
16
16
  sse(res: Response): Promise<void>;
17
- messages(req: Request & {
18
- user: any;
19
- }, res: Response, body: unknown): Promise<Response<any, Record<string, any>> | undefined>;
17
+ messages(req: Request, res: Response, body: unknown): Promise<Response<any, Record<string, any>> | undefined>;
20
18
  };
21
19
  };
22
20
  //# sourceMappingURL=sse.controller.factory.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sse.controller.factory.d.ts","sourceRoot":"","sources":["../../src/controllers/sse.controller.factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiD,IAAI,EAAa,MAAM,gBAAgB,CAAC;AAChG,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAC7E,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAM/E,wBAAgB,mBAAmB,CACjC,WAAW,EAAE,MAAM,EACnB,gBAAgB,EAAE,MAAM,EACxB,eAAe,EAAE,MAAM,EACvB,MAAM,GAAE,IAAI,CAAC,WAAW,CAAC,EAAO;kBAcoB,UAAU,aAC/B,SAAS,gBACN,sBAAsB;;;0BAFJ,UAAU;4BAC/B,SAAS;+BACN,sBAAsB;iBAOhC,QAAQ;sBA4BH,OAAO,GAAG;YAAE,IAAI,EAAE,GAAG,CAAA;SAAE,OAAc,QAAQ,QAAgB,OAAO;;EA6BlG"}
1
+ {"version":3,"file":"sse.controller.factory.d.ts","sourceRoot":"","sources":["../../src/controllers/sse.controller.factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAQL,IAAI,EAEL,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAoB,SAAS,EAAE,MAAM,cAAc,CAAC;AAE3D,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAC7E,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAMtE,wBAAgB,mBAAmB,CACjC,WAAW,EAAE,MAAM,EACnB,gBAAgB,EAAE,MAAM,EACxB,eAAe,EAAE,MAAM,EACvB,MAAM,GAAE,IAAI,CAAC,WAAW,CAAC,EAAO;kBAaoB,UAAU,aAC/B,SAAS,gBACN,kBAAkB;;;0BAFA,UAAU;4BAC/B,SAAS;+BACN,kBAAkB;iBAO5B,QAAQ;sBAsChB,OAAO,OACP,QAAQ,QACN,OAAO;;EA+B1B"}
@@ -17,8 +17,8 @@ const common_1 = require("@nestjs/common");
17
17
  const core_1 = require("@nestjs/core");
18
18
  const mcp_js_1 = require("@modelcontextprotocol/sdk/server/mcp.js");
19
19
  const sse_js_1 = require("@modelcontextprotocol/sdk/server/sse.js");
20
- const mcp_tool_registry_service_1 = require("../services/mcp-tool-registry.service");
21
- const mcp_tools_executor_service_1 = require("../services/mcp-tools-executor.service");
20
+ const mcp_registry_service_1 = require("../services/mcp-registry.service");
21
+ const mcp_executor_service_1 = require("../services/mcp-executor.service");
22
22
  function createSseController(sseEndpoint, messagesEndpoint, globalApiPrefix, guards = []) {
23
23
  let SseController = class SseController {
24
24
  constructor(options, moduleRef, toolRegistry) {
@@ -31,7 +31,13 @@ function createSseController(sseEndpoint, messagesEndpoint, globalApiPrefix, gua
31
31
  async sse(res) {
32
32
  const transport = new sse_js_1.SSEServerTransport(`${globalApiPrefix}/${messagesEndpoint}`, res);
33
33
  const sessionId = transport.sessionId;
34
- const mcpServer = new mcp_js_1.McpServer({ name: this.options.name, version: this.options.version }, { capabilities: this.options.capabilities || { tools: {} } });
34
+ const mcpServer = new mcp_js_1.McpServer({ name: this.options.name, version: this.options.version }, {
35
+ capabilities: this.options.capabilities || {
36
+ tools: {},
37
+ resources: {},
38
+ resourceTemplates: {},
39
+ },
40
+ });
35
41
  this.transports.set(sessionId, transport);
36
42
  this.mcpServers.set(sessionId, mcpServer);
37
43
  transport.onclose = () => {
@@ -50,8 +56,9 @@ function createSseController(sseEndpoint, messagesEndpoint, globalApiPrefix, gua
50
56
  if (!mcpServer) {
51
57
  return res.status(404).send('MCP server not found for session');
52
58
  }
53
- const toolExecutor = await this.moduleRef.resolve(mcp_tools_executor_service_1.McpToolsExecutorService, undefined, { strict: false });
54
- toolExecutor.registerRequestHandlers(mcpServer, req);
59
+ const contextId = core_1.ContextIdFactory.getByRequest(req);
60
+ const executor = await this.moduleRef.resolve(mcp_executor_service_1.McpExecutorService, contextId, { strict: false });
61
+ executor.registerRequestHandlers(mcpServer, req);
55
62
  await transport.handlePostMessage(req, res, body);
56
63
  }
57
64
  };
@@ -76,7 +83,7 @@ function createSseController(sseEndpoint, messagesEndpoint, globalApiPrefix, gua
76
83
  (0, common_1.Controller)(),
77
84
  __param(0, (0, common_1.Inject)('MCP_OPTIONS')),
78
85
  __metadata("design:paramtypes", [Object, core_1.ModuleRef,
79
- mcp_tool_registry_service_1.McpToolRegistryService])
86
+ mcp_registry_service_1.McpRegistryService])
80
87
  ], SseController);
81
88
  return SseController;
82
89
  }
@@ -1 +1 @@
1
- {"version":3,"file":"sse.controller.factory.js","sourceRoot":"","sources":["../../src/controllers/sse.controller.factory.ts"],"names":[],"mapp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A,aAAI,GAAE,CAAA;;;;iDAyBhF;IAzEG,aAAa;QADlB,IAAA,mBAAU,GAAE;QAYR,WAAA,IAAA,eAAM,EAAC,aAAa,CAAC,CAAA;iDACK,gBAAS;YACN,kDAAsB;OAblD,aAAa,CA0ElB;IAED,OAAO,aAAa,CAAC;AACvB,CAAC"}
1
+ {"version":3,"file":"sse.controller.factory.js","sourceRoot":"","sources":["../../src/controllers/sse.controller.factory.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAwBA,kDAiGC;AAzHD,2CAUwB;AAGxB,uCAA2D;AAE3D,oEAAoE;AACpE,oEAA6E;AAE7E,2EAAsE;AACtE,2EAAsE;AAKtE,SAAgB,mBAAmB,CACjC,WAAmB,EACnB,gBAAwB,EACxB,eAAuB,EACvB,SAA8B,EAAE;IAEhC,IACM,aAAa,GADnB,MACM,aAAa;QASjB,YACyB,OAAmC,EAC1C,SAAoB,EACpB,YAAgC;YAFT,YAAO,GAAP,OAAO,CAAY;YAC1C,cAAS,GAAT,SAAS,CAAW;YACpB,iBAAY,GAAZ,YAAY,CAAoB;YAP3C,eAAU,GAAG,IAAI,GAAG,EAA8B,CAAC;YAEnD,eAAU,GAAG,IAAI,GAAG,EAAqB,CAAC;QAM9C,CAAC;QAME,AAAN,KAAK,CAAC,GAAG,CAAQ,GAAa;YAC5B,MAAM,SAAS,GAAG,IAAI,2BAAkB,CACtC,GAAG,eAAe,IAAI,gBAAgB,EAAE,EACxC,GAAG,CACJ,CAAC;YACF,MAAM,SAAS,GAAG,SAAS,CAAC,SAAS,CAAC;YAGtC,MAAM,SAAS,GAAG,IAAI,kBAAS,CAC7B,EAAE,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,EAC1D;gBACE,YAAY,EAAE,IAAI,CAAC,OAAO,CAAC,YAAY,IAAI;oBACzC,KAAK,EAAE,EAAE;oBACT,SAAS,EAAE,EAAE;oBACb,iB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AS,EAAE,GAAG,CAAC,CAAC;YAGjD,MAAM,SAAS,CAAC,iBAAiB,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;QACpD,CAAC;KACF,CAAA;IApEO;QADL,IAAA,YAAG,EAAC,WAAW,CAAC;QACN,WAAA,IAAA,YAAG,GAAE,CAAA;;;;4CA8Bf;IAOK;QAFL,IAAA,aAAI,EAAC,gBAAgB,CAAC;QACtB,IAAA,kBAAS,EAAC,GAAG,MAAM,CAAC;QAElB,WAAA,IAAA,YAAG,GAAE,CAAA;QACL,WAAA,IAAA,YAAG,GAAE,CAAA;QACL,WAAA,IAAA,aAAI,GAAE,CAAA;;;;iDA2BR;IAtFG,aAAa;QADlB,IAAA,mBAAU,GAAE;QAWR,WAAA,IAAA,eAAM,EAAC,aAAa,CAAC,CAAA;iDACK,gBAAS;YACN,yCAAkB;OAZ9C,aAAa,CAuFlB;IAED,OAAO,aAAa,CAAC;AACvB,CAAC"}
@@ -1,2 +1,3 @@
1
1
  export declare const MCP_TOOL_METADATA_KEY = "mcp:tool";
2
+ export declare const MCP_RESOURCE_METADATA_KEY = "mcp:resource";
2
3
  //# sourceMappingURL=constants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/decorators/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,aAAa,CAAC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/decorators/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,aAAa,CAAC;AAChD,eAAO,MAAM,yBAAyB,iBAAiB,CAAC"}
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MCP_TOOL_METADATA_KEY = void 0;
3
+ exports.MCP_RESOURCE_METADATA_KEY = exports.MCP_TOOL_METADATA_KEY = void 0;
4
4
  exports.MCP_TOOL_METADATA_KEY = 'mcp:tool';
5
+ exports.MCP_RESOURCE_METADATA_KEY = 'mcp:resource';
5
6
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/decorators/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,qBAAqB,GAAG,UAAU,CAAC"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/decorators/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,qBAAqB,GAAG,UAAU,CAAC;AACnC,QAAA,yBAAyB,GAAG,cAAc,CAAC"}
@@ -1,3 +1,4 @@
1
1
  export * from './tool.decorator';
2
2
  export * from './constants';
3
+ export * from './resource.decorator';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/decorators/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/decorators/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC"}
@@ -16,4 +16,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./tool.decorator"), exports);
18
18
  __exportStar(require("./constants"), exports);
19
+ __exportStar(require("./resource.decorator"), exports);
19
20
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/decorators/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC;AACjC,8CAA4B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/decorators/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC;AACjC,8CAA4B;AAC5B,uDAAqC"}
@@ -0,0 +1,9 @@
1
+ export type ResourceOptions = {
2
+ uri: string;
3
+ name: string;
4
+ description?: string;
5
+ mimeType?: string;
6
+ };
7
+ export type ResourceMetadata = ResourceOptions;
8
+ export declare const Resource: (options: ResourceOptions) => import("@nestjs/common").CustomDecorator<string>;
9
+ //# sourceMappingURL=resource.decorator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resource.decorator.d.ts","sourceRoot":"","sources":["../../src/decorators/resource.decorator.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,eAAe,GAEzB;IACE,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEJ,MAAM,MAAM,gBAAgB,GAAG,eAAe,CAAC;AAS/C,eAAO,MAAM,QAAQ,YAAa,eAAe,qDAEhD,CAAC"}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Resource = void 0;
4
+ const common_1 = require("@nestjs/common");
5
+ const constants_1 = require("./constants");
6
+ const Resource = (options) => {
7
+ return (0, common_1.SetMetadata)(constants_1.MCP_RESOURCE_METADATA_KEY, options);
8
+ };
9
+ exports.Resource = Resource;
10
+ //# sourceMappingURL=resource.decorator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resource.decorator.js","sourceRoot":"","sources":["../../src/decorators/resource.decorator.ts"],"names":[],"mappings":";;;AAAA,2CAA6C;AAC7C,2CAAwD;AAoBjD,MAAM,QAAQ,GAAG,CAAC,OAAwB,EAAE,EAAE;IACnD,OAAO,IAAA,oBAAW,EAAC,qCAAyB,EAAE,OAAO,CAAC,CAAC;AACzD,CAAC,CAAC;AAFW,QAAA,QAAQ,YAEnB"}
@@ -1,12 +1,13 @@
1
- import { z } from "zod";
1
+ import { z } from 'zod';
2
2
  export interface ToolMetadata {
3
3
  name: string;
4
4
  description: string;
5
5
  parameters?: z.ZodTypeAny;
6
6
  }
7
- export declare const Tool: ({ name, description, parameters, }: {
7
+ export interface ToolOptions {
8
8
  name: string;
9
9
  description: string;
10
10
  parameters?: z.ZodTypeAny;
11
- }) => import("@nestjs/common").CustomDecorator<string>;
11
+ }
12
+ export declare const Tool: (options: ToolOptions) => import("@nestjs/common").CustomDecorator<string>;
12
13
  //# sourceMappingURL=tool.decorator.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tool.decorator.d.ts","sourceRoot":"","sources":["../../src/decorators/tool.decorator.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,CAAC,CAAC,UAAU,CAAC;CAC3B;AAED,eAAO,MAAM,IAAI,uCAId;IACD,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,CAAC,CAAC,UAAU,CAAC;CAC3B,qDAMA,CAAC"}
1
+ {"version":3,"file":"tool.decorator.d.ts","sourceRoot":"","sources":["../../src/decorators/tool.decorator.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,CAAC,CAAC,UAAU,CAAC;CAC3B;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,CAAC,CAAC,UAAU,CAAC;CAC3B;AAUD,eAAO,MAAM,IAAI,YAAa,WAAW,qDAExC,CAAC"}
@@ -3,12 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Tool = void 0;
4
4
  const common_1 = require("@nestjs/common");
5
5
  const constants_1 = require("./constants");
6
- const Tool = ({ name, description, parameters, }) => {
7
- return (0, common_1.SetMetadata)(constants_1.MCP_TOOL_METADATA_KEY, {
8
- name,
9
- description,
10
- parameters,
11
- });
6
+ const Tool = (options) => {
7
+ return (0, common_1.SetMetadata)(constants_1.MCP_TOOL_METADATA_KEY, options);
12
8
  };
13
9
  exports.Tool = Tool;
14
10
  //# sourceMappingURL=tool.decorator.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tool.decorator.js","sourceRoot":"","sources":["../../src/decorators/tool.decorator.ts"],"names":[],"mappings":";;;AAAA,2CAA6C;AAC7C,2CAAoD;AAS7C,MAAM,IAAI,GAAG,CAAC,EACnB,IAAI,EACJ,WAAW,EACX,UAAU,GAKX,EAAE,EAAE;IACH,OAAO,IAAA,oBAAW,EAAC,iCAAqB,EAAE;QACxC,IAAI;QACJ,WAAW;QACX,UAAU;KACX,CAAC,CAAC;AACL,CAAC,CAAC;AAdW,QAAA,IAAI,QAcf"}
1
+ {"version":3,"file":"tool.decorator.js","sourceRoot":"","sources":["../../src/decorators/tool.decorator.ts"],"names":[],"mappings":";;;AAAA,2CAA6C;AAC7C,2CAAoD;AAuB7C,MAAM,IAAI,GAAG,CAAC,OAAoB,EAAE,EAAE;IAC3C,OAAO,IAAA,oBAAW,EAAC,iCAAqB,EAAE,OAAO,CAAC,CAAC;AACrD,CAAC,CAAC;AAFW,QAAA,IAAI,QAEf"}
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  export * from './decorators';
2
2
  export * from './interfaces';
3
3
  export * from './mcp.module';
4
- export * from './services/mcp-tool-registry.service';
5
- export * from './services/mcp-tools-executor.service';
4
+ export * from './services/mcp-registry.service';
5
+ export * from './services/mcp-executor.service';
6
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,sCAAsC,CAAC;AACrD,cAAc,uCAAuC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,iCAAiC,CAAC;AAChD,cAAc,iCAAiC,CAAC"}
package/dist/index.js CHANGED
@@ -17,6 +17,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./decorators"), exports);
18
18
  __exportStar(require("./interfaces"), exports);
19
19
  __exportStar(require("./mcp.module"), exports);
20
- __exportStar(require("./services/mcp-tool-registry.service"), exports);
21
- __exportStar(require("./services/mcp-tools-executor.service"), exports);
20
+ __exportStar(require("./services/mcp-registry.service"), exports);
21
+ __exportStar(require("./services/mcp-executor.service"), exports);
22
22
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,+CAA6B;AAC7B,+CAA6B;AAC7B,uEAAqD;AACrD,wEAAsD"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,+CAA6B;AAC7B,+CAA6B;AAC7B,kEAAgD;AAChD,kEAAgD"}
@@ -1,2 +1,3 @@
1
1
  export * from './mcp-options.interface';
2
+ export * from './mcp-tool.interface';
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC"}
@@ -15,4 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./mcp-options.interface"), exports);
18
+ __exportStar(require("./mcp-tool.interface"), exports);
18
19
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAwC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAwC;AACxC,uDAAqC"}
@@ -0,0 +1,15 @@
1
+ import { Progress } from '@modelcontextprotocol/sdk/types.js';
2
+ export type Literal = boolean | null | number | string | undefined;
3
+ export type SerializableValue = Literal | SerializableValue[] | {
4
+ [key: string]: SerializableValue;
5
+ };
6
+ export type Context = {
7
+ reportProgress: (progress: Progress) => Promise<void>;
8
+ log: {
9
+ debug: (message: string, data?: SerializableValue) => void;
10
+ error: (message: string, data?: SerializableValue) => void;
11
+ info: (message: string, data?: SerializableValue) => void;
12
+ warn: (message: string, data?: SerializableValue) => void;
13
+ };
14
+ };
15
+ //# sourceMappingURL=mcp-tool.interface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mcp-tool.interface.d.ts","sourceRoot":"","sources":["../../src/interfaces/mcp-tool.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AAE9D,MAAM,MAAM,OAAO,GAAG,OAAO,GAAG,IAAI,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;AAEnE,MAAM,MAAM,iBAAiB,GACzB,OAAO,GACP,iBAAiB,EAAE,GACnB;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,iBAAiB,CAAA;CAAE,CAAC;AAKzC,MAAM,MAAM,OAAO,GAAG;IACpB,cAAc,EAAE,CAAC,QAAQ,EAAE,QAAQ,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACtD,GAAG,EAAE;QACH,KAAK,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,iBAAiB,KAAK,IAAI,CAAC;QAC3D,KAAK,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,iBAAiB,KAAK,IAAI,CAAC;QAC3D,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,iBAAiB,KAAK,IAAI,CAAC;QAC1D,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,iBAAiB,KAAK,IAAI,CAAC;KAC3D,CAAC;CACH,CAAC"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=mcp-tool.interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mcp-tool.interface.js","sourceRoot":"","sources":["../../src/interfaces/mcp-tool.interface.ts"],"names":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"mcp.module.d.ts","sourceRoot":"","sources":["../src/mcp.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAoB,MAAM,gBAAgB,CAAC;AAGjE,OAAO,EAAE,UAAU,EAAE,eAAe,EAAqB,MAAM,oCAAoC,CAAC;AAMpG,qBACa,SAAS;IACpB,MAAM,CAAC,OAAO,CAAC,OAAO,EAAE,UAAU,GAAG,aAAa;IA0ClD,MAAM,CAAC,YAAY,CAAC,OAAO,EAAE,eAAe,GAAG,aAAa;IA+B5D,OAAO,CAAC,MAAM,CAAC,oBAAoB;IAqBnC,OAAO,CAAC,MAAM,CAAC,0BAA0B;CAqB1C"}
1
+ {"version":3,"file":"mcp.module.d.ts","sourceRoot":"","sources":["../src/mcp.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAoB,MAAM,gBAAgB,CAAC;AAEjE,OAAO,EACL,UAAU,EACV,eAAe,EAEhB,MAAM,oCAAoC,CAAC;AAM5C,qBACa,SAAS;IACpB,MAAM,CAAC,OAAO,CAAC,OAAO,EAAE,UAAU,GAAG,aAAa;IA+BlD,MAAM,CAAC,YAAY,CAAC,OAAO,EAAE,eAAe,GAAG,aAAa;IAoB5D,OAAO,CAAC,MAAM,CAAC,oBAAoB;IAuBnC,OAAO,CAAC,MAAM,CAAC,0BAA0B;CAyB1C"}