From 2bd768bdf919580fa1cd3f6c9e97be1a4e463c1c Mon Sep 17 00:00:00 2001 From: Abdelrahman Awad Date: Mon, 30 Nov 2026 11:34:05 -0500 Subject: [PATCH 1/3] chore(mcp): Add @sentry/mcp package scaffold --- package.json | 1 + packages/mcp/.oxlintrc.json | 7 +++++ packages/mcp/LICENSE | 30 ++++++++++++++++++ packages/mcp/README.md | 13 ++++++++ packages/mcp/package.json | 50 ++++++++++++++++++++++++++++++ packages/mcp/rollup.npm.config.mjs | 3 ++ packages/mcp/src/index.ts | 1 + packages/mcp/tsconfig.json | 8 +++++ packages/mcp/tsconfig.test.json | 9 ++++++ packages/mcp/tsconfig.types.json | 11 +++++++ packages/mcp/tsconfig.vite.json | 9 ++++++ packages/mcp/vitest.config.ts | 11 +++++++ pnpm-lock.yaml | 10 ++++++ pnpm-workspace.yaml | 1 + 14 files changed, 164 insertions(+) create mode 100644 packages/mcp/.oxlintrc.json create mode 100644 packages/mcp/LICENSE create mode 100644 packages/mcp/README.md create mode 100644 packages/mcp/package.json create mode 100644 packages/mcp/rollup.npm.config.mjs create mode 100644 packages/mcp/src/index.ts create mode 100644 packages/mcp/tsconfig.json create mode 100644 packages/mcp/tsconfig.test.json create mode 100644 packages/mcp/tsconfig.types.json create mode 100644 packages/mcp/tsconfig.vite.json create mode 100644 packages/mcp/vitest.config.ts diff --git a/package.json b/package.json index d4f8cbf9a2d7..38e2052340cd 100644 --- a/package.json +++ b/package.json @@ -73,6 +73,7 @@ "packages/cloudflare", "packages/deno", "packages/effect", + "packages/mcp", "packages/ember", "packages/elysia", "packages/esbuild-plugin", diff --git a/packages/mcp/.oxlintrc.json b/packages/mcp/.oxlintrc.json new file mode 100644 index 000000000000..f079a7bc588c --- /dev/null +++ b/packages/mcp/.oxlintrc.json @@ -0,0 +1,7 @@ +{ + "$schema": "../../node_modules/oxlint/configuration_schema.json", + "extends": ["../../.oxlintrc.base.json"], + "env": { + "node": true + } +} diff --git a/packages/mcp/LICENSE b/packages/mcp/LICENSE new file mode 100644 index 000000000000..6e06c625cd06 --- /dev/null +++ b/packages/mcp/LICENSE @@ -0,0 +1,30 @@ +MIT License + +Copyright (c) 2026 Functional Software Inc. dba Sentry + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +Third-Party Dependency Notice + +The MIT License above applies to the code in this package. This package has +the Sentry CLI (the `sentry` package on npm, https://github.com/getsentry/cli) +as a direct or transitive dependency. The Sentry CLI is not part of this package +and is not covered by the MIT License above. It is licensed under the +Functional Source License, Version 1.1, Apache 2.0 Future License +(FSL-1.1-Apache-2.0): https://github.com/getsentry/cli/blob/main/LICENSE.md diff --git a/packages/mcp/README.md b/packages/mcp/README.md new file mode 100644 index 000000000000..5416ed791613 --- /dev/null +++ b/packages/mcp/README.md @@ -0,0 +1,13 @@ +

+ + + + + Sentry + + +

+ +# Sentry Helpers for MCP Servers + +Helpers for MCP servers instrumented with a Sentry SDK. Not released yet. diff --git a/packages/mcp/package.json b/packages/mcp/package.json new file mode 100644 index 000000000000..b01c7f175957 --- /dev/null +++ b/packages/mcp/package.json @@ -0,0 +1,50 @@ +{ + "name": "@sentry/mcp", + "version": "11.21.0", + "description": "Sentry helpers for MCP servers", + "repository": "git://github.com/getsentry/sentry-javascript.git", + "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/mcp", + "author": "Sentry", + "license": "MIT", + "engines": { + "node": ">=20.19.0 <22.0.0 || >=22.12.0 <23.0.0 || >=23.2.0" + }, + "files": [ + "/build" + ], + "main": "build/cjs/index.js", + "module": "build/esm/index.js", + "types": "build/types/index.d.ts", + "exports": { + "./package.json": "./package.json", + ".": { + "types": "./build/types/index.d.ts", + "import": "./build/esm/index.js", + "require": "./build/cjs/index.js" + } + }, + "publishConfig": { + "access": "public" + }, + "dependencies": { + "@sentry/core": "11.21.0" + }, + "devDependencies": { + "@sentry-internal/rollup-utils": "11.21.0" + }, + "scripts": { + "build": "pnpm run \"/^build:(transpile|types)$/\"", + "build:dev": "pnpm run build", + "build:transpile": "rolldown -c rollup.npm.config.mjs", + "build:types": "tsc -p tsconfig.types.json", + "build:tarball": "pnpm pack", + "clean": "node ../../scripts/rm.mjs build coverage sentry-mcp-*.tgz", + "lint:fix": "oxlint . --fix --type-aware", + "lint": "oxlint . --type-aware", + "lint:types": "oxlint src --type-aware --type-check", + "test": "vitest run", + "test:watch": "vitest --watch", + "yalc:publish": "pnpm dlx yalc publish --push --sig" + }, + "sideEffects": false +} diff --git a/packages/mcp/rollup.npm.config.mjs b/packages/mcp/rollup.npm.config.mjs new file mode 100644 index 000000000000..84a06f2fb64a --- /dev/null +++ b/packages/mcp/rollup.npm.config.mjs @@ -0,0 +1,3 @@ +import { makeBaseNPMConfig, makeNPMConfigVariants } from '@sentry-internal/rollup-utils'; + +export default makeNPMConfigVariants(makeBaseNPMConfig()); diff --git a/packages/mcp/src/index.ts b/packages/mcp/src/index.ts new file mode 100644 index 000000000000..cb0ff5c3b541 --- /dev/null +++ b/packages/mcp/src/index.ts @@ -0,0 +1 @@ +export {}; diff --git a/packages/mcp/tsconfig.json b/packages/mcp/tsconfig.json new file mode 100644 index 000000000000..a4c5fc0bd0e6 --- /dev/null +++ b/packages/mcp/tsconfig.json @@ -0,0 +1,8 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "outDir": "build", + "rootDir": "./src" + }, + "include": ["src/**/*"] +} diff --git a/packages/mcp/tsconfig.test.json b/packages/mcp/tsconfig.test.json new file mode 100644 index 000000000000..9dd90014ef37 --- /dev/null +++ b/packages/mcp/tsconfig.test.json @@ -0,0 +1,9 @@ +{ + "extends": "./tsconfig.json", + + "include": ["test/**/*", "vitest.config.ts"], + + "compilerOptions": { + "types": ["node"] + } +} diff --git a/packages/mcp/tsconfig.types.json b/packages/mcp/tsconfig.types.json new file mode 100644 index 000000000000..293e201048d9 --- /dev/null +++ b/packages/mcp/tsconfig.types.json @@ -0,0 +1,11 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "declaration": true, + "declarationMap": true, + "emitDeclarationOnly": true, + "outDir": "build/types", + "rootDir": "./src" + }, + "include": ["src/**/*"] +} diff --git a/packages/mcp/tsconfig.vite.json b/packages/mcp/tsconfig.vite.json new file mode 100644 index 000000000000..4f2b7371b076 --- /dev/null +++ b/packages/mcp/tsconfig.vite.json @@ -0,0 +1,9 @@ +{ + "extends": "./tsconfig.json", + + "include": ["vite.config.ts", "vitest.config.ts"], + + "compilerOptions": { + "types": ["node"] + } +} diff --git a/packages/mcp/vitest.config.ts b/packages/mcp/vitest.config.ts new file mode 100644 index 000000000000..4ec2163ea11b --- /dev/null +++ b/packages/mcp/vitest.config.ts @@ -0,0 +1,11 @@ +import { defineConfig } from 'vitest/config'; +import baseConfig from '../../vite/vite.config'; + +export default defineConfig({ + ...baseConfig, + test: { + ...baseConfig.test, + include: ['test/**/*.test.ts'], + passWithNoTests: true, + }, +}); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8f494abc9952..909af09e34b0 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1593,6 +1593,16 @@ importers: specifier: 11.21.0 version: link:../../dev-packages/rollup-utils + packages/mcp: + dependencies: + '@sentry/core': + specifier: 11.21.0 + version: link:../core + devDependencies: + '@sentry-internal/rollup-utils': + specifier: 11.21.0 + version: link:../../dev-packages/rollup-utils + packages/nestjs: dependencies: '@sentry/conventions': diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 8d9017e275af..bfe8dcab93d7 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -10,6 +10,7 @@ packages: - 'packages/cloudflare' - 'packages/deno' - 'packages/effect' + - 'packages/mcp' - 'packages/ember' - 'packages/elysia' - 'packages/esbuild-plugin' From 37bcd75d083636042e61121f14e0093e6411f000 Mon Sep 17 00:00:00 2001 From: Abdelrahman Awad Date: Tue, 1 Dec 2026 09:22:34 -0500 Subject: [PATCH 2/3] chore(mcp): Drop the Sentry CLI license notice and sort the workspace lists --- package.json | 2 +- packages/mcp/LICENSE | 9 --------- pnpm-workspace.yaml | 2 +- 3 files changed, 2 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index 38e2052340cd..eb50af6261de 100644 --- a/package.json +++ b/package.json @@ -73,7 +73,6 @@ "packages/cloudflare", "packages/deno", "packages/effect", - "packages/mcp", "packages/ember", "packages/elysia", "packages/esbuild-plugin", @@ -84,6 +83,7 @@ "packages/google-cloud-serverless", "packages/hono", "packages/integration-shims", + "packages/mcp", "packages/nestjs", "packages/nextjs", "packages/nitro", diff --git a/packages/mcp/LICENSE b/packages/mcp/LICENSE index 6e06c625cd06..fea6013e7dbf 100644 --- a/packages/mcp/LICENSE +++ b/packages/mcp/LICENSE @@ -19,12 +19,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Third-Party Dependency Notice - -The MIT License above applies to the code in this package. This package has -the Sentry CLI (the `sentry` package on npm, https://github.com/getsentry/cli) -as a direct or transitive dependency. The Sentry CLI is not part of this package -and is not covered by the MIT License above. It is licensed under the -Functional Source License, Version 1.1, Apache 2.0 Future License -(FSL-1.1-Apache-2.0): https://github.com/getsentry/cli/blob/main/LICENSE.md diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index bfe8dcab93d7..a25c87ad6cc0 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -10,7 +10,6 @@ packages: - 'packages/cloudflare' - 'packages/deno' - 'packages/effect' - - 'packages/mcp' - 'packages/ember' - 'packages/elysia' - 'packages/esbuild-plugin' @@ -21,6 +20,7 @@ packages: - 'packages/google-cloud-serverless' - 'packages/hono' - 'packages/integration-shims' + - 'packages/mcp' - 'packages/nestjs' - 'packages/nextjs' - 'packages/nitro' From b5185afa3b86d836819df9f7be292fd477a7d6d5 Mon Sep 17 00:00:00 2001 From: Abdelrahman Awad Date: Tue, 1 Dec 2026 14:00:03 -0500 Subject: [PATCH 3/3] chore(mcp): Add @sentry/mcp to the release targets, README and bug template Publish @sentry/mcp to npm and the release registry, list it in the root README, and add it to the bug report package dropdown. --- .craft.yml | 8 ++++++++ .github/ISSUE_TEMPLATE/bug.yml | 1 + README.md | 2 ++ 3 files changed, 11 insertions(+) diff --git a/.craft.yml b/.craft.yml index b195e7fea06e..69f5d8b8c76a 100644 --- a/.craft.yml +++ b/.craft.yml @@ -159,6 +159,9 @@ targets: - name: npm id: '@sentry/webpack-plugin' includeNames: /^sentry-webpack-plugin-\d.*\.tgz$/ + - name: npm + id: '@sentry/mcp' + includeNames: /^sentry-mcp-\d.*\.tgz$/ - name: npm id: '@sentry/typescript' includeNames: /^sentry-typescript-\d.*\.tgz$/ @@ -228,6 +231,11 @@ targets: packageUrl: 'https://www.npmjs.com/package/@sentry/hono' mainDocsUrl: 'https://docs.sentry.io/platforms/javascript/guides/hono/' onlyIfPresent: /^sentry-hono-\d.*\.tgz$/ + 'npm:@sentry/mcp': + name: 'Sentry MCP Helpers' + packageUrl: 'https://www.npmjs.com/package/@sentry/mcp' + mainDocsUrl: 'https://docs.sentry.io/platforms/javascript/guides/node/mcp-monitoring/agent-feedback/' + onlyIfPresent: /^sentry-mcp-\d.*\.tgz$/ 'npm:@sentry/nestjs': onlyIfPresent: /^sentry-nestjs-\d.*\.tgz$/ 'npm:@sentry/nextjs': diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml index 5f6a5a8fdf55..f2122bfe4521 100644 --- a/.github/ISSUE_TEMPLATE/bug.yml +++ b/.github/ISSUE_TEMPLATE/bug.yml @@ -50,6 +50,7 @@ body: - '@sentry/ember' - '@sentry/gatsby' - '@sentry/google-cloud-serverless' + - '@sentry/mcp' - '@sentry/nestjs' - '@sentry/nextjs' - '@sentry/nitro' diff --git a/README.md b/README.md index dc97eaf54018..633c907ef8e0 100644 --- a/README.md +++ b/README.md @@ -80,6 +80,8 @@ package. Please refer to the README and instructions of those SDKs for more deta - [`@sentry/deno`](https://github.com/getsentry/sentry-javascript/tree/master/packages/deno): SDK for Deno - [`@sentry/cloudflare`](https://github.com/getsentry/sentry-javascript/tree/master/packages/cloudflare): SDK for Cloudflare +- [`@sentry/mcp`](https://github.com/getsentry/sentry-javascript/tree/master/packages/mcp): Helpers for MCP servers + instrumented with a Sentry SDK ## Version Support Policy