Skip to content

fix(cli): Hide deprecated --access-token from sentry mcp help - #2057

Merged
BYK merged 1 commit into
mainfrom
fix/cli-mcp-hide-access-token
Nov 6, 2026
Merged

BYK merged 1 commit into
mainfrom
fix/cli-mcp-hide-access-token

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

sentry mcp --help listed --access-token, although it's deprecated. The other deprecated mcp flags (--host, --url, --insecure-http, --organization-slug, --project-slug) are hidden.

What changed

  • --access-token now uses the hidden deprecatedStringFlag("SENTRY_AUTH_TOKEN") helper. Before, it used a visible stringFlag. Parsing, the single deprecation warning (in lib/mcp.ts) and telemetry redaction are unchanged. The command's full description still mentions the deprecation.
  • I regenerated the skill reference references/mcp.md, which drops the flag line. generate:docs produced no other changes.
  • Git history (feat(cli): add local MCP server command #1401, feat(mcp-server): Ship @sentry/mcp-server as a slim bundle that shares CLI auth #1731) gives no sign that the flag was left visible on purpose, and docs/operations/stdio-auth.md only documents it as a deprecated alias.

Testing

  • pnpm run tsc and pnpm run lint pass.
  • pnpm run test in packages/cli: the MCP, telemetry and auth tests that cover --access-token pass. 5 tests fail because of the sandbox environment, not this change: they expect EACCES/EPERM/readonly behavior and fail on file permissions (completions, upgrade lock, resilient db, dsn code scanner).

Refs #2050

via @dcramer.

--

View Session [Sentry]

Use the hidden deprecatedStringFlag helper like the other deprecated
mcp flags. The flag still parses, warns, and is redacted from telemetry.

Refs #2050

Co-Authored-By: David Cramer <[email protected]>
@vercel

vercel Bot commented Nov 6, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
sentry-local Skipped Skipped Nov 6, 2026 6:55pm UTC

Request Review

@BYK
BYK enabled auto-merge (squash) November 6, 2026 19:03
@BYK
BYK merged commit ac8591e into main Nov 6, 2026
26 checks passed
@BYK
BYK deleted the fix/cli-mcp-hide-access-token branch November 6, 2026 19:08

This branch was previously deployed

1 inactive deployment
Preview — 5292abcc Deployed Nov 6, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: low PR risk score: low

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants