Skip to content

Commit bb8aa86

Browse files
authored
Integrate Sentry with McpServer initialization
1 parent 6581843 commit bb8aa86

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

libraries/nestjs-libraries/src/mcp/mcp.settings.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
22
import { MainMcp } from '@gitroom/backend/mcp/main.mcp';
33
import { socialIntegrationList } from '@gitroom/nestjs-libraries/integrations/integration.manager';
4-
4+
import * as Sentry from '@sentry/nestjs';
55
export class McpSettings {
66
private _server: McpServer;
77
createServer(organization: string, service: MainMcp) {
8-
this._server = new McpServer(
8+
this._server = Sentry.wrapMcpServerWithSentry(new McpServer(
99
{
1010
name: 'Postiz',
1111
version: '2.0.0',
@@ -17,7 +17,7 @@ export class McpSettings {
1717
', '
1818
)} to schedule you need to have the providerId (you can get it from POSTIZ_PROVIDERS_LIST), user need to specify the schedule date (or now), text, you also can send base64 images and text for the comments. When you get POSTIZ_PROVIDERS_LIST, always display all the options to the user`,
1919
}
20-
);
20+
));
2121

2222
for (const usePrompt of Reflect.getMetadata(
2323
'MCP_PROMPT',

0 commit comments

Comments
 (0)