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: ability to toggle MCP Servers in TUI by dbpolito · Pull Request #4509 · anomalyco/opencode

Conversation

@dbpolito

@dbpolito dbpolito commented Nov 19, 2025

Copy link
Copy Markdown
Contributor

Related to #514

This introduces a new command /mcp which you can manage MCPs on session level, makes it possible to have MCPs disabled by default and only enabling it when you want, for example my default i have github disabled and playwright enabled

image image image image image image

Sorry, something went wrong.

Uh oh!

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

iljod, noirbizarre, mcheviron, ocombe, elementalvoid, EmZod, arsham, and itse4elhaam reacted with thumbs up emoji
All reactions
  • 👍 8 reactions
dbpolito added 3 commits November 19, 2025 16:42
@dbpolito
MCP Servers TUI
de8a1ee
@dbpolito
Adding Loading
ff9ddbc
@dbpolito
Refactor
855e2c1
Copilot AI review requested due to automatic review settings November 19, 2025 20:08
@dbpolito dbpolito mentioned this pull request Nov 19, 2025
Option to Enable / Disable MCP Servers (via TUI) #514
Closed
Copilot started reviewing on behalf of dbpolito November 19, 2025 20:14
View session
Copilot finished reviewing on behalf of dbpolito November 19, 2025 20:15
Copilot AI reviewed Nov 19, 2025
View reviewed changes

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces an MCP (Model Context Protocol) management UI accessible via the /mcp command, allowing users to enable/disable MCP servers on a session level rather than having all configured MCPs enabled by default.

  • Adds new API endpoints for connecting and disconnecting MCP servers dynamically
  • Implements a new TUI dialog component for managing MCP server states
  • Updates the MCP status logic to distinguish between disabled, connected, and failed states

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
packages/sdk/js/src/gen/types.gen.ts Adds TypeScript type definitions for new MCP connect/disconnect API endpoints
packages/sdk/js/src/gen/sdk.gen.ts Adds SDK client methods for MCP connect and disconnect operations
packages/opencode/src/server/server.ts Implements POST endpoints for /mcp/:name/connect and /mcp/:name/disconnect
packages/opencode/src/mcp/index.ts Adds connect/disconnect functions and updates status/tools logic to handle disabled MCPs
packages/opencode/src/cli/cmd/tui/routes/home.tsx Updates MCP server count display to only show connected servers
packages/opencode/src/cli/cmd/tui/context/local.tsx Adds MCP toggle functionality and model list helper to local context
packages/opencode/src/cli/cmd/tui/component/prompt/autocomplete.tsx Separates /mcp command from /status command aliases
packages/opencode/src/cli/cmd/tui/component/dialog-mcp.tsx New dialog component for managing MCP server connections with toggle functionality
packages/opencode/src/cli/cmd/tui/app.tsx Registers the new MCP dialog command handler

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread packages/opencode/src/mcp/index.ts Resolved

Uh oh!

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

Comment thread packages/opencode/src/mcp/index.ts Resolved

Uh oh!

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

Comment thread packages/opencode/src/mcp/index.ts Resolved

Uh oh!

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

Comment thread packages/opencode/src/cli/cmd/tui/component/dialog-mcp.tsx Resolved

Uh oh!

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

Comment thread packages/opencode/src/cli/cmd/tui/component/dialog-mcp.tsx Resolved

Uh oh!

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

Comment thread packages/opencode/src/cli/cmd/tui/component/dialog-mcp.tsx Resolved

Uh oh!

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

Comment thread packages/opencode/src/cli/cmd/tui/component/dialog-mcp.tsx Resolved

Uh oh!

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

Comment thread packages/opencode/src/cli/cmd/tui/component/dialog-mcp.tsx Resolved

Uh oh!

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

Comment thread packages/opencode/src/cli/cmd/tui/component/dialog-mcp.tsx Resolved

Uh oh!

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

@dbpolito
Tweaks
0afe525
@itse4elhaam

itse4elhaam commented Nov 20, 2025

Copy link
Copy Markdown

This is beautiful, really needed.

Another thing, sometimes the agent is not familiar with the mcp servers it has available, I created a list-mcp tool for it to get rid of this issue, maybe something that should be there by default,

All reactions

Sorry, something went wrong.

Uh oh!

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

@Raviguntakala

Raviguntakala commented Nov 21, 2025

Copy link
Copy Markdown
Contributor

This is awesome! I was actually planning to request this feature too. It will really help to manage MCPs from the UI for each session. Nice to see someone already raised a PR for it. I’m interested in this feature and hope it gets merged soon.

@rekram1-node is this feature going to be added in the next release?

All reactions

Sorry, something went wrong.

Uh oh!

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

@github-actions
github-actions Bot force-pushed the dev branch 3 times, most recently from f1dc981 to 3e15a39 Compare November 22, 2025 18:07
@thdxr
thdxr force-pushed the dev branch from 3e15a39 to a0831ea Compare November 22, 2025 18:11
@github-actions
github-actions Bot force-pushed the dev branch 2 times, most recently from df8bdf9 to 0dd5039 Compare November 22, 2025 18:21
@rekram1-node

rekram1-node commented Nov 24, 2025

Copy link
Copy Markdown
Member

Yeah this one looked pretty good, can we resolve the conflicts please?

dbpolito reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

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

@dbpolito
Merge branch 'dev' into mcp_tui
fab81c3
@dbpolito

dbpolito commented Nov 24, 2025

Copy link
Copy Markdown
Contributor Author

@rekram1-node fixed 👍

bitboxx reacted with rocket emoji
All reactions
  • 🚀 1 reaction

Sorry, something went wrong.

Uh oh!

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

@modelnova-ai

modelnova-ai commented Nov 26, 2025

Copy link
Copy Markdown

@rekram1-node fixed 👍

Looks like there are conflicts again. Can you please resolve them when you get a chance?

dbpolito reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

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

@dbpolito
Merge branch 'dev' into mcp_tui
a15ef96
@dbpolito

dbpolito commented Nov 26, 2025

Copy link
Copy Markdown
Contributor Author

conflicts fixed

All reactions

Sorry, something went wrong.

Uh oh!

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

@modelnova-ai

modelnova-ai commented Nov 26, 2025

Copy link
Copy Markdown

conflicts fixed

Thanks, One question the toggle works on Space right now. Would it be better to use Enter to enable or disable an MCP instead of Space?

All reactions

Sorry, something went wrong.

Uh oh!

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

@itse4elhaam

itse4elhaam commented Nov 26, 2025

Copy link
Copy Markdown

conflicts fixed

Thanks, One question the toggle works on Space right now. Would it be better to use Enter to enable or disable an MCP instead of Space?

Space is mostly considered as an operation to "toggle" things.

IMO, space is better.

modelnova-ai reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

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

@modelnova-ai

modelnova-ai commented Nov 26, 2025

Copy link
Copy Markdown

@rekram1-node Would really appreciate getting this merged! Managing multiple MCPs gets messy, and this toggle feature would be super helpful for reducing context bloat and improve startup time. Would be great to have this in the next release. Thanks! 🙏

All reactions

Sorry, something went wrong.

Uh oh!

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

@rekram1-node

rekram1-node commented Nov 26, 2025

Copy link
Copy Markdown
Member

yeah we will merge dw

modelnova-ai, hamidi-dev, and dbpolito reacted with rocket emoji
All reactions
  • 🚀 3 reactions

Sorry, something went wrong.

Uh oh!

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

@github-actions
github-actions Bot force-pushed the dev branch from f8ee907 to 6a9856d Compare November 27, 2025 01:29
@ocombe

ocombe commented Dec 4, 2025

Copy link
Copy Markdown

That's awesome, I was just looking for this.
I have MCPs that I only use for some tasks (ex: notion MCP that I want to enable when I'm working on docs), but I don't want them to bloat the context all the time. This feature would fix that problem.

All reactions

Sorry, something went wrong.

Uh oh!

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

@rekram1-node
rekram1-node force-pushed the dev branch from 398b39a to 5013d64 Compare December 5, 2025 05:13
@rekram1-node

rekram1-node commented Dec 8, 2025

Copy link
Copy Markdown
Member

Alright @dbpolito can you resolve the conflicts and then ill merge?

All reactions

Sorry, something went wrong.

Uh oh!

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

@rekram1-node

rekram1-node commented Dec 8, 2025

Copy link
Copy Markdown
Member

I can't believe I commented two weeks ago, I thought I did that just a few days ago oof

itse4elhaam and franlol reacted with laugh emoji
All reactions
  • 😄 2 reactions

Sorry, something went wrong.

Uh oh!

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

dbpolito added 9 commits December 8, 2025 10:31
@dbpolito
Merge upstream dev branch
c330840
- Merged upstream/dev into mcp_tui branch
- Resolved conflicts in:
  - packages/opencode/src/cli/cmd/tui/app.tsx: Combined useConnected import with DialogMcp
  - packages/opencode/src/server/server.ts: Kept both MCP connect/disconnect endpoints and new OAuth auth endpoints
  - packages/sdk/js/src/gen/sdk.gen.ts: Added all MCP SDK methods (connect, disconnect, and OAuth auth)
  - packages/sdk/js/src/gen/types.gen.ts: Added all MCP TypeScript type definitions
- All merge conflicts resolved successfully
@dbpolito
Tweaks
6c03e7a
@dbpolito
Tweaks
dc52c60
@dbpolito
Tweak
12e1bbc
@dbpolito
Tweak
1610e8b
@dbpolito
Tweak
f38018b
@dbpolito
Tweak
1c7da79
@dbpolito
Tweak
44794a6
@dbpolito
Tweak
53f5f30
@dbpolito

dbpolito commented Dec 8, 2025

Copy link
Copy Markdown
Contributor Author

@rekram1-node hey, updated the PR... it seems format and sdk actions are conflicting with each other... i ran their scripts locally but or one or another fails...

All reactions

Sorry, something went wrong.

Uh oh!

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

@rekram1-node

rekram1-node commented Dec 8, 2025

Copy link
Copy Markdown
Member

Don't worry about them they suck, Dax will fix it

All reactions

Sorry, something went wrong.

Uh oh!

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

@rekram1-node

rekram1-node commented Dec 8, 2025

Copy link
Copy Markdown
Member

/review

All reactions

Sorry, something went wrong.

Uh oh!

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

@github-actions

github-actions Bot commented Dec 8, 2025

Copy link
Copy Markdown
Contributor

lgtm

All reactions

Sorry, something went wrong.

Uh oh!

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

@rekram1-node

rekram1-node commented Dec 8, 2025

Copy link
Copy Markdown
Member

Wow this is good work

dbpolito reacted with rocket emoji
All reactions
  • 🚀 1 reaction

Sorry, something went wrong.

Uh oh!

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

@rekram1-node rekram1-node changed the title MCP Servers TUI feat: ability to toggle MCP Servers in TUI Dec 8, 2025
@rekram1-node
rekram1-node merged commit 203f331 into anomalyco:dev Dec 8, 2025
github-actions Bot pushed a commit to yuguorui/opencode that referenced this pull request Jan 18, 2026
@dbpolito
feat: ability to toggle MCP Servers in TUI (anomalyco#4509)
15c7d88
Rwanbt pushed a commit to Rwanbt/unifia that referenced this pull request May 5, 2026
@dbpolito
feat: ability to toggle MCP Servers in TUI (anomalyco#4509)
426e73d
AIALRA-0 pushed a commit to AIALRA-0/opencode-turn-engine that referenced this pull request Jun 10, 2026
@dbpolito
feat: ability to toggle MCP Servers in TUI (anomalyco#4509)
d61f0b5
Rwanbt pushed a commit to Rwanbt/unifia that referenced this pull request Jun 14, 2026
@dbpolito
feat: ability to toggle MCP Servers in TUI (anomalyco#4509)
503cada
MarsQiu007 referenced this pull request in MarsQiu007/openNovel Jul 31, 2026
@dbpolito
feat: ability to toggle MCP Servers in TUI (#4509)
421d7ce
meSingh pushed a commit to meSingh/opencode that referenced this pull request Sep 6, 2026
@dbpolito
feat: ability to toggle MCP Servers in TUI (anomalyco#4509)
caae191
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

Copilot code review Copilot
Copilot review effort
Applies to this pull request for everyone.Learn more about Copilot code review.
Copilot left review comments

Uh oh!

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

Assignees

No one assigned

Labels

None yet

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.

7 participants

@dbpolito @itse4elhaam @Raviguntakala @rekram1-node @modelnova-ai @ocombe
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.