Skip to content

fix(opencode): hide MCP access token prefix#33711

Open
rekram1-node wants to merge 4 commits into
devfrom
hide-mcp-token
Open

fix(opencode): hide MCP access token prefix#33711
rekram1-node wants to merge 4 commits into
devfrom
hide-mcp-token

Conversation

@rekram1-node

@rekram1-node rekram1-node commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

Issue for this PR

Related to #28567

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

opencode mcp debug currently prints the first 20 characters of a stored OAuth access token.

This replaces that output with a censored token display containing at most the first four characters, exactly ***, and the last four characters. Tokens of eight characters or fewer display only ***, so the complete token is never printed. Expiry, refresh-token presence, and client registration diagnostics remain unchanged.

How did you verify your code works?

  • bunx prettier --check src/cli/cmd/mcp.ts from packages/opencode
  • git diff --check origin/dev...HEAD

Screenshots / recordings

Not applicable; this is a CLI output change.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant