@rekog/mcp-nest 1.4.0-beta.2 → 1.4.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/README.md CHANGED
@@ -21,6 +21,7 @@ A NestJS module to effortlessly expose tools, resources, and prompts for AI, fro
21
21
  - 💯 Zod-based request validation
22
22
  - 📊 Progress notifications
23
23
  - 🔒 Guard-based authentication
24
+ - ⏱️ Automatic SSE ping to maintain long connections
24
25
 
25
26
  ## Installation
26
27
 
@@ -161,3 +162,31 @@ export class AppModule {}
161
162
  ```
162
163
 
163
164
  That's it! The rest is the same as NestJS Guards.
165
+
166
+ ## SSE Ping Service
167
+
168
+ The module includes an SSE ping service that helps maintain long-lived SSE connections by preventing browser/client timeouts. This is especially useful for clients such as IDE's using your MCP server remotely.
169
+
170
+ ### Configuration
171
+
172
+ You can configure the SSE ping behavior when importing the module:
173
+
174
+ ```typescript
175
+ // app.module.ts
176
+ import { Module } from '@nestjs/common';
177
+ import { McpModule } from '@rekog/mcp-nest';
178
+
179
+ @Module({
180
+ imports: [
181
+ McpModule.forRoot({
182
+ name: 'my-mcp-server',
183
+ version: '1.0.0',
184
+ sse: {
185
+ pingEnabled: true, // Default is true
186
+ pingIntervalMs: 30000, // Default is 30 seconds (30000ms)
187
+ },
188
+ }),
189
+ ],
190
+ })
191
+ export class AppModule {}
192
+ ```