@sentry/mcp-server 0.39.0 → 0.41.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/auth/constants.cjs +1 -1
- package/dist/auth/constants.js +1 -1
- package/dist/auth/device-code-flow.cjs +3 -3
- package/dist/auth/device-code-flow.js +3 -3
- package/dist/auth/resolve-token.cjs +4 -4
- package/dist/auth/resolve-token.js +4 -4
- package/dist/{auth-CMwoYDhh.cjs → auth-CYOpb-jm.cjs} +4 -4
- package/dist/{auth-CMwoYDhh.cjs.map → auth-CYOpb-jm.cjs.map} +1 -1
- package/dist/{auth-BmLsTuwM.js → auth-YZqLxyqD.js} +4 -4
- package/dist/{auth-BmLsTuwM.js.map → auth-YZqLxyqD.js.map} +1 -1
- package/dist/{blob-utils-CdbE_jsd-zazUDulT.cjs → blob-utils-B0ae0K-m-BF8kTomr.cjs} +17 -2
- package/dist/{blob-utils-CdbE_jsd-zazUDulT.cjs.map → blob-utils-B0ae0K-m-BF8kTomr.cjs.map} +1 -1
- package/dist/{blob-utils-CdbE_jsd-9sHzy4nK.js → blob-utils-B0ae0K-m-BhC2W04C.js} +12 -3
- package/dist/{blob-utils-CdbE_jsd-9sHzy4nK.js.map → blob-utils-B0ae0K-m-BhC2W04C.js.map} +1 -1
- package/dist/blob-utils-BM8EcgEO.js +3 -0
- package/dist/blob-utils-DBvCs9nw.cjs +3 -0
- package/dist/cli/commands/auth.cjs +5 -5
- package/dist/cli/commands/auth.js +5 -5
- package/dist/cli/parse.d.cts.map +1 -1
- package/dist/cli/resolve.cjs +2 -2
- package/dist/cli/resolve.js +2 -2
- package/dist/cli/usage.cjs +1 -1
- package/dist/cli/usage.js +1 -1
- package/dist/{config-BqCCImAX-CqsS5Qiu.cjs → config-40SaJWzQ-Bxau3bPR.cjs} +8 -6
- package/dist/config-40SaJWzQ-Bxau3bPR.cjs.map +1 -0
- package/dist/{config-BqCCImAX-C9xxoOuk.js → config-40SaJWzQ-Dz27jdMQ.js} +8 -6
- package/dist/config-40SaJWzQ-Dz27jdMQ.js.map +1 -0
- package/dist/config-DeGbV11k.cjs +7 -0
- package/dist/{config-BUwpc74z.js → config-NGx6OsOU.js} +1 -1
- package/dist/{constants-BF1H5JLS.cjs → constants-BqO-QSHl.cjs} +5 -4
- package/dist/{constants-BF1H5JLS.cjs.map → constants-BqO-QSHl.cjs.map} +1 -1
- package/dist/{constants-BZbaI-zR.js → constants-Da7VwSRQ.js} +5 -4
- package/dist/{constants-BZbaI-zR.js.map → constants-Da7VwSRQ.js.map} +1 -1
- package/dist/{device-code-flow-BRSc_1Sh.js → device-code-flow-Bk6L232R.js} +3 -3
- package/dist/{device-code-flow-BRSc_1Sh.js.map → device-code-flow-Bk6L232R.js.map} +1 -1
- package/dist/{device-code-flow-Btx7zPjy.cjs → device-code-flow-Dv-auCiV.cjs} +3 -3
- package/dist/{device-code-flow-Btx7zPjy.cjs.map → device-code-flow-Dv-auCiV.cjs.map} +1 -1
- package/dist/index.cjs +2910 -997
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2904 -991
- package/dist/index.js.map +1 -1
- package/dist/{resolve-BsYckCew.cjs → resolve-CZUghJrC.cjs} +9 -6
- package/dist/resolve-CZUghJrC.cjs.map +1 -0
- package/dist/{resolve-CS-Bms6W.js → resolve-CkkdMFiR.js} +9 -6
- package/dist/resolve-CkkdMFiR.js.map +1 -0
- package/dist/{resolve-token-D8oZbjtT.js → resolve-token-4RkU7UPe.js} +3 -3
- package/dist/{resolve-token-D8oZbjtT.js.map → resolve-token-4RkU7UPe.js.map} +1 -1
- package/dist/{resolve-token-TOq9-TtB.cjs → resolve-token-Daqu57f-.cjs} +3 -3
- package/dist/{resolve-token-TOq9-TtB.cjs.map → resolve-token-Daqu57f-.cjs.map} +1 -1
- package/dist/{stdio-DFPpP3Gf.cjs → stdio-4lgW_97D.cjs} +2 -2
- package/dist/{stdio-DFPpP3Gf.cjs.map → stdio-4lgW_97D.cjs.map} +1 -1
- package/dist/{stdio-DrtNVy01.js → stdio-C0wKX460.js} +2 -2
- package/dist/{stdio-DrtNVy01.js.map → stdio-C0wKX460.js.map} +1 -1
- package/dist/transports/stdio.cjs +2 -2
- package/dist/transports/stdio.js +2 -2
- package/dist/{usage-Crfzx1qJ.cjs → usage-DZ4QDygT.cjs} +6 -4
- package/dist/usage-DZ4QDygT.cjs.map +1 -0
- package/dist/{usage-Con424Df.js → usage-Hi-6-LDr.js} +6 -4
- package/dist/usage-Hi-6-LDr.js.map +1 -0
- package/dist/{version-BHLBRM5t.cjs → version-B-XjWQrQ.cjs} +3 -3
- package/dist/version-B-XjWQrQ.cjs.map +1 -0
- package/dist/version-CWKzsUXy.js +7 -0
- package/dist/version-CWKzsUXy.js.map +1 -0
- package/package.json +7 -7
- package/dist/blob-utils-ByQZ_jqM.cjs +0 -3
- package/dist/blob-utils-KYOyFu79.js +0 -3
- package/dist/config-BqCCImAX-C9xxoOuk.js.map +0 -1
- package/dist/config-BqCCImAX-CqsS5Qiu.cjs.map +0 -1
- package/dist/config-Md3ohhLy.cjs +0 -7
- package/dist/resolve-BsYckCew.cjs.map +0 -1
- package/dist/resolve-CS-Bms6W.js.map +0 -1
- package/dist/usage-Con424Df.js.map +0 -1
- package/dist/usage-Crfzx1qJ.cjs.map +0 -1
- package/dist/version-BHLBRM5t.cjs.map +0 -1
- package/dist/version-BWR2MRdi.js +0 -7
- package/dist/version-BWR2MRdi.js.map +0 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
const require_constants = require('./constants-
|
|
1
|
+
const require_constants = require('./constants-BqO-QSHl.cjs');
|
|
2
2
|
|
|
3
|
-
//#region ../mcp-core/dist/skills-
|
|
3
|
+
//#region ../mcp-core/dist/skills-yShcMm-3.js
|
|
4
4
|
const SKILLS = {
|
|
5
5
|
inspect: {
|
|
6
6
|
id: "inspect",
|
|
7
7
|
name: "Inspect Issues & Events",
|
|
8
|
-
description: "Read-only access to core Sentry data: issues, events, traces, replays, releases, cron monitors, uptime monitors, profiles, documentation, and project metadata",
|
|
8
|
+
description: "Read-only access to core Sentry data: issues, events, traces, replays, releases, cron monitors, uptime monitors, metric monitors, profiles, documentation, and project metadata",
|
|
9
9
|
defaultEnabled: true,
|
|
10
10
|
order: 1
|
|
11
11
|
},
|
|
@@ -34,7 +34,7 @@ const SKILLS = {
|
|
|
34
34
|
"project-management": {
|
|
35
35
|
id: "project-management",
|
|
36
36
|
name: "Manage Projects & Teams",
|
|
37
|
-
description: "Create and modify projects, teams, DSNs, and
|
|
37
|
+
description: "Create and modify projects, teams, DSNs, uptime monitors, metric monitors, and alert rules",
|
|
38
38
|
defaultEnabled: false,
|
|
39
39
|
order: 5
|
|
40
40
|
}
|
|
@@ -103,7 +103,10 @@ function finalize(input) {
|
|
|
103
103
|
if (invalid.length > 0) throw new Error(formatInvalidSkills(invalid));
|
|
104
104
|
if (valid.size === 0) throw new Error("Error: Invalid skills provided. No valid skills found.");
|
|
105
105
|
finalSkills = valid;
|
|
106
|
-
} else
|
|
106
|
+
} else {
|
|
107
|
+
finalSkills = new Set(ACTIVE_SKILLS);
|
|
108
|
+
if (!require_constants.isSentryHost(sentryHost)) finalSkills.delete("seer");
|
|
109
|
+
}
|
|
107
110
|
if (input.disableSkills) {
|
|
108
111
|
const { valid: skillsToDisable, invalid } = parseSkills(input.disableSkills);
|
|
109
112
|
if (invalid.length > 0) throw new Error(formatInvalidSkills(invalid, "--disable-skills"));
|
|
@@ -173,4 +176,4 @@ Object.defineProperty(exports, 'resolveHost', {
|
|
|
173
176
|
return resolveHost;
|
|
174
177
|
}
|
|
175
178
|
});
|
|
176
|
-
//# sourceMappingURL=resolve-
|
|
179
|
+
//# sourceMappingURL=resolve-CZUghJrC.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve-CZUghJrC.cjs","names":["invalid: string[]","source?: string","url?: string","host?: string","input: MergedArgs","finalSkills: Set<Skill>","agentProvider:\n | \"openai\"\n | \"azure-openai\"\n | \"anthropic\"\n | \"openrouter\"\n | undefined","DEFAULT_SENTRY_CLIENT_ID"],"sources":["../../mcp-core/dist/skills-yShcMm-3.js","../src/cli/resolve.ts"],"sourcesContent":["//#region src/skills.ts\nconst SKILLS = {\n\tinspect: {\n\t\tid: \"inspect\",\n\t\tname: \"Inspect Issues & Events\",\n\t\tdescription: \"Read-only access to core Sentry data: issues, events, traces, replays, releases, cron monitors, uptime monitors, metric monitors, profiles, documentation, and project metadata\",\n\t\tdefaultEnabled: true,\n\t\torder: 1\n\t},\n\tseer: {\n\t\tid: \"seer\",\n\t\tname: \"Seer\",\n\t\tdescription: \"Sentry's AI debugger that helps you analyze, root cause, and fix issues\",\n\t\tdefaultEnabled: true,\n\t\torder: 2\n\t},\n\tdocs: {\n\t\tid: \"docs\",\n\t\tname: \"Documentation\",\n\t\tdescription: \"Deprecated legacy docs-only grant. Documentation tools are now available through Inspect Issues & Events.\",\n\t\tdefaultEnabled: false,\n\t\tdeprecated: true,\n\t\torder: 3\n\t},\n\ttriage: {\n\t\tid: \"triage\",\n\t\tname: \"Triage Issues\",\n\t\tdescription: \"Resolve, assign, and update issues\",\n\t\tdefaultEnabled: false,\n\t\torder: 4\n\t},\n\t\"project-management\": {\n\t\tid: \"project-management\",\n\t\tname: \"Manage Projects & Teams\",\n\t\tdescription: \"Create and modify projects, teams, DSNs, uptime monitors, metric monitors, and alert rules\",\n\t\tdefaultEnabled: false,\n\t\torder: 5\n\t}\n};\nconst SKILLS_ARRAY = Object.values(SKILLS).sort((a, b) => a.order - b.order);\nasync function getSkillsArrayWithCounts() {\n\tconst toolsModule = await import(\"./tools/index.js\");\n\tconst surfacesModule = await import(\"./tools/surfaces.js\");\n\tconst tools = toolsModule.default;\n\tconst isCatalogInfrastructureTool = surfacesModule.isCatalogInfrastructureToolName;\n\tconst isWrapperTool = surfacesModule.isWrapperToolName;\n\tconst counts = /* @__PURE__ */ new Map();\n\tfor (const skill of Object.keys(SKILLS)) counts.set(skill, 0);\n\tfor (const [toolName, tool] of Object.entries(tools)) {\n\t\tif (isWrapperTool(toolName) || isCatalogInfrastructureTool(toolName)) continue;\n\t\tif (tool.includeInSkillDefinitions === false) continue;\n\t\tif (Array.isArray(tool.skills)) for (const skill of tool.skills) counts.set(skill, (counts.get(skill) || 0) + 1);\n\t}\n\treturn SKILLS_ARRAY.map((skill) => ({\n\t\t...skill,\n\t\ttoolCount: counts.get(skill.id) || 0\n\t}));\n}\nconst ALL_SKILLS = Object.keys(SKILLS);\nconst ACTIVE_SKILLS = SKILLS_ARRAY.filter((s) => !s.deprecated).map((s) => s.id);\nconst DEFAULT_SKILLS = SKILLS_ARRAY.filter((s) => s.defaultEnabled).map((s) => s.id);\nfunction isValidSkill(skill) {\n\treturn Object.hasOwn(SKILLS, skill);\n}\nfunction isEnabledBySkills(grantedSkills, toolSkills) {\n\tif (!grantedSkills || toolSkills.length === 0) return false;\n\treturn toolSkills.some((skill) => grantedSkills.has(skill));\n}\nfunction parseSkills(input) {\n\tconst valid = /* @__PURE__ */ new Set();\n\tconst invalid = [];\n\tif (!input) return {\n\t\tvalid,\n\t\tinvalid\n\t};\n\tlet skills = [];\n\tif (typeof input === \"string\") skills = input.split(\",\");\n\telse if (Array.isArray(input)) skills = input.map((v) => typeof v === \"string\" ? v : \"\");\n\tfor (const skill of skills) {\n\t\tconst trimmed = String(skill).trim();\n\t\tif (isValidSkill(trimmed)) valid.add(trimmed);\n\t\telse if (trimmed) invalid.push(trimmed);\n\t}\n\treturn {\n\t\tvalid,\n\t\tinvalid\n\t};\n}\nasync function getScopesForSkills(grantedSkills) {\n\tconst { DEFAULT_SCOPES } = await import(\"./constants.js\");\n\tconst toolsModule = await import(\"./tools/index.js\");\n\tconst surfacesModule = await import(\"./tools/surfaces.js\");\n\tconst tools = toolsModule.default;\n\tconst isCatalogInfrastructureTool = surfacesModule.isCatalogInfrastructureToolName;\n\tconst isWrapperTool = surfacesModule.isWrapperToolName;\n\tconst scopes = new Set(DEFAULT_SCOPES);\n\tfor (const [toolName, tool] of Object.entries(tools)) {\n\t\tif (isWrapperTool(toolName) || isCatalogInfrastructureTool(toolName)) continue;\n\t\tconst toolEnabled = tool.skills.some((skill) => grantedSkills.has(skill));\n\t\tif (toolEnabled) for (const scope of tool.requiredScopes) scopes.add(scope);\n\t}\n\treturn scopes;\n}\n\n//#endregion\nexport { ACTIVE_SKILLS, ALL_SKILLS, DEFAULT_SKILLS, SKILLS, SKILLS_ARRAY, getScopesForSkills, getSkillsArrayWithCounts, isEnabledBySkills, isValidSkill, parseSkills };\n//# sourceMappingURL=skills-yShcMm-3.js.map","import {\n ACTIVE_SKILLS,\n ALL_SKILLS,\n parseSkills,\n type Skill,\n} from \"@sentry/mcp-core/skills\";\nimport {\n isSentryHost,\n validateAndParseSentryUrlThrows,\n validateOpenAiBaseUrlThrows,\n validateSentryHostThrows,\n} from \"@sentry/mcp-core/utils/url-utils\";\nimport { DEFAULT_SENTRY_CLIENT_ID } from \"../auth/constants\";\nimport type { MergedArgs, PartiallyResolvedConfig } from \"./types\";\n\nexport function formatInvalidSkills(\n invalid: string[],\n source?: string,\n): string {\n const prefix = source ? `${source} provided` : \"Invalid skills provided\";\n return `Error: ${prefix}: ${invalid.join(\", \")}\\nAvailable skills: ${ALL_SKILLS.join(\", \")}`;\n}\n\n/**\n * Resolves the Sentry host from url/host inputs with validation.\n * Used by both the server flow (finalize) and auth commands (resolveAuthContext)\n * to ensure cache keys always match.\n */\nexport function resolveHost(url?: string, host?: string): string {\n if (url) {\n return validateAndParseSentryUrlThrows(url);\n }\n if (host) {\n validateSentryHostThrows(host);\n return host;\n }\n return \"sentry.io\";\n}\n\nexport function finalize(input: MergedArgs): PartiallyResolvedConfig {\n if (input.insecureHttp && input.url) {\n throw new Error(\n \"Error: --insecure-http cannot be used with --url or SENTRY_URL. Use --host for insecure self-hosted instances.\",\n );\n }\n\n const sentryHost = resolveHost(input.url, input.host);\n\n if (input.insecureHttp && isSentryHost(sentryHost)) {\n throw new Error(\n \"Error: --insecure-http is only supported for self-hosted Sentry hosts.\",\n );\n }\n\n const sentryProtocol = input.insecureHttp ? \"http\" : \"https\";\n\n // Skills resolution\n //\n // IMPORTANT: stdio (CLI) intentionally defaults to all active skills when no --skills flag is provided\n //\n // This differs from the OAuth flow, which requires explicit user selection:\n // - stdio/CLI: Non-interactive, defaults to all non-deprecated skills\n // - OAuth: Interactive, requires user to explicitly select skills (with sensible defaults pre-checked)\n //\n // Rationale:\n // We don't want the MCP to break if users don't specify skills. stdio is typically used in\n // local development and CI/CD environments where maximum access by default is expected.\n // OAuth is used in multi-tenant hosted environments where users should consciously grant\n // permissions on a per-app basis.\n //\n // For OAuth validation that enforces minimum 1 skill selection, see:\n // packages/mcp-cloudflare/src/server/oauth/routes/callback.ts (lines 234-248)\n //\n let finalSkills: Set<Skill>;\n if (input.skills && input.allSkills) {\n throw new Error(\"Error: --all-skills cannot be combined with --skills.\");\n }\n\n if (input.allSkills) {\n finalSkills = new Set<Skill>(ACTIVE_SKILLS);\n } else if (input.skills) {\n // Override: use only the specified skills\n const { valid, invalid } = parseSkills(input.skills);\n if (invalid.length > 0) {\n throw new Error(formatInvalidSkills(invalid));\n }\n if (valid.size === 0) {\n throw new Error(\"Error: Invalid skills provided. No valid skills found.\");\n }\n finalSkills = valid;\n } else {\n // Default: grant all active skills when no flag is provided (see comment block above for rationale)\n finalSkills = new Set<Skill>(ACTIVE_SKILLS);\n\n // Seer is a sentry.io service. Self-hosted Sentry ships without it, and its\n // autofix endpoints answer 500 when the Seer backend is not configured, so\n // every `get_issue_details` call (which fetches autofix state) and every\n // `analyze_issue_with_seer` poll loop would just generate server errors.\n // Leave Seer out of the implicit default on self-hosted hosts; users who\n // do run Seer can still opt in with --skills=seer or --all-skills.\n if (!isSentryHost(sentryHost)) {\n finalSkills.delete(\"seer\");\n }\n }\n\n // Disable-skills: remove specific skills from the active set\n if (input.disableSkills) {\n const { valid: skillsToDisable, invalid } = parseSkills(\n input.disableSkills,\n );\n if (invalid.length > 0) {\n throw new Error(formatInvalidSkills(invalid, \"--disable-skills\"));\n }\n for (const skill of skillsToDisable) {\n finalSkills.delete(skill);\n }\n if (finalSkills.size === 0) {\n throw new Error(\n \"Error: All skills have been disabled. At least one skill must remain enabled.\",\n );\n }\n }\n\n const resolvedOpenAiBaseUrl = input.openaiBaseUrl\n ? validateOpenAiBaseUrlThrows(input.openaiBaseUrl)\n : undefined;\n\n // Validate anthropic base URL if provided (same validation as OpenAI)\n const resolvedAnthropicBaseUrl = input.anthropicBaseUrl\n ? validateOpenAiBaseUrlThrows(input.anthropicBaseUrl)\n : undefined;\n\n // Validate agent provider if explicitly set\n let agentProvider:\n | \"openai\"\n | \"azure-openai\"\n | \"anthropic\"\n | \"openrouter\"\n | undefined = undefined;\n if (input.agentProvider) {\n const provider = input.agentProvider.toLowerCase();\n if (\n provider !== \"openai\" &&\n provider !== \"azure-openai\" &&\n provider !== \"anthropic\" &&\n provider !== \"openrouter\"\n ) {\n throw new Error(\n `Error: Invalid agent provider \"${input.agentProvider}\". Must be \"openai\", \"azure-openai\", \"anthropic\", or \"openrouter\".`,\n );\n }\n agentProvider = provider;\n }\n\n return {\n accessToken: input.accessToken,\n clientId: input.clientId || DEFAULT_SENTRY_CLIENT_ID,\n sentryHost,\n sentryProtocol,\n mcpUrl: input.mcpUrl,\n sentryDsn: input.sentryDsn,\n openaiBaseUrl: resolvedOpenAiBaseUrl,\n openaiModel: input.openaiModel,\n anthropicBaseUrl: resolvedAnthropicBaseUrl,\n anthropicModel: input.anthropicModel,\n agentProvider,\n finalSkills,\n organizationSlug: input.organizationSlug,\n projectSlug: input.projectSlug,\n };\n}\n"],"mappings":";;;AACA,MAAM,SAAS;CACd,SAAS;EACR,IAAI;EACJ,MAAM;EACN,aAAa;EACb,gBAAgB;EAChB,OAAO;CACP;CACD,MAAM;EACL,IAAI;EACJ,MAAM;EACN,aAAa;EACb,gBAAgB;EAChB,OAAO;CACP;CACD,MAAM;EACL,IAAI;EACJ,MAAM;EACN,aAAa;EACb,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,MAAM,2BAA2B,MAAM,mBACnC,8CAA4B,MAAM,iBAAiB;CAIvD,IAAIC;AAMJ,KAAI,MAAM,eAAe;EACvB,MAAM,WAAW,MAAM,cAAc,aAAa;AAClD,MACE,aAAa,YACb,aAAa,kBACb,aAAa,eACb,aAAa,aAEb,OAAM,IAAI,OACP,iCAAiC,MAAM,cAAc;AAG1D,kBAAgB;CACjB;AAED,QAAO;EACL,aAAa,MAAM;EACnB,UAAU,MAAM,YAAYC;EAC5B;EACA;EACA,QAAQ,MAAM;EACd,WAAW,MAAM;EACjB,eAAe;EACf,aAAa,MAAM;EACnB,kBAAkB;EAClB,gBAAgB,MAAM;EACtB;EACA;EACA,kBAAkB,MAAM;EACxB,aAAa,MAAM;CACpB;AACF"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { DEFAULT_SENTRY_CLIENT_ID, isSentryHost, validateAndParseSentryUrlThrows, validateOpenAiBaseUrlThrows, validateSentryHostThrows } from "./constants-
|
|
1
|
+
import { DEFAULT_SENTRY_CLIENT_ID, isSentryHost, validateAndParseSentryUrlThrows, validateOpenAiBaseUrlThrows, validateSentryHostThrows } from "./constants-Da7VwSRQ.js";
|
|
2
2
|
|
|
3
|
-
//#region ../mcp-core/dist/skills-
|
|
3
|
+
//#region ../mcp-core/dist/skills-yShcMm-3.js
|
|
4
4
|
const SKILLS = {
|
|
5
5
|
inspect: {
|
|
6
6
|
id: "inspect",
|
|
7
7
|
name: "Inspect Issues & Events",
|
|
8
|
-
description: "Read-only access to core Sentry data: issues, events, traces, replays, releases, cron monitors, uptime monitors, profiles, documentation, and project metadata",
|
|
8
|
+
description: "Read-only access to core Sentry data: issues, events, traces, replays, releases, cron monitors, uptime monitors, metric monitors, profiles, documentation, and project metadata",
|
|
9
9
|
defaultEnabled: true,
|
|
10
10
|
order: 1
|
|
11
11
|
},
|
|
@@ -34,7 +34,7 @@ const SKILLS = {
|
|
|
34
34
|
"project-management": {
|
|
35
35
|
id: "project-management",
|
|
36
36
|
name: "Manage Projects & Teams",
|
|
37
|
-
description: "Create and modify projects, teams, DSNs, and
|
|
37
|
+
description: "Create and modify projects, teams, DSNs, uptime monitors, metric monitors, and alert rules",
|
|
38
38
|
defaultEnabled: false,
|
|
39
39
|
order: 5
|
|
40
40
|
}
|
|
@@ -103,7 +103,10 @@ function finalize(input) {
|
|
|
103
103
|
if (invalid.length > 0) throw new Error(formatInvalidSkills(invalid));
|
|
104
104
|
if (valid.size === 0) throw new Error("Error: Invalid skills provided. No valid skills found.");
|
|
105
105
|
finalSkills = valid;
|
|
106
|
-
} else
|
|
106
|
+
} else {
|
|
107
|
+
finalSkills = new Set(ACTIVE_SKILLS);
|
|
108
|
+
if (!isSentryHost(sentryHost)) finalSkills.delete("seer");
|
|
109
|
+
}
|
|
107
110
|
if (input.disableSkills) {
|
|
108
111
|
const { valid: skillsToDisable, invalid } = parseSkills(input.disableSkills);
|
|
109
112
|
if (invalid.length > 0) throw new Error(formatInvalidSkills(invalid, "--disable-skills"));
|
|
@@ -138,4 +141,4 @@ function finalize(input) {
|
|
|
138
141
|
|
|
139
142
|
//#endregion
|
|
140
143
|
export { ALL_SKILLS, SKILLS, finalize, formatInvalidSkills, isEnabledBySkills, resolveHost };
|
|
141
|
-
//# sourceMappingURL=resolve-
|
|
144
|
+
//# sourceMappingURL=resolve-CkkdMFiR.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve-CkkdMFiR.js","names":["invalid: string[]","source?: string","url?: string","host?: string","input: MergedArgs","finalSkills: Set<Skill>","agentProvider:\n | \"openai\"\n | \"azure-openai\"\n | \"anthropic\"\n | \"openrouter\"\n | undefined"],"sources":["../../mcp-core/dist/skills-yShcMm-3.js","../src/cli/resolve.ts"],"sourcesContent":["//#region src/skills.ts\nconst SKILLS = {\n\tinspect: {\n\t\tid: \"inspect\",\n\t\tname: \"Inspect Issues & Events\",\n\t\tdescription: \"Read-only access to core Sentry data: issues, events, traces, replays, releases, cron monitors, uptime monitors, metric monitors, profiles, documentation, and project metadata\",\n\t\tdefaultEnabled: true,\n\t\torder: 1\n\t},\n\tseer: {\n\t\tid: \"seer\",\n\t\tname: \"Seer\",\n\t\tdescription: \"Sentry's AI debugger that helps you analyze, root cause, and fix issues\",\n\t\tdefaultEnabled: true,\n\t\torder: 2\n\t},\n\tdocs: {\n\t\tid: \"docs\",\n\t\tname: \"Documentation\",\n\t\tdescription: \"Deprecated legacy docs-only grant. Documentation tools are now available through Inspect Issues & Events.\",\n\t\tdefaultEnabled: false,\n\t\tdeprecated: true,\n\t\torder: 3\n\t},\n\ttriage: {\n\t\tid: \"triage\",\n\t\tname: \"Triage Issues\",\n\t\tdescription: \"Resolve, assign, and update issues\",\n\t\tdefaultEnabled: false,\n\t\torder: 4\n\t},\n\t\"project-management\": {\n\t\tid: \"project-management\",\n\t\tname: \"Manage Projects & Teams\",\n\t\tdescription: \"Create and modify projects, teams, DSNs, uptime monitors, metric monitors, and alert rules\",\n\t\tdefaultEnabled: false,\n\t\torder: 5\n\t}\n};\nconst SKILLS_ARRAY = Object.values(SKILLS).sort((a, b) => a.order - b.order);\nasync function getSkillsArrayWithCounts() {\n\tconst toolsModule = await import(\"./tools/index.js\");\n\tconst surfacesModule = await import(\"./tools/surfaces.js\");\n\tconst tools = toolsModule.default;\n\tconst isCatalogInfrastructureTool = surfacesModule.isCatalogInfrastructureToolName;\n\tconst isWrapperTool = surfacesModule.isWrapperToolName;\n\tconst counts = /* @__PURE__ */ new Map();\n\tfor (const skill of Object.keys(SKILLS)) counts.set(skill, 0);\n\tfor (const [toolName, tool] of Object.entries(tools)) {\n\t\tif (isWrapperTool(toolName) || isCatalogInfrastructureTool(toolName)) continue;\n\t\tif (tool.includeInSkillDefinitions === false) continue;\n\t\tif (Array.isArray(tool.skills)) for (const skill of tool.skills) counts.set(skill, (counts.get(skill) || 0) + 1);\n\t}\n\treturn SKILLS_ARRAY.map((skill) => ({\n\t\t...skill,\n\t\ttoolCount: counts.get(skill.id) || 0\n\t}));\n}\nconst ALL_SKILLS = Object.keys(SKILLS);\nconst ACTIVE_SKILLS = SKILLS_ARRAY.filter((s) => !s.deprecated).map((s) => s.id);\nconst DEFAULT_SKILLS = SKILLS_ARRAY.filter((s) => s.defaultEnabled).map((s) => s.id);\nfunction isValidSkill(skill) {\n\treturn Object.hasOwn(SKILLS, skill);\n}\nfunction isEnabledBySkills(grantedSkills, toolSkills) {\n\tif (!grantedSkills || toolSkills.length === 0) return false;\n\treturn toolSkills.some((skill) => grantedSkills.has(skill));\n}\nfunction parseSkills(input) {\n\tconst valid = /* @__PURE__ */ new Set();\n\tconst invalid = [];\n\tif (!input) return {\n\t\tvalid,\n\t\tinvalid\n\t};\n\tlet skills = [];\n\tif (typeof input === \"string\") skills = input.split(\",\");\n\telse if (Array.isArray(input)) skills = input.map((v) => typeof v === \"string\" ? v : \"\");\n\tfor (const skill of skills) {\n\t\tconst trimmed = String(skill).trim();\n\t\tif (isValidSkill(trimmed)) valid.add(trimmed);\n\t\telse if (trimmed) invalid.push(trimmed);\n\t}\n\treturn {\n\t\tvalid,\n\t\tinvalid\n\t};\n}\nasync function getScopesForSkills(grantedSkills) {\n\tconst { DEFAULT_SCOPES } = await import(\"./constants.js\");\n\tconst toolsModule = await import(\"./tools/index.js\");\n\tconst surfacesModule = await import(\"./tools/surfaces.js\");\n\tconst tools = toolsModule.default;\n\tconst isCatalogInfrastructureTool = surfacesModule.isCatalogInfrastructureToolName;\n\tconst isWrapperTool = surfacesModule.isWrapperToolName;\n\tconst scopes = new Set(DEFAULT_SCOPES);\n\tfor (const [toolName, tool] of Object.entries(tools)) {\n\t\tif (isWrapperTool(toolName) || isCatalogInfrastructureTool(toolName)) continue;\n\t\tconst toolEnabled = tool.skills.some((skill) => grantedSkills.has(skill));\n\t\tif (toolEnabled) for (const scope of tool.requiredScopes) scopes.add(scope);\n\t}\n\treturn scopes;\n}\n\n//#endregion\nexport { ACTIVE_SKILLS, ALL_SKILLS, DEFAULT_SKILLS, SKILLS, SKILLS_ARRAY, getScopesForSkills, getSkillsArrayWithCounts, isEnabledBySkills, isValidSkill, parseSkills };\n//# sourceMappingURL=skills-yShcMm-3.js.map","import {\n ACTIVE_SKILLS,\n ALL_SKILLS,\n parseSkills,\n type Skill,\n} from \"@sentry/mcp-core/skills\";\nimport {\n isSentryHost,\n validateAndParseSentryUrlThrows,\n validateOpenAiBaseUrlThrows,\n validateSentryHostThrows,\n} from \"@sentry/mcp-core/utils/url-utils\";\nimport { DEFAULT_SENTRY_CLIENT_ID } from \"../auth/constants\";\nimport type { MergedArgs, PartiallyResolvedConfig } from \"./types\";\n\nexport function formatInvalidSkills(\n invalid: string[],\n source?: string,\n): string {\n const prefix = source ? `${source} provided` : \"Invalid skills provided\";\n return `Error: ${prefix}: ${invalid.join(\", \")}\\nAvailable skills: ${ALL_SKILLS.join(\", \")}`;\n}\n\n/**\n * Resolves the Sentry host from url/host inputs with validation.\n * Used by both the server flow (finalize) and auth commands (resolveAuthContext)\n * to ensure cache keys always match.\n */\nexport function resolveHost(url?: string, host?: string): string {\n if (url) {\n return validateAndParseSentryUrlThrows(url);\n }\n if (host) {\n validateSentryHostThrows(host);\n return host;\n }\n return \"sentry.io\";\n}\n\nexport function finalize(input: MergedArgs): PartiallyResolvedConfig {\n if (input.insecureHttp && input.url) {\n throw new Error(\n \"Error: --insecure-http cannot be used with --url or SENTRY_URL. Use --host for insecure self-hosted instances.\",\n );\n }\n\n const sentryHost = resolveHost(input.url, input.host);\n\n if (input.insecureHttp && isSentryHost(sentryHost)) {\n throw new Error(\n \"Error: --insecure-http is only supported for self-hosted Sentry hosts.\",\n );\n }\n\n const sentryProtocol = input.insecureHttp ? \"http\" : \"https\";\n\n // Skills resolution\n //\n // IMPORTANT: stdio (CLI) intentionally defaults to all active skills when no --skills flag is provided\n //\n // This differs from the OAuth flow, which requires explicit user selection:\n // - stdio/CLI: Non-interactive, defaults to all non-deprecated skills\n // - OAuth: Interactive, requires user to explicitly select skills (with sensible defaults pre-checked)\n //\n // Rationale:\n // We don't want the MCP to break if users don't specify skills. stdio is typically used in\n // local development and CI/CD environments where maximum access by default is expected.\n // OAuth is used in multi-tenant hosted environments where users should consciously grant\n // permissions on a per-app basis.\n //\n // For OAuth validation that enforces minimum 1 skill selection, see:\n // packages/mcp-cloudflare/src/server/oauth/routes/callback.ts (lines 234-248)\n //\n let finalSkills: Set<Skill>;\n if (input.skills && input.allSkills) {\n throw new Error(\"Error: --all-skills cannot be combined with --skills.\");\n }\n\n if (input.allSkills) {\n finalSkills = new Set<Skill>(ACTIVE_SKILLS);\n } else if (input.skills) {\n // Override: use only the specified skills\n const { valid, invalid } = parseSkills(input.skills);\n if (invalid.length > 0) {\n throw new Error(formatInvalidSkills(invalid));\n }\n if (valid.size === 0) {\n throw new Error(\"Error: Invalid skills provided. No valid skills found.\");\n }\n finalSkills = valid;\n } else {\n // Default: grant all active skills when no flag is provided (see comment block above for rationale)\n finalSkills = new Set<Skill>(ACTIVE_SKILLS);\n\n // Seer is a sentry.io service. Self-hosted Sentry ships without it, and its\n // autofix endpoints answer 500 when the Seer backend is not configured, so\n // every `get_issue_details` call (which fetches autofix state) and every\n // `analyze_issue_with_seer` poll loop would just generate server errors.\n // Leave Seer out of the implicit default on self-hosted hosts; users who\n // do run Seer can still opt in with --skills=seer or --all-skills.\n if (!isSentryHost(sentryHost)) {\n finalSkills.delete(\"seer\");\n }\n }\n\n // Disable-skills: remove specific skills from the active set\n if (input.disableSkills) {\n const { valid: skillsToDisable, invalid } = parseSkills(\n input.disableSkills,\n );\n if (invalid.length > 0) {\n throw new Error(formatInvalidSkills(invalid, \"--disable-skills\"));\n }\n for (const skill of skillsToDisable) {\n finalSkills.delete(skill);\n }\n if (finalSkills.size === 0) {\n throw new Error(\n \"Error: All skills have been disabled. At least one skill must remain enabled.\",\n );\n }\n }\n\n const resolvedOpenAiBaseUrl = input.openaiBaseUrl\n ? validateOpenAiBaseUrlThrows(input.openaiBaseUrl)\n : undefined;\n\n // Validate anthropic base URL if provided (same validation as OpenAI)\n const resolvedAnthropicBaseUrl = input.anthropicBaseUrl\n ? validateOpenAiBaseUrlThrows(input.anthropicBaseUrl)\n : undefined;\n\n // Validate agent provider if explicitly set\n let agentProvider:\n | \"openai\"\n | \"azure-openai\"\n | \"anthropic\"\n | \"openrouter\"\n | undefined = undefined;\n if (input.agentProvider) {\n const provider = input.agentProvider.toLowerCase();\n if (\n provider !== \"openai\" &&\n provider !== \"azure-openai\" &&\n provider !== \"anthropic\" &&\n provider !== \"openrouter\"\n ) {\n throw new Error(\n `Error: Invalid agent provider \"${input.agentProvider}\". Must be \"openai\", \"azure-openai\", \"anthropic\", or \"openrouter\".`,\n );\n }\n agentProvider = provider;\n }\n\n return {\n accessToken: input.accessToken,\n clientId: input.clientId || DEFAULT_SENTRY_CLIENT_ID,\n sentryHost,\n sentryProtocol,\n mcpUrl: input.mcpUrl,\n sentryDsn: input.sentryDsn,\n openaiBaseUrl: resolvedOpenAiBaseUrl,\n openaiModel: input.openaiModel,\n anthropicBaseUrl: resolvedAnthropicBaseUrl,\n anthropicModel: input.anthropicModel,\n agentProvider,\n finalSkills,\n organizationSlug: input.organizationSlug,\n projectSlug: input.projectSlug,\n };\n}\n"],"mappings":";;;AACA,MAAM,SAAS;CACd,SAAS;EACR,IAAI;EACJ,MAAM;EACN,aAAa;EACb,gBAAgB;EAChB,OAAO;CACP;CACD,MAAM;EACL,IAAI;EACJ,MAAM;EACN,aAAa;EACb,gBAAgB;EAChB,OAAO;CACP;CACD,MAAM;EACL,IAAI;EACJ,MAAM;EACN,aAAa;EACb,gBAAgB;EAChB,YAAY;EACZ,OAAO;CACP;CACD,QAAQ;EACP,IAAI;EACJ,MAAM;EACN,aAAa;EACb,gBAAgB;EAChB,OAAO;CACP;CACD,sBAAsB;EACrB,IAAI;EACJ,MAAM;EACN,aAAa;EACb,gBAAgB;EAChB,OAAO;CACP;AACD;AACD,MAAM,eAAe,OAAO,OAAO,OAAO,CAAC,KAAK,CAAC,GAAG,MAAM,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,MAAM;EACnB,UAAU,MAAM,YAAY;EAC5B;EACA;EACA,QAAQ,MAAM;EACd,WAAW,MAAM;EACjB,eAAe;EACf,aAAa,MAAM;EACnB,kBAAkB;EAClB,gBAAgB,MAAM;EACtB;EACA;EACA,kBAAkB,MAAM;EACxB,aAAa,MAAM;CACpB;AACF"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { OAUTH_HOST, isSentryHost } from "./constants-
|
|
1
|
+
import { OAUTH_HOST, isSentryHost } from "./constants-Da7VwSRQ.js";
|
|
2
2
|
import { toCachedToken } from "./types-BCSxlxZI.js";
|
|
3
|
-
import { authenticate } from "./device-code-flow-
|
|
3
|
+
import { authenticate } from "./device-code-flow-Bk6L232R.js";
|
|
4
4
|
import { readCachedToken, writeCachedToken } from "./token-cache-DbZp4rvg.js";
|
|
5
5
|
|
|
6
6
|
//#region src/auth/resolve-token.ts
|
|
@@ -44,4 +44,4 @@ async function resolveAccessToken(partial) {
|
|
|
44
44
|
|
|
45
45
|
//#endregion
|
|
46
46
|
export { resolveAccessToken };
|
|
47
|
-
//# sourceMappingURL=resolve-token-
|
|
47
|
+
//# sourceMappingURL=resolve-token-4RkU7UPe.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-token-
|
|
1
|
+
{"version":3,"file":"resolve-token-4RkU7UPe.js","names":["partial: PartiallyResolvedConfig","accessToken: string"],"sources":["../src/auth/resolve-token.ts"],"sourcesContent":["import type { PartiallyResolvedConfig, ResolvedConfig } from \"../cli/types\";\nimport { isSentryIo, OAUTH_HOST } from \"./constants\";\nimport { authenticate } from \"./device-code-flow\";\nimport { readCachedToken, writeCachedToken } from \"./token-cache\";\nimport { toCachedToken } from \"./types\";\n\nfunction withToken(\n partial: PartiallyResolvedConfig,\n accessToken: string,\n): ResolvedConfig {\n return { ...partial, accessToken };\n}\n\n/**\n * Resolves the access token for the session.\n *\n * If an access token is already provided, returns immediately.\n * If the host is sentry.io, attempts to use a cached token or\n * initiates the device code flow (only when stderr is a TTY).\n * For non-sentry.io hosts, throws an error requiring --access-token.\n */\nexport async function resolveAccessToken(\n partial: PartiallyResolvedConfig,\n): Promise<ResolvedConfig> {\n if (partial.accessToken) {\n return withToken(partial, partial.accessToken);\n }\n\n if (!isSentryIo(partial.sentryHost)) {\n throw new Error(\n \"Error: No access token was provided. Device code authentication is only supported for sentry.io.\\n\" +\n \"Pass one with `--access-token` or via `SENTRY_ACCESS_TOKEN`.\",\n );\n }\n\n const { clientId, sentryHost } = partial;\n\n // Try cached token first (works in both interactive and non-interactive contexts)\n try {\n const cached = await readCachedToken(sentryHost, clientId);\n if (cached) {\n process.stderr.write(\n `Using cached authentication for ${cached.user_email}\\n`,\n );\n return withToken(partial, cached.access_token);\n }\n } catch {\n // Cache read failure is non-fatal\n }\n\n // Device code flow requires a human to visit a URL and authorize.\n // In non-interactive contexts (CI, piped stdio), fail immediately\n // instead of hanging on the polling loop until expiry.\n if (!process.stderr.isTTY) {\n throw new Error(\n \"Error: No access token was provided.\\n\" +\n \"Run `sentry-mcp auth login` interactively first, or pass `--access-token` / `SENTRY_ACCESS_TOKEN`.\",\n );\n }\n\n const tokenResponse = await authenticate({ clientId, host: OAUTH_HOST });\n\n try {\n await writeCachedToken(toCachedToken(tokenResponse, sentryHost, clientId));\n } catch {\n process.stderr.write(\"Warning: Could not cache authentication token.\\n\");\n }\n\n return withToken(partial, tokenResponse.access_token);\n}\n"],"mappings":";;;;;;AAMA,SAAS,UACPA,SACAC,aACgB;AAChB,QAAO;EAAE,GAAG;EAAS;CAAa;AACnC;;;;;;;;;AAUD,eAAsB,mBACpBD,SACyB;AACzB,KAAI,QAAQ,YACV,QAAO,UAAU,SAAS,QAAQ,YAAY;AAGhD,MAAK,aAAW,QAAQ,WAAW,CACjC,OAAM,IAAI,MACR;CAKJ,MAAM,EAAE,UAAU,YAAY,GAAG;AAGjC,KAAI;EACF,MAAM,SAAS,MAAM,gBAAgB,YAAY,SAAS;AAC1D,MAAI,QAAQ;AACV,WAAQ,OAAO,OACZ,kCAAkC,OAAO,WAAW,IACtD;AACD,UAAO,UAAU,SAAS,OAAO,aAAa;EAC/C;CACF,QAAO,CAEP;AAKD,MAAK,QAAQ,OAAO,MAClB,OAAM,IAAI,MACR;CAKJ,MAAM,gBAAgB,MAAM,aAAa;EAAE;EAAU,MAAM;CAAY,EAAC;AAExE,KAAI;AACF,QAAM,iBAAiB,cAAc,eAAe,YAAY,SAAS,CAAC;CAC3E,QAAO;AACN,UAAQ,OAAO,MAAM,mDAAmD;CACzE;AAED,QAAO,UAAU,SAAS,cAAc,aAAa;AACtD"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_constants = require('./constants-
|
|
1
|
+
const require_constants = require('./constants-BqO-QSHl.cjs');
|
|
2
2
|
const require_types = require('./types-dghCRFW4.cjs');
|
|
3
|
-
const require_device_code_flow = require('./device-code-flow-
|
|
3
|
+
const require_device_code_flow = require('./device-code-flow-Dv-auCiV.cjs');
|
|
4
4
|
const require_token_cache = require('./token-cache-ATUcs1cg.cjs');
|
|
5
5
|
|
|
6
6
|
//#region src/auth/resolve-token.ts
|
|
@@ -49,4 +49,4 @@ Object.defineProperty(exports, 'resolveAccessToken', {
|
|
|
49
49
|
return resolveAccessToken;
|
|
50
50
|
}
|
|
51
51
|
});
|
|
52
|
-
//# sourceMappingURL=resolve-token-
|
|
52
|
+
//# sourceMappingURL=resolve-token-Daqu57f-.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-token-
|
|
1
|
+
{"version":3,"file":"resolve-token-Daqu57f-.cjs","names":["partial: PartiallyResolvedConfig","accessToken: string","OAUTH_HOST"],"sources":["../src/auth/resolve-token.ts"],"sourcesContent":["import type { PartiallyResolvedConfig, ResolvedConfig } from \"../cli/types\";\nimport { isSentryIo, OAUTH_HOST } from \"./constants\";\nimport { authenticate } from \"./device-code-flow\";\nimport { readCachedToken, writeCachedToken } from \"./token-cache\";\nimport { toCachedToken } from \"./types\";\n\nfunction withToken(\n partial: PartiallyResolvedConfig,\n accessToken: string,\n): ResolvedConfig {\n return { ...partial, accessToken };\n}\n\n/**\n * Resolves the access token for the session.\n *\n * If an access token is already provided, returns immediately.\n * If the host is sentry.io, attempts to use a cached token or\n * initiates the device code flow (only when stderr is a TTY).\n * For non-sentry.io hosts, throws an error requiring --access-token.\n */\nexport async function resolveAccessToken(\n partial: PartiallyResolvedConfig,\n): Promise<ResolvedConfig> {\n if (partial.accessToken) {\n return withToken(partial, partial.accessToken);\n }\n\n if (!isSentryIo(partial.sentryHost)) {\n throw new Error(\n \"Error: No access token was provided. Device code authentication is only supported for sentry.io.\\n\" +\n \"Pass one with `--access-token` or via `SENTRY_ACCESS_TOKEN`.\",\n );\n }\n\n const { clientId, sentryHost } = partial;\n\n // Try cached token first (works in both interactive and non-interactive contexts)\n try {\n const cached = await readCachedToken(sentryHost, clientId);\n if (cached) {\n process.stderr.write(\n `Using cached authentication for ${cached.user_email}\\n`,\n );\n return withToken(partial, cached.access_token);\n }\n } catch {\n // Cache read failure is non-fatal\n }\n\n // Device code flow requires a human to visit a URL and authorize.\n // In non-interactive contexts (CI, piped stdio), fail immediately\n // instead of hanging on the polling loop until expiry.\n if (!process.stderr.isTTY) {\n throw new Error(\n \"Error: No access token was provided.\\n\" +\n \"Run `sentry-mcp auth login` interactively first, or pass `--access-token` / `SENTRY_ACCESS_TOKEN`.\",\n );\n }\n\n const tokenResponse = await authenticate({ clientId, host: OAUTH_HOST });\n\n try {\n await writeCachedToken(toCachedToken(tokenResponse, sentryHost, clientId));\n } catch {\n process.stderr.write(\"Warning: Could not cache authentication token.\\n\");\n }\n\n return withToken(partial, tokenResponse.access_token);\n}\n"],"mappings":";;;;;;AAMA,SAAS,UACPA,SACAC,aACgB;AAChB,QAAO;EAAE,GAAG;EAAS;CAAa;AACnC;;;;;;;;;AAUD,eAAsB,mBACpBD,SACyB;AACzB,KAAI,QAAQ,YACV,QAAO,UAAU,SAAS,QAAQ,YAAY;AAGhD,MAAK,+BAAW,QAAQ,WAAW,CACjC,OAAM,IAAI,MACR;CAKJ,MAAM,EAAE,UAAU,YAAY,GAAG;AAGjC,KAAI;EACF,MAAM,SAAS,MAAM,oCAAgB,YAAY,SAAS;AAC1D,MAAI,QAAQ;AACV,WAAQ,OAAO,OACZ,kCAAkC,OAAO,WAAW,IACtD;AACD,UAAO,UAAU,SAAS,OAAO,aAAa;EAC/C;CACF,QAAO,CAEP;AAKD,MAAK,QAAQ,OAAO,MAClB,OAAM,IAAI,MACR;CAKJ,MAAM,gBAAgB,MAAM,sCAAa;EAAE;EAAU,MAAME;CAAY,EAAC;AAExE,KAAI;AACF,QAAM,qCAAiB,4BAAc,eAAe,YAAY,SAAS,CAAC;CAC3E,QAAO;AACN,UAAQ,OAAO,MAAM,mDAAmD;CACzE;AAED,QAAO,UAAU,SAAS,cAAc,aAAa;AACtD"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require('./chunk-Cv9WC9bY.cjs');
|
|
2
|
-
const require_version = require('./version-
|
|
2
|
+
const require_version = require('./version-B-XjWQrQ.cjs');
|
|
3
3
|
const __modelcontextprotocol_sdk_server_stdio_js = require_chunk.__toESM(require("@modelcontextprotocol/sdk/server/stdio.js"));
|
|
4
4
|
const __sentry_node = require_chunk.__toESM(require("@sentry/node"));
|
|
5
5
|
|
|
@@ -62,4 +62,4 @@ Object.defineProperty(exports, 'startStdio', {
|
|
|
62
62
|
return startStdio;
|
|
63
63
|
}
|
|
64
64
|
});
|
|
65
|
-
//# sourceMappingURL=stdio-
|
|
65
|
+
//# sourceMappingURL=stdio-4lgW_97D.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stdio-
|
|
1
|
+
{"version":3,"file":"stdio-4lgW_97D.cjs","names":["context: StdioServerContext","attributes: Record<string, string | boolean>","LIB_VERSION","server: McpServer","context: Context","StdioServerTransport"],"sources":["../src/transports/stdio.ts"],"sourcesContent":["import type { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\n/**\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 { LIB_VERSION } from \"@sentry/mcp-core/version\";\nimport * as Sentry from \"@sentry/node\";\n\nexport type StdioServerContext = {\n sentryHost?: string;\n mcpUrl?: string;\n experimentalMode?: boolean;\n};\n\nfunction getStdioSpanAttributes(\n context: StdioServerContext,\n): Record<string, string | boolean> {\n const attributes: Record<string, string | boolean> = {\n \"app.transport\": \"stdio\",\n \"app.server.version\": LIB_VERSION,\n \"app.server.mode.experimental\": context.experimentalMode ?? false,\n \"network.transport\": \"pipe\",\n \"service.version\": LIB_VERSION,\n };\n\n if (context.sentryHost) {\n attributes[\"app.upstream.host\"] = context.sentryHost;\n }\n if (context.mcpUrl) {\n attributes[\"app.url.full\"] = context.mcpUrl;\n }\n\n return attributes;\n}\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 - Context values used 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<Context extends StdioServerContext>(\n server: McpServer,\n context: Context,\n) {\n await Sentry.startNewTrace(async () => {\n return await Sentry.startSpan(\n {\n name: \"mcp.server/stdio\",\n attributes: getStdioSpanAttributes(context),\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":";;;;;;AA+BA,SAAS,uBACPA,SACkC;CAClC,MAAMC,aAA+C;EACnD,iBAAiB;EACjB,sBAAsBC;EACtB,gCAAgC,QAAQ,oBAAoB;EAC5D,qBAAqB;EACrB,mBAAmBA;CACpB;AAED,KAAI,QAAQ,WACV,YAAW,uBAAuB,QAAQ;AAE5C,KAAI,QAAQ,OACV,YAAW,kBAAkB,QAAQ;AAGvC,QAAO;AACR;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BD,eAAsB,WACpBC,QACAC,SACA;AACA,OAAM,cAAO,cAAc,YAAY;AACrC,SAAO,MAAM,cAAO,UAClB;GACE,MAAM;GACN,YAAY,uBAAuB,QAAQ;EAC5C,GACD,YAAY;GAEV,MAAM,YAAY,IAAIC;AACtB,SAAM,OAAO,QAAQ,UAAU;EAChC,EACF;CACF,EAAC;AACH"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LIB_VERSION } from "./version-
|
|
1
|
+
import { LIB_VERSION } from "./version-CWKzsUXy.js";
|
|
2
2
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
3
3
|
import * as Sentry from "@sentry/node";
|
|
4
4
|
|
|
@@ -56,4 +56,4 @@ async function startStdio(server, context) {
|
|
|
56
56
|
|
|
57
57
|
//#endregion
|
|
58
58
|
export { startStdio };
|
|
59
|
-
//# sourceMappingURL=stdio-
|
|
59
|
+
//# sourceMappingURL=stdio-C0wKX460.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stdio-
|
|
1
|
+
{"version":3,"file":"stdio-C0wKX460.js","names":["context: StdioServerContext","attributes: Record<string, string | boolean>","server: McpServer","context: Context"],"sources":["../src/transports/stdio.ts"],"sourcesContent":["import type { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\n/**\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 { LIB_VERSION } from \"@sentry/mcp-core/version\";\nimport * as Sentry from \"@sentry/node\";\n\nexport type StdioServerContext = {\n sentryHost?: string;\n mcpUrl?: string;\n experimentalMode?: boolean;\n};\n\nfunction getStdioSpanAttributes(\n context: StdioServerContext,\n): Record<string, string | boolean> {\n const attributes: Record<string, string | boolean> = {\n \"app.transport\": \"stdio\",\n \"app.server.version\": LIB_VERSION,\n \"app.server.mode.experimental\": context.experimentalMode ?? false,\n \"network.transport\": \"pipe\",\n \"service.version\": LIB_VERSION,\n };\n\n if (context.sentryHost) {\n attributes[\"app.upstream.host\"] = context.sentryHost;\n }\n if (context.mcpUrl) {\n attributes[\"app.url.full\"] = context.mcpUrl;\n }\n\n return attributes;\n}\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 - Context values used 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<Context extends StdioServerContext>(\n server: McpServer,\n context: Context,\n) {\n await Sentry.startNewTrace(async () => {\n return await Sentry.startSpan(\n {\n name: \"mcp.server/stdio\",\n attributes: getStdioSpanAttributes(context),\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":";;;;;AA+BA,SAAS,uBACPA,SACkC;CAClC,MAAMC,aAA+C;EACnD,iBAAiB;EACjB,sBAAsB;EACtB,gCAAgC,QAAQ,oBAAoB;EAC5D,qBAAqB;EACrB,mBAAmB;CACpB;AAED,KAAI,QAAQ,WACV,YAAW,uBAAuB,QAAQ;AAE5C,KAAI,QAAQ,OACV,YAAW,kBAAkB,QAAQ;AAGvC,QAAO;AACR;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BD,eAAsB,WACpBC,QACAC,SACA;AACA,OAAM,OAAO,cAAc,YAAY;AACrC,SAAO,MAAM,OAAO,UAClB;GACE,MAAM;GACN,YAAY,uBAAuB,QAAQ;EAC5C,GACD,YAAY;GAEV,MAAM,YAAY,IAAI;AACtB,SAAM,OAAO,QAAQ,UAAU;EAChC,EACF;CACF,EAAC;AACH"}
|
package/dist/transports/stdio.js
CHANGED
|
@@ -32,8 +32,9 @@ Session constraints:
|
|
|
32
32
|
--project-slug <slug> Optional project constraint
|
|
33
33
|
|
|
34
34
|
Skill controls:
|
|
35
|
-
--skills <list> Specify which skills to grant (default: active, non-deprecated skills
|
|
36
|
-
|
|
35
|
+
--skills <list> Specify which skills to grant (default: active, non-deprecated skills;
|
|
36
|
+
seer is excluded by default on self-hosted hosts)
|
|
37
|
+
--all-skills Grant all active, non-deprecated skills (including seer on self-hosted)
|
|
37
38
|
--disable-skills <list> Remove specific skills (e.g. --disable-skills=seer)
|
|
38
39
|
|
|
39
40
|
Available skills: ${allSkills.join(", ")}
|
|
@@ -47,6 +48,7 @@ Environment variables:
|
|
|
47
48
|
OPENROUTER_MODEL OpenRouter model (default: openai/gpt-5.6-luna)
|
|
48
49
|
OPENROUTER_REASONING_EFFORT OpenRouter reasoning effort: none|minimal|low|medium|high|xhigh (max→xhigh), or "" to omit (default: high)
|
|
49
50
|
EMBEDDED_AGENT_PROVIDER Provider override: openai, azure-openai, anthropic, or openrouter
|
|
51
|
+
MCP_SKILLS Specify which skills to grant (comma-separated)
|
|
50
52
|
MCP_DISABLE_SKILLS Disable specific skills (comma-separated)
|
|
51
53
|
|
|
52
54
|
Examples:
|
|
@@ -56,7 +58,7 @@ Examples:
|
|
|
56
58
|
${packageName} --access-token=TOKEN --skills=inspect,triage
|
|
57
59
|
${packageName} --access-token=TOKEN --host=sentry.example.com
|
|
58
60
|
${packageName} --access-token=TOKEN --host=sentry.internal:9000 --insecure-http
|
|
59
|
-
${packageName} --access-token=TOKEN --host=sentry.example.com --
|
|
61
|
+
${packageName} --access-token=TOKEN --host=sentry.example.com --skills=inspect,seer # self-hosted with Seer
|
|
60
62
|
${packageName} --access-token=TOKEN --agent-provider=azure-openai --openai-base-url=https://example.openai.azure.com/openai/v1/
|
|
61
63
|
${packageName} --access-token=TOKEN --agent-provider=anthropic
|
|
62
64
|
${packageName} --access-token=TOKEN --agent-provider=openrouter`;
|
|
@@ -69,4 +71,4 @@ Object.defineProperty(exports, 'buildUsage', {
|
|
|
69
71
|
return buildUsage;
|
|
70
72
|
}
|
|
71
73
|
});
|
|
72
|
-
//# sourceMappingURL=usage-
|
|
74
|
+
//# sourceMappingURL=usage-DZ4QDygT.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usage-DZ4QDygT.cjs","names":["packageName: string","allSkills: ReadonlyArray<Skill>"],"sources":["../src/cli/usage.ts"],"sourcesContent":["import type { Skill } from \"@sentry/mcp-core/skills\";\n\nexport function buildUsage(\n packageName: string,\n allSkills: ReadonlyArray<Skill>,\n): string {\n return `Usage: ${packageName} [--access-token=<token>] [--host=<host>] [--insecure-http]\n ${packageName} auth [login|logout|status]\n\nCommands:\n auth login Authenticate via device code flow (sentry.io only)\n auth logout Clear cached authentication\n auth status Show current authentication state\n\nAuthentication:\n --access-token <token> Sentry User Auth Token with API access\n Optional for sentry.io (device code flow is used if omitted)\n Required for self-hosted instances\n\nCommon optional flags:\n --host <host> Change Sentry host (self-hosted)\n --insecure-http Use http:// for self-hosted --host values\n --sentry-dsn <dsn> Override DSN used for telemetry reporting\n --experimental Enable forward-looking tool variants and experimental features\n\nEmbedded agent configuration:\n --agent-provider <provider> LLM provider: openai, azure-openai, anthropic, or openrouter (auto-detects from API keys)\n --openai-base-url <url> Override OpenAI API base URL\n --openai-model <model> Override OpenAI model (default: gpt-5)\n --anthropic-base-url <url> Override Anthropic API base URL\n --anthropic-model <model> Override Anthropic model (default: claude-sonnet-4-5)\n\nSession constraints:\n --organization-slug <slug> Force all calls to an organization\n --project-slug <slug> Optional project constraint\n\nSkill controls:\n --skills <list> Specify which skills to grant (default: active, non-deprecated skills;\n seer is excluded by default on self-hosted hosts)\n --all-skills Grant all active, non-deprecated skills (including seer on self-hosted)\n --disable-skills <list> Remove specific skills (e.g. --disable-skills=seer)\n\nAvailable skills: ${allSkills.join(\", \")}\n\nEnvironment variables:\n SENTRY_ACCESS_TOKEN Sentry auth token (alternative to --access-token)\n SENTRY_CLIENT_ID Override OAuth client ID for device code flow\n OPENAI_API_KEY OpenAI API key for AI-powered search tools\n ANTHROPIC_API_KEY Anthropic API key for AI-powered search tools\n OPENROUTER_API_KEY OpenRouter API key for AI-powered search tools\n OPENROUTER_MODEL OpenRouter model (default: openai/gpt-5.6-luna)\n OPENROUTER_REASONING_EFFORT OpenRouter reasoning effort: none|minimal|low|medium|high|xhigh (max→xhigh), or \"\" to omit (default: high)\n EMBEDDED_AGENT_PROVIDER Provider override: openai, azure-openai, anthropic, or openrouter\n MCP_SKILLS Specify which skills to grant (comma-separated)\n MCP_DISABLE_SKILLS Disable specific skills (comma-separated)\n\nExamples:\n ${packageName} # device code auth (sentry.io only)\n ${packageName} --access-token=TOKEN\n ${packageName} --access-token=TOKEN --all-skills\n ${packageName} --access-token=TOKEN --skills=inspect,triage\n ${packageName} --access-token=TOKEN --host=sentry.example.com\n ${packageName} --access-token=TOKEN --host=sentry.internal:9000 --insecure-http\n ${packageName} --access-token=TOKEN --host=sentry.example.com --skills=inspect,seer # self-hosted with Seer\n ${packageName} --access-token=TOKEN --agent-provider=azure-openai --openai-base-url=https://example.openai.azure.com/openai/v1/\n ${packageName} --access-token=TOKEN --agent-provider=anthropic\n ${packageName} --access-token=TOKEN --agent-provider=openrouter`;\n}\n"],"mappings":";;AAEA,SAAgB,WACdA,aACAC,WACQ;AACR,SAAQ,SAAS,YAAY;SACtB,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAmCD,UAAU,KAAK,KAAK,CAAC;;;;;;;;;;;;;;;IAerC,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,YAAY;AACf"}
|
|
@@ -31,8 +31,9 @@ Session constraints:
|
|
|
31
31
|
--project-slug <slug> Optional project constraint
|
|
32
32
|
|
|
33
33
|
Skill controls:
|
|
34
|
-
--skills <list> Specify which skills to grant (default: active, non-deprecated skills
|
|
35
|
-
|
|
34
|
+
--skills <list> Specify which skills to grant (default: active, non-deprecated skills;
|
|
35
|
+
seer is excluded by default on self-hosted hosts)
|
|
36
|
+
--all-skills Grant all active, non-deprecated skills (including seer on self-hosted)
|
|
36
37
|
--disable-skills <list> Remove specific skills (e.g. --disable-skills=seer)
|
|
37
38
|
|
|
38
39
|
Available skills: ${allSkills.join(", ")}
|
|
@@ -46,6 +47,7 @@ Environment variables:
|
|
|
46
47
|
OPENROUTER_MODEL OpenRouter model (default: openai/gpt-5.6-luna)
|
|
47
48
|
OPENROUTER_REASONING_EFFORT OpenRouter reasoning effort: none|minimal|low|medium|high|xhigh (max→xhigh), or "" to omit (default: high)
|
|
48
49
|
EMBEDDED_AGENT_PROVIDER Provider override: openai, azure-openai, anthropic, or openrouter
|
|
50
|
+
MCP_SKILLS Specify which skills to grant (comma-separated)
|
|
49
51
|
MCP_DISABLE_SKILLS Disable specific skills (comma-separated)
|
|
50
52
|
|
|
51
53
|
Examples:
|
|
@@ -55,7 +57,7 @@ Examples:
|
|
|
55
57
|
${packageName} --access-token=TOKEN --skills=inspect,triage
|
|
56
58
|
${packageName} --access-token=TOKEN --host=sentry.example.com
|
|
57
59
|
${packageName} --access-token=TOKEN --host=sentry.internal:9000 --insecure-http
|
|
58
|
-
${packageName} --access-token=TOKEN --host=sentry.example.com --
|
|
60
|
+
${packageName} --access-token=TOKEN --host=sentry.example.com --skills=inspect,seer # self-hosted with Seer
|
|
59
61
|
${packageName} --access-token=TOKEN --agent-provider=azure-openai --openai-base-url=https://example.openai.azure.com/openai/v1/
|
|
60
62
|
${packageName} --access-token=TOKEN --agent-provider=anthropic
|
|
61
63
|
${packageName} --access-token=TOKEN --agent-provider=openrouter`;
|
|
@@ -63,4 +65,4 @@ Examples:
|
|
|
63
65
|
|
|
64
66
|
//#endregion
|
|
65
67
|
export { buildUsage };
|
|
66
|
-
//# sourceMappingURL=usage-
|
|
68
|
+
//# sourceMappingURL=usage-Hi-6-LDr.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usage-Hi-6-LDr.js","names":["packageName: string","allSkills: ReadonlyArray<Skill>"],"sources":["../src/cli/usage.ts"],"sourcesContent":["import type { Skill } from \"@sentry/mcp-core/skills\";\n\nexport function buildUsage(\n packageName: string,\n allSkills: ReadonlyArray<Skill>,\n): string {\n return `Usage: ${packageName} [--access-token=<token>] [--host=<host>] [--insecure-http]\n ${packageName} auth [login|logout|status]\n\nCommands:\n auth login Authenticate via device code flow (sentry.io only)\n auth logout Clear cached authentication\n auth status Show current authentication state\n\nAuthentication:\n --access-token <token> Sentry User Auth Token with API access\n Optional for sentry.io (device code flow is used if omitted)\n Required for self-hosted instances\n\nCommon optional flags:\n --host <host> Change Sentry host (self-hosted)\n --insecure-http Use http:// for self-hosted --host values\n --sentry-dsn <dsn> Override DSN used for telemetry reporting\n --experimental Enable forward-looking tool variants and experimental features\n\nEmbedded agent configuration:\n --agent-provider <provider> LLM provider: openai, azure-openai, anthropic, or openrouter (auto-detects from API keys)\n --openai-base-url <url> Override OpenAI API base URL\n --openai-model <model> Override OpenAI model (default: gpt-5)\n --anthropic-base-url <url> Override Anthropic API base URL\n --anthropic-model <model> Override Anthropic model (default: claude-sonnet-4-5)\n\nSession constraints:\n --organization-slug <slug> Force all calls to an organization\n --project-slug <slug> Optional project constraint\n\nSkill controls:\n --skills <list> Specify which skills to grant (default: active, non-deprecated skills;\n seer is excluded by default on self-hosted hosts)\n --all-skills Grant all active, non-deprecated skills (including seer on self-hosted)\n --disable-skills <list> Remove specific skills (e.g. --disable-skills=seer)\n\nAvailable skills: ${allSkills.join(\", \")}\n\nEnvironment variables:\n SENTRY_ACCESS_TOKEN Sentry auth token (alternative to --access-token)\n SENTRY_CLIENT_ID Override OAuth client ID for device code flow\n OPENAI_API_KEY OpenAI API key for AI-powered search tools\n ANTHROPIC_API_KEY Anthropic API key for AI-powered search tools\n OPENROUTER_API_KEY OpenRouter API key for AI-powered search tools\n OPENROUTER_MODEL OpenRouter model (default: openai/gpt-5.6-luna)\n OPENROUTER_REASONING_EFFORT OpenRouter reasoning effort: none|minimal|low|medium|high|xhigh (max→xhigh), or \"\" to omit (default: high)\n EMBEDDED_AGENT_PROVIDER Provider override: openai, azure-openai, anthropic, or openrouter\n MCP_SKILLS Specify which skills to grant (comma-separated)\n MCP_DISABLE_SKILLS Disable specific skills (comma-separated)\n\nExamples:\n ${packageName} # device code auth (sentry.io only)\n ${packageName} --access-token=TOKEN\n ${packageName} --access-token=TOKEN --all-skills\n ${packageName} --access-token=TOKEN --skills=inspect,triage\n ${packageName} --access-token=TOKEN --host=sentry.example.com\n ${packageName} --access-token=TOKEN --host=sentry.internal:9000 --insecure-http\n ${packageName} --access-token=TOKEN --host=sentry.example.com --skills=inspect,seer # self-hosted with Seer\n ${packageName} --access-token=TOKEN --agent-provider=azure-openai --openai-base-url=https://example.openai.azure.com/openai/v1/\n ${packageName} --access-token=TOKEN --agent-provider=anthropic\n ${packageName} --access-token=TOKEN --agent-provider=openrouter`;\n}\n"],"mappings":";AAEA,SAAgB,WACdA,aACAC,WACQ;AACR,SAAQ,SAAS,YAAY;SACtB,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAmCD,UAAU,KAAK,KAAK,CAAC;;;;;;;;;;;;;;;IAerC,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,YAAY;AACf"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
//#region ../mcp-core/dist/version-
|
|
3
|
-
const LIB_VERSION = typeof process !== "undefined" && "0.
|
|
2
|
+
//#region ../mcp-core/dist/version-CJrU-J6H.js
|
|
3
|
+
const LIB_VERSION = typeof process !== "undefined" && "0.41.0" || "0.0.0";
|
|
4
4
|
const USER_AGENT = `sentry-mcp/${LIB_VERSION} (https://mcp.sentry.dev)`;
|
|
5
5
|
|
|
6
6
|
//#endregion
|
|
@@ -16,4 +16,4 @@ Object.defineProperty(exports, 'USER_AGENT', {
|
|
|
16
16
|
return USER_AGENT;
|
|
17
17
|
}
|
|
18
18
|
});
|
|
19
|
-
//# sourceMappingURL=version-
|
|
19
|
+
//# sourceMappingURL=version-B-XjWQrQ.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version-B-XjWQrQ.cjs","names":[],"sources":["../../mcp-core/dist/version-CJrU-J6H.js"],"sourcesContent":["//#region src/version.ts\nconst LIB_VERSION = typeof process !== \"undefined\" && \"0.41.0\" || \"0.0.0\";\nconst USER_AGENT = `sentry-mcp/${LIB_VERSION} (https://mcp.sentry.dev)`;\n\n//#endregion\nexport { LIB_VERSION, USER_AGENT };\n//# sourceMappingURL=version-CJrU-J6H.js.map"],"mappings":";;AACA,MAAM,qBAAqB,YAAY,eAAe,YAAY;AAClE,MAAM,cAAc,aAAa,YAAY"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
//#region ../mcp-core/dist/version-CJrU-J6H.js
|
|
2
|
+
const LIB_VERSION = typeof process !== "undefined" && "0.41.0" || "0.0.0";
|
|
3
|
+
const USER_AGENT = `sentry-mcp/${LIB_VERSION} (https://mcp.sentry.dev)`;
|
|
4
|
+
|
|
5
|
+
//#endregion
|
|
6
|
+
export { LIB_VERSION, USER_AGENT };
|
|
7
|
+
//# sourceMappingURL=version-CWKzsUXy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version-CWKzsUXy.js","names":[],"sources":["../../mcp-core/dist/version-CJrU-J6H.js"],"sourcesContent":["//#region src/version.ts\nconst LIB_VERSION = typeof process !== \"undefined\" && \"0.41.0\" || \"0.0.0\";\nconst USER_AGENT = `sentry-mcp/${LIB_VERSION} (https://mcp.sentry.dev)`;\n\n//#endregion\nexport { LIB_VERSION, USER_AGENT };\n//# sourceMappingURL=version-CJrU-J6H.js.map"],"mappings":";AACA,MAAM,qBAAqB,YAAY,eAAe,YAAY;AAClE,MAAM,cAAc,aAAa,YAAY"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/mcp-server",
|
|
3
3
|
"mcpName": "io.github.getsentry/sentry-mcp",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.41.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
7
7
|
"node": ">=22.13"
|
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@modelcontextprotocol/sdk": "1.30.0",
|
|
45
|
-
"@sentry/node": "
|
|
46
|
-
"@sentry/core": "
|
|
45
|
+
"@sentry/node": "11.0.0-rc.0",
|
|
46
|
+
"@sentry/core": "11.0.0-rc.0",
|
|
47
47
|
"dotenv": "^16.6.1",
|
|
48
48
|
"zod": "^4.4.3"
|
|
49
49
|
},
|
|
@@ -52,10 +52,10 @@
|
|
|
52
52
|
"tsdown": "^0.12.9",
|
|
53
53
|
"tsx": "^4.20.3",
|
|
54
54
|
"typescript": "^5.8.3",
|
|
55
|
-
"vitest": "^4.1.
|
|
56
|
-
"@sentry/mcp-core": "0.
|
|
57
|
-
"@sentry/mcp-server-
|
|
58
|
-
"@sentry/mcp-server-
|
|
55
|
+
"vitest": "^4.1.11",
|
|
56
|
+
"@sentry/mcp-core": "0.41.0",
|
|
57
|
+
"@sentry/mcp-server-mocks": "0.41.0",
|
|
58
|
+
"@sentry/mcp-server-tsconfig": "0.41.0"
|
|
59
59
|
},
|
|
60
60
|
"scripts": {
|
|
61
61
|
"build": "tsdown",
|