GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(tui): add MCP OAuth authentication in dialog-mcp by dmae97 · Pull Request #11925 · anomalyco/opencode

Conversation

@dmae97

@dmae97 dmae97 commented Feb 3, 2026

Copy link
Copy Markdown

Summary

  • Add a keybind to trigger OAuth authentication for MCP servers in TUI
  • Show needs_auth/needs_client_registration status with visual indicators
  • Display error messages for failed MCP connections
  • Add toast notifications for auth flow feedback

Bug Fixes

  • fix(provider): Add missing error checks in OAuth authorize
  • fix(mcp): Improve OAuth flow reliability by passing serverUrl to credential storage

Changes

File Change
src/cli/cmd/auth.ts Remove unnecessary sleep
src/provider/auth.ts Add OauthMissing/OauthMethodNotFound error checks
src/mcp/auth.ts Add serverUrl parameter to credential functions
src/mcp/index.ts Pass mcpName to waitForCallback
src/mcp/oauth-callback.ts Fix cancelPending to search by mcpName
src/mcp/oauth-provider.ts Pass serverUrl to save functions
src/cli/cmd/tui/component/dialog-mcp.tsx New OAuth UI feature

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
yu
feat(tui): add MCP OAuth authentication in dialog-mcp
fccbcc5
- Add 'a' keybind to trigger OAuth authentication for MCP servers
- Show needs_auth/needs_client_registration status with visual indicators
- Display error messages for failed MCP connections
- Add toast notifications for auth flow feedback

fix(provider): add missing error checks in OAuth authorize

- Add OauthMissing error when auth provider not found
- Add OauthMethodNotFound error when method index invalid

fix(mcp): improve OAuth flow reliability

- Track serverUrl in auth storage to invalidate on URL change
- Pass mcpName to waitForCallback for proper cancellation
- Fix cancelPending to find auth by mcpName instead of oauthState
- Remove unnecessary Bun.sleep in auth.ts
@github-actions github-actions Bot added the needs:issue label Feb 3, 2026
@github-actions

github-actions Bot commented Feb 3, 2026

Copy link
Copy Markdown
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions

github-actions Bot commented Feb 3, 2026

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

Based on the search results, I found potentially related PRs to PR #11925:

Related PRs Found:

  1. PR feat(app): add MCP OAuth authentication UI to settings #11477 - feat(app): add MCP OAuth authentication UI to settings

    • Relevance: Also adds MCP OAuth authentication UI, but to settings rather than the TUI dialog. May be addressing similar OAuth UI/UX concerns.
  2. PR feat(mcp): add OAuth redirect URI configuration for MCP servers #9034 - feat(mcp): add OAuth redirect URI configuration for MCP servers

    • Relevance: Related to MCP OAuth infrastructure/configuration that this PR depends on.
  3. PR feat(mcp): support explicit OAuth callback host binding #9078 - feat(mcp): add oauth callbackHost config

    • Relevance: OAuth callback configuration for MCP servers, related to the oauth-callback.ts changes in this PR.
  4. PR Fix MCP OAuth auth commands to recognize remote servers by default #5537 - Fix MCP OAuth auth commands to recognize remote servers by default

    • Relevance: Previous work on MCP OAuth authentication reliability.
  5. PR fix: enable MCP server after OAuth completion #6960 - fix: enable MCP server after OAuth completion

    • Relevance: Related to post-OAuth flow behavior in MCP.

Most relevant: PR #11477 may be worth checking if there's overlap in OAuth UI implementation approach.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

adamdotdevin and others added 26 commits February 5, 2026 15:27
@adamdotdevin yu
fix(app): move session search to command palette
979c50e
@ProdigyRahul yu
fix(app): edit project dialog icon on hover (#11921)
37557bd
@ProdigyRahul yu
fix(app): session tabs to open the previous opened (#11914)
4fae22c
@adamdotdevin yu
chore(app): don't forceMount tooltips
c020449
@adamdotdevin yu
fix(app): terminal serialization bug
c29b39e
@adamdotdevin yu
fix(app): terminal serialization bug
5c8862e
@luiz290788 yu
docs: add --mdns-domain flag documentation (#11933)
6fa5c83
@dbpolito yu
feat(desktop): Allow empty prompt with review comments (#11953)
f171dc4
@mugnimaestra yu
fix: handle nested array items for Gemini schema validation (#11952)
4eb879d
@neavo yu
fix: exclude k2p5 from reasoning variants (#11918)
8a6523b
@rekram1-node yu
feat: improve skills, better prompting, fix permission asks after inv…
1fbbd64
…oking skills, ensure agent knows where scripts/resources are (#11737)
@rekram1-node yu
test: add test for new skill improvements (#11969)
0427912
@adamdotdevin yu
chore: cleanup
6cde634
@adamdotdevin yu
fix(app): spacing
90c73a1
@adamdotdevin yu
chore: gitignore codex
e4e50d6
@workedbeforepush yu
feat: Add .slnx to C#/F# LSP root detection (#11928)
d864bc7
@adamdotdevin yu
fix(app): model selector truncating too soon
7e29503
@adamdotdevin yu
fix(app): command palette placeholder text
d6d1591
@rekram1-node yu
fix: ensure mcp tools are sanitized (#11984)
15c7f3b
@cloudyan yu
fix: provider headers from config not applied to fetch requests (#11788)
eae4b9d
@opencode-agent yu
chore: generate
d11ff2c
@MartinWie yu
fix: always fall back to native clipboard after OSC52 (#11994)
bf00a92
@thdxr yu
cli: add --thinking flag to show reasoning blocks in run command (#12013
ada384f
)
@thdxr @neriousy yu
feat: add support for reading skills from .agents/skills directories (#…
ea2bee2
…11842)

Co-authored-by: Filip <[email protected]>
@IdrisGit yu
docs: add missing environmental flags to the list (#11146)
3d06ea1
@IdrisGit yu
feat(tui): allow theme colors in agent customization (#11444)
0497490
0xdsqr and others added 17 commits February 5, 2026 15:28
@0xdsqr yu
fix(app): derive terminal WebSocket URL from browser origin instead o… (
41a3361
#12178)
@ParkerSm1th yu
fix(desktop): Refresh file contents when changing workspaces to not h…
10098b3
…ave stale contents (#11728)
@adamdotdevin yu
fix(app): terminal EOL issues
a438429
@shantur yu
fix(core): skip dependency install in read-only config dirs (#12128)
57a6849
@adamdotdevin yu
fix(app): terminal url
447109a
@maharshi365 yu
fix(tui): add hover states to question tool tabs (#12203)
b5fbd17
@ariane-emory yu
feat: Allow the function to hide or show thinking blocks to be bound …
c96f7f4
…to a key (resolves #12168) (#12171)
@opencode-agent yu
chore: generate
7b8f378
@neriousy yu
fix(app): refresh workspace sessions on project switch (#12189)
ef30f9f
@fwang yu
zen: set session affinity header
e552826
@fwang yu
wip: zen
c3ce650
@thdxr yu
fix: wait for dependencies before loading custom tools and plugins (#…
860a47d
…12227)
yu
fix(security): enhance path containment checks with symlink and Windo…
f0fd27a
…ws cross-drive protection

- Add containsSecure and containsSecureAsync functions in Filesystem
- Add containsPathSecure method in Instance for security-critical operations
- Update File.read and File.list to use secure path validation
- Improve ACP authenticate method with proper error handling and guidance
- Remove unused scrap.ts dummy code file
- Enable unicode filenames test (was skipped, now passing)
- Add clarifying comments to empty handler functions

Security improvements:
- Resolve symlinks before path containment check
- Detect Windows cross-drive path escape attempts
- Conservative fallback (deny) when realpath fails
yu
chore(deploy): add Railway deployment configuration
0371487
- Add Dockerfile.railway for monorepo build with Bun
- Add railway.json for deployment settings
- Configure health check and restart policies
yu
docs: add @deprecated annotation to top-level tools field
9bafe95
yu
fix: 로그인 이메일 제한 제거 및 Railway health check 경로 수정
b80bb92
- auth.ts: non-production 환경의 @anoma.ly 이메일 제한 제거
- railway.json, Dockerfile.railway: healthcheckPath를 /global/health로 수정
- packages/opencode: Railway 배포 설정 추가
yu
feat(security): comprehensive security audit fixes, architecture refa…
4c0ebac
…ctoring, and test coverage expansion

- Security: add server security headers, body size limit (10MB), SSRF protection with IPv6 fix, XSS fix in OAuth callback, remove code injection vector, plugin permission enforcement
- Architecture: extract ToolContext factory, split SessionPrompt (1847 lines) into 5 focused modules, split Config (1344 lines) into schema/loader/plugin/migration modules
- Tests: add 316 new tests (storage, server security, webfetch SSRF, auth, bus, command, env, flag, format, global, and more)
- DevOps: harden Dockerfiles with non-root user, add .dockerignore, extend .gitignore for secrets, add dependabot and security-scan workflows
- Cleanup: remove dead code (message.ts), debug console.logs, fix error handling (JSON.parse guards, silent catch logging), fix MCP error message typo
- Docs: add TODO report, security audit report, architecture overview, API reference, development guide
@dmae97
dmae97 requested a review from adamdotdevin as a code owner February 5, 2026 06:28
yu added 6 commits February 5, 2026 15:30
yu
fix(deploy): make Dockerfile.railway monorepo-aware for workspace dep…
96902f3
…endency resolution
yu
fix(deploy): upgrade Docker Bun 1.1 to 1.3 to resolve lockfile versio…
bfce6a5
…n mismatch
yu
fix(deploy): correct --host to --hostname in Dockerfile CMD for yargs…
84bfe9c
… compatibility
yu
fix(deploy): scope opencode.json gitignore to root only so theme file…
b789e36
… is included in Railway uploads
yu
fix(core): harden security and reduce crash risk
ca6187a
yu
chore(repo): ignore coverage artifacts
f6fc6d5
This was referenced Feb 7, 2026
Fix/219 thinking keybind attach auth #12588
Closed
Feat(desktop) Add mcp auth from TUI and VS Code support #13085
Closed
This was referenced Mar 4, 2026
fix(mcp): show "needs auth" instead of "failed" for OAuth servers #15986
Closed
fix(mcp): generate OAuth state on-the-fly during initial connection #16248
Closed
@github-actions

github-actions Bot commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

Closing this pull request because it has had no updates for more than 60 days. If you plan to continue working on it, feel free to reopen or open a new PR.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot closed this Apr 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@adamdotdevin adamdotdevin Awaiting requested review from adamdotdevin

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

needs:issue

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

20 participants

@dmae97 @adamdotdevin @ProdigyRahul @luiz290788 @dbpolito @mugnimaestra @neavo @rekram1-node @workedbeforepush @cloudyan @MartinWie @thdxr @IdrisGit @elithrar @tylergannon @tlinhart @mariamjabara @neriousy @MaxLeiter @lgladysz
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.