@tokamohsen/sentry-mcp 0.29.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/chunk-C0xms8kb.cjs +34 -0
- package/dist/cli/parse-EvLqDjN2.d.cts +11 -0
- package/dist/cli/parse-EvLqDjN2.d.cts.map +1 -0
- package/dist/cli/parse-M8aGwIO5.d.ts +11 -0
- package/dist/cli/parse-M8aGwIO5.d.ts.map +1 -0
- package/dist/cli/parse.cjs +107 -0
- package/dist/cli/parse.cjs.map +1 -0
- package/dist/cli/parse.js +103 -0
- package/dist/cli/parse.js.map +1 -0
- package/dist/cli/resolve-C3hwH129.d.cts +10 -0
- package/dist/cli/resolve-C3hwH129.d.cts.map +1 -0
- package/dist/cli/resolve-kNjr_UaF.d.ts +10 -0
- package/dist/cli/resolve-kNjr_UaF.d.ts.map +1 -0
- package/dist/cli/resolve.cjs +57 -0
- package/dist/cli/resolve.cjs.map +1 -0
- package/dist/cli/resolve.js +54 -0
- package/dist/cli/resolve.js.map +1 -0
- package/dist/cli/types-B2hDXVnQ.d.ts +73 -0
- package/dist/cli/types-B2hDXVnQ.d.ts.map +1 -0
- package/dist/cli/types-VWgo1wm6.d.cts +73 -0
- package/dist/cli/types-VWgo1wm6.d.cts.map +1 -0
- package/dist/cli/types.cjs +0 -0
- package/dist/cli/types.js +1 -0
- package/dist/cli/usage-B0gAPy4S.d.cts +9 -0
- package/dist/cli/usage-B0gAPy4S.d.cts.map +1 -0
- package/dist/cli/usage-BMxqEEQ3.d.ts +9 -0
- package/dist/cli/usage-BMxqEEQ3.d.ts.map +1 -0
- package/dist/cli/usage.cjs +47 -0
- package/dist/cli/usage.cjs.map +1 -0
- package/dist/cli/usage.js +45 -0
- package/dist/cli/usage.js.map +1 -0
- package/dist/index-16fTC-hT.d.cts +1 -0
- package/dist/index-DgNgxUxv.d.ts +1 -0
- package/dist/index.cjs +208 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.js +207 -0
- package/dist/index.js.map +1 -0
- package/dist/transports/stdio-DVcJU1wB.d.ts +37 -0
- package/dist/transports/stdio-DVcJU1wB.d.ts.map +1 -0
- package/dist/transports/stdio-DeWUp4RP.d.cts +37 -0
- package/dist/transports/stdio-DeWUp4RP.d.cts.map +1 -0
- package/dist/transports/stdio.cjs +74 -0
- package/dist/transports/stdio.cjs.map +1 -0
- package/dist/transports/stdio.js +71 -0
- package/dist/transports/stdio.js.map +1 -0
- package/package.json +69 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
|
+
import { ServerContext } from "@sentry/mcp-core/types";
|
|
3
|
+
|
|
4
|
+
//#region src/transports/stdio.d.ts
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Starts the MCP server with stdio transport and telemetry.
|
|
8
|
+
*
|
|
9
|
+
* Connects the server using stdio transport for process-based communication.
|
|
10
|
+
* Context is already captured in tool handler closures during buildServer().
|
|
11
|
+
* All operations are wrapped in Sentry tracing for observability.
|
|
12
|
+
*
|
|
13
|
+
* @param server - Configured and instrumented MCP server instance (with context in closures)
|
|
14
|
+
* @param context - Server context with authentication and configuration (for telemetry attributes)
|
|
15
|
+
*
|
|
16
|
+
* @example CLI Integration
|
|
17
|
+
* ```typescript
|
|
18
|
+
* import { buildServer } from "./server.js";
|
|
19
|
+
* import { startStdio } from "./transports/stdio.js";
|
|
20
|
+
*
|
|
21
|
+
* const context = {
|
|
22
|
+
* accessToken: userToken,
|
|
23
|
+
* sentryHost: "sentry.io",
|
|
24
|
+
* userId: "user-123",
|
|
25
|
+
* clientId: "cursor-ide",
|
|
26
|
+
* constraints: {}
|
|
27
|
+
* };
|
|
28
|
+
*
|
|
29
|
+
* const server = buildServer({ context }); // Context captured in closures
|
|
30
|
+
* await startStdio(server, context);
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
declare function startStdio(server: McpServer, context: ServerContext): Promise<void>;
|
|
34
|
+
//# sourceMappingURL=stdio.d.ts.map
|
|
35
|
+
//#endregion
|
|
36
|
+
export { startStdio };
|
|
37
|
+
//# sourceMappingURL=stdio-DeWUp4RP.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stdio-DeWUp4RP.d.cts","names":[],"sources":["../../src/transports/stdio.ts"],"sourcesContent":[],"mappings":";;;;;;;AAqDA;;;;;;;;;;;;;;;;;;;;;;;;;iBAAsB,UAAA,SAAmB,oBAAoB,gBAAa"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_chunk = require('../chunk-C0xms8kb.cjs');
|
|
3
|
+
let _modelcontextprotocol_sdk_server_stdio_js = require("@modelcontextprotocol/sdk/server/stdio.js");
|
|
4
|
+
let _sentry_node = require("@sentry/node");
|
|
5
|
+
_sentry_node = require_chunk.__toESM(_sentry_node);
|
|
6
|
+
let _sentry_mcp_core_version = require("@sentry/mcp-core/version");
|
|
7
|
+
|
|
8
|
+
//#region src/transports/stdio.ts
|
|
9
|
+
/**
|
|
10
|
+
* Standard I/O Transport for MCP Server.
|
|
11
|
+
*
|
|
12
|
+
* Provides stdio-based communication for the Sentry MCP server, typically used
|
|
13
|
+
* when the server runs as a subprocess communicating via stdin/stdout pipes.
|
|
14
|
+
*
|
|
15
|
+
* @example Basic Usage
|
|
16
|
+
* ```typescript
|
|
17
|
+
* import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
18
|
+
* import { startStdio } from "./transports/stdio.js";
|
|
19
|
+
*
|
|
20
|
+
* const server = new Server();
|
|
21
|
+
* const context = {
|
|
22
|
+
* accessToken: process.env.SENTRY_TOKEN,
|
|
23
|
+
* host: "sentry.io"
|
|
24
|
+
* };
|
|
25
|
+
*
|
|
26
|
+
* await startStdio(server, context);
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
/**
|
|
30
|
+
* Starts the MCP server with stdio transport and telemetry.
|
|
31
|
+
*
|
|
32
|
+
* Connects the server using stdio transport for process-based communication.
|
|
33
|
+
* Context is already captured in tool handler closures during buildServer().
|
|
34
|
+
* All operations are wrapped in Sentry tracing for observability.
|
|
35
|
+
*
|
|
36
|
+
* @param server - Configured and instrumented MCP server instance (with context in closures)
|
|
37
|
+
* @param context - Server context with authentication and configuration (for telemetry attributes)
|
|
38
|
+
*
|
|
39
|
+
* @example CLI Integration
|
|
40
|
+
* ```typescript
|
|
41
|
+
* import { buildServer } from "./server.js";
|
|
42
|
+
* import { startStdio } from "./transports/stdio.js";
|
|
43
|
+
*
|
|
44
|
+
* const context = {
|
|
45
|
+
* accessToken: userToken,
|
|
46
|
+
* sentryHost: "sentry.io",
|
|
47
|
+
* userId: "user-123",
|
|
48
|
+
* clientId: "cursor-ide",
|
|
49
|
+
* constraints: {}
|
|
50
|
+
* };
|
|
51
|
+
*
|
|
52
|
+
* const server = buildServer({ context }); // Context captured in closures
|
|
53
|
+
* await startStdio(server, context);
|
|
54
|
+
* ```
|
|
55
|
+
*/
|
|
56
|
+
async function startStdio(server, context) {
|
|
57
|
+
await _sentry_node.startNewTrace(async () => {
|
|
58
|
+
return await _sentry_node.startSpan({
|
|
59
|
+
name: "mcp.server/stdio",
|
|
60
|
+
attributes: {
|
|
61
|
+
"mcp.transport": "stdio",
|
|
62
|
+
"network.transport": "pipe",
|
|
63
|
+
"service.version": _sentry_mcp_core_version.LIB_VERSION
|
|
64
|
+
}
|
|
65
|
+
}, async () => {
|
|
66
|
+
const transport = new _modelcontextprotocol_sdk_server_stdio_js.StdioServerTransport();
|
|
67
|
+
await server.connect(transport);
|
|
68
|
+
});
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
//#endregion
|
|
73
|
+
exports.startStdio = startStdio;
|
|
74
|
+
//# sourceMappingURL=stdio.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stdio.cjs","names":["Sentry","LIB_VERSION","StdioServerTransport"],"sources":["../../src/transports/stdio.ts"],"sourcesContent":["/**\n * Standard I/O Transport for MCP Server.\n *\n * Provides stdio-based communication for the Sentry MCP server, typically used\n * when the server runs as a subprocess communicating via stdin/stdout pipes.\n *\n * @example Basic Usage\n * ```typescript\n * import { Server } from \"@modelcontextprotocol/sdk/server/index.js\";\n * import { startStdio } from \"./transports/stdio.js\";\n *\n * const server = new Server();\n * const context = {\n * accessToken: process.env.SENTRY_TOKEN,\n * host: \"sentry.io\"\n * };\n *\n * await startStdio(server, context);\n * ```\n */\nimport { StdioServerTransport } from \"@modelcontextprotocol/sdk/server/stdio.js\";\nimport type { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport * as Sentry from \"@sentry/node\";\nimport { LIB_VERSION } from \"@sentry/mcp-core/version\";\nimport type { ServerContext } from \"@sentry/mcp-core/types\";\n\n/**\n * Starts the MCP server with stdio transport and telemetry.\n *\n * Connects the server using stdio transport for process-based communication.\n * Context is already captured in tool handler closures during buildServer().\n * All operations are wrapped in Sentry tracing for observability.\n *\n * @param server - Configured and instrumented MCP server instance (with context in closures)\n * @param context - Server context with authentication and configuration (for telemetry attributes)\n *\n * @example CLI Integration\n * ```typescript\n * import { buildServer } from \"./server.js\";\n * import { startStdio } from \"./transports/stdio.js\";\n *\n * const context = {\n * accessToken: userToken,\n * sentryHost: \"sentry.io\",\n * userId: \"user-123\",\n * clientId: \"cursor-ide\",\n * constraints: {}\n * };\n *\n * const server = buildServer({ context }); // Context captured in closures\n * await startStdio(server, context);\n * ```\n */\nexport async function startStdio(server: McpServer, context: ServerContext) {\n await Sentry.startNewTrace(async () => {\n return await Sentry.startSpan(\n {\n name: \"mcp.server/stdio\",\n attributes: {\n \"mcp.transport\": \"stdio\",\n \"network.transport\": \"pipe\",\n \"service.version\": LIB_VERSION,\n },\n },\n async () => {\n // Context already captured in tool handler closures during buildServer()\n const transport = new StdioServerTransport();\n await server.connect(transport);\n },\n );\n });\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqDA,eAAsB,WAAW,QAAmB,SAAwB;AAC1E,OAAMA,aAAO,cAAc,YAAY;AACrC,SAAO,MAAMA,aAAO,UAClB;GACE,MAAM;GACN,YAAY;IACV,iBAAiB;IACjB,qBAAqB;IACrB,mBAAmBC;IACpB;GACF,EACD,YAAY;GAEV,MAAM,YAAY,IAAIC,gEAAsB;AAC5C,SAAM,OAAO,QAAQ,UAAU;IAElC;GACD"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
2
|
+
import * as Sentry from "@sentry/node";
|
|
3
|
+
import { LIB_VERSION } from "@sentry/mcp-core/version";
|
|
4
|
+
|
|
5
|
+
//#region src/transports/stdio.ts
|
|
6
|
+
/**
|
|
7
|
+
* Standard I/O Transport for MCP Server.
|
|
8
|
+
*
|
|
9
|
+
* Provides stdio-based communication for the Sentry MCP server, typically used
|
|
10
|
+
* when the server runs as a subprocess communicating via stdin/stdout pipes.
|
|
11
|
+
*
|
|
12
|
+
* @example Basic Usage
|
|
13
|
+
* ```typescript
|
|
14
|
+
* import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
15
|
+
* import { startStdio } from "./transports/stdio.js";
|
|
16
|
+
*
|
|
17
|
+
* const server = new Server();
|
|
18
|
+
* const context = {
|
|
19
|
+
* accessToken: process.env.SENTRY_TOKEN,
|
|
20
|
+
* host: "sentry.io"
|
|
21
|
+
* };
|
|
22
|
+
*
|
|
23
|
+
* await startStdio(server, context);
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
/**
|
|
27
|
+
* Starts the MCP server with stdio transport and telemetry.
|
|
28
|
+
*
|
|
29
|
+
* Connects the server using stdio transport for process-based communication.
|
|
30
|
+
* Context is already captured in tool handler closures during buildServer().
|
|
31
|
+
* All operations are wrapped in Sentry tracing for observability.
|
|
32
|
+
*
|
|
33
|
+
* @param server - Configured and instrumented MCP server instance (with context in closures)
|
|
34
|
+
* @param context - Server context with authentication and configuration (for telemetry attributes)
|
|
35
|
+
*
|
|
36
|
+
* @example CLI Integration
|
|
37
|
+
* ```typescript
|
|
38
|
+
* import { buildServer } from "./server.js";
|
|
39
|
+
* import { startStdio } from "./transports/stdio.js";
|
|
40
|
+
*
|
|
41
|
+
* const context = {
|
|
42
|
+
* accessToken: userToken,
|
|
43
|
+
* sentryHost: "sentry.io",
|
|
44
|
+
* userId: "user-123",
|
|
45
|
+
* clientId: "cursor-ide",
|
|
46
|
+
* constraints: {}
|
|
47
|
+
* };
|
|
48
|
+
*
|
|
49
|
+
* const server = buildServer({ context }); // Context captured in closures
|
|
50
|
+
* await startStdio(server, context);
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
async function startStdio(server, context) {
|
|
54
|
+
await Sentry.startNewTrace(async () => {
|
|
55
|
+
return await Sentry.startSpan({
|
|
56
|
+
name: "mcp.server/stdio",
|
|
57
|
+
attributes: {
|
|
58
|
+
"mcp.transport": "stdio",
|
|
59
|
+
"network.transport": "pipe",
|
|
60
|
+
"service.version": LIB_VERSION
|
|
61
|
+
}
|
|
62
|
+
}, async () => {
|
|
63
|
+
const transport = new StdioServerTransport();
|
|
64
|
+
await server.connect(transport);
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
//#endregion
|
|
70
|
+
export { startStdio };
|
|
71
|
+
//# sourceMappingURL=stdio.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stdio.js","names":[],"sources":["../../src/transports/stdio.ts"],"sourcesContent":["/**\n * Standard I/O Transport for MCP Server.\n *\n * Provides stdio-based communication for the Sentry MCP server, typically used\n * when the server runs as a subprocess communicating via stdin/stdout pipes.\n *\n * @example Basic Usage\n * ```typescript\n * import { Server } from \"@modelcontextprotocol/sdk/server/index.js\";\n * import { startStdio } from \"./transports/stdio.js\";\n *\n * const server = new Server();\n * const context = {\n * accessToken: process.env.SENTRY_TOKEN,\n * host: \"sentry.io\"\n * };\n *\n * await startStdio(server, context);\n * ```\n */\nimport { StdioServerTransport } from \"@modelcontextprotocol/sdk/server/stdio.js\";\nimport type { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport * as Sentry from \"@sentry/node\";\nimport { LIB_VERSION } from \"@sentry/mcp-core/version\";\nimport type { ServerContext } from \"@sentry/mcp-core/types\";\n\n/**\n * Starts the MCP server with stdio transport and telemetry.\n *\n * Connects the server using stdio transport for process-based communication.\n * Context is already captured in tool handler closures during buildServer().\n * All operations are wrapped in Sentry tracing for observability.\n *\n * @param server - Configured and instrumented MCP server instance (with context in closures)\n * @param context - Server context with authentication and configuration (for telemetry attributes)\n *\n * @example CLI Integration\n * ```typescript\n * import { buildServer } from \"./server.js\";\n * import { startStdio } from \"./transports/stdio.js\";\n *\n * const context = {\n * accessToken: userToken,\n * sentryHost: \"sentry.io\",\n * userId: \"user-123\",\n * clientId: \"cursor-ide\",\n * constraints: {}\n * };\n *\n * const server = buildServer({ context }); // Context captured in closures\n * await startStdio(server, context);\n * ```\n */\nexport async function startStdio(server: McpServer, context: ServerContext) {\n await Sentry.startNewTrace(async () => {\n return await Sentry.startSpan(\n {\n name: \"mcp.server/stdio\",\n attributes: {\n \"mcp.transport\": \"stdio\",\n \"network.transport\": \"pipe\",\n \"service.version\": LIB_VERSION,\n },\n },\n async () => {\n // Context already captured in tool handler closures during buildServer()\n const transport = new StdioServerTransport();\n await server.connect(transport);\n },\n );\n });\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqDA,eAAsB,WAAW,QAAmB,SAAwB;AAC1E,OAAM,OAAO,cAAc,YAAY;AACrC,SAAO,MAAM,OAAO,UAClB;GACE,MAAM;GACN,YAAY;IACV,iBAAiB;IACjB,qBAAqB;IACrB,mBAAmB;IACpB;GACF,EACD,YAAY;GAEV,MAAM,YAAY,IAAI,sBAAsB;AAC5C,SAAM,OAAO,QAAQ,UAAU;IAElC;GACD"}
|
package/package.json
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@tokamohsen/sentry-mcp",
|
|
3
|
+
"mcpName": "io.github.getsentry/sentry-mcp",
|
|
4
|
+
"version": "0.29.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"packageManager": "pnpm@10.8.1",
|
|
7
|
+
"engines": {
|
|
8
|
+
"node": ">=20"
|
|
9
|
+
},
|
|
10
|
+
"publishConfig": {
|
|
11
|
+
"access": "public"
|
|
12
|
+
},
|
|
13
|
+
"license": "FSL-1.1-ALv2",
|
|
14
|
+
"author": "Sentry",
|
|
15
|
+
"homepage": "https://github.com/getsentry/sentry-mcp",
|
|
16
|
+
"keywords": [
|
|
17
|
+
"sentry",
|
|
18
|
+
"mcp",
|
|
19
|
+
"model-context-protocol"
|
|
20
|
+
],
|
|
21
|
+
"bugs": {
|
|
22
|
+
"url": "https://github.com/getsentry/sentry-mcp/issues"
|
|
23
|
+
},
|
|
24
|
+
"repository": {
|
|
25
|
+
"type": "git",
|
|
26
|
+
"url": "git@github.com:getsentry/sentry-mcp.git"
|
|
27
|
+
},
|
|
28
|
+
"bin": {
|
|
29
|
+
"sentry-mcp": "./dist/index.js"
|
|
30
|
+
},
|
|
31
|
+
"files": [
|
|
32
|
+
"./dist/*"
|
|
33
|
+
],
|
|
34
|
+
"exports": {
|
|
35
|
+
".": {
|
|
36
|
+
"types": "./dist/index.ts",
|
|
37
|
+
"default": "./dist/index.js"
|
|
38
|
+
},
|
|
39
|
+
"./transports/stdio": {
|
|
40
|
+
"types": "./dist/transports/stdio.ts",
|
|
41
|
+
"default": "./dist/transports/stdio.js"
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"scripts": {
|
|
45
|
+
"build": "tsdown",
|
|
46
|
+
"dev": "tsdown --watch",
|
|
47
|
+
"start": "tsx src/index.ts",
|
|
48
|
+
"test": "vitest run",
|
|
49
|
+
"test:watch": "vitest",
|
|
50
|
+
"tsc": "tsc --noEmit"
|
|
51
|
+
},
|
|
52
|
+
"dependencies": {
|
|
53
|
+
"@modelcontextprotocol/sdk": "catalog:",
|
|
54
|
+
"@sentry/node": "catalog:",
|
|
55
|
+
"@sentry/core": "catalog:",
|
|
56
|
+
"dotenv": "catalog:",
|
|
57
|
+
"zod": "catalog:"
|
|
58
|
+
},
|
|
59
|
+
"devDependencies": {
|
|
60
|
+
"@sentry/mcp-core": "workspace:*",
|
|
61
|
+
"@sentry/mcp-server-mocks": "workspace:*",
|
|
62
|
+
"@sentry/mcp-server-tsconfig": "workspace:*",
|
|
63
|
+
"@types/node": "catalog:",
|
|
64
|
+
"tsdown": "catalog:",
|
|
65
|
+
"tsx": "catalog:",
|
|
66
|
+
"typescript": "catalog:",
|
|
67
|
+
"vitest": "catalog:"
|
|
68
|
+
}
|
|
69
|
+
}
|