Skip to content

feat(mcp): Allow toggle MCPs on/off - #3725

Merged
andrinoff merged 6 commits into
charmbracelet:mainfrom
BrunoKrugel:feat/toggleMcp
Sep 28, 2026
Merged

andrinoff merged 6 commits into
charmbracelet:mainfrom
BrunoKrugel:feat/toggleMcp

Conversation

@BrunoKrugel

@BrunoKrugel BrunoKrugel commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

This PRs adds a new menu option that allows the user to enable and disable MCPs on demand (saved per repository, not globally).

image image

When we disable/enable any MCP we also have a toast with status:
image

image

Closes #3234

  • I have read CONTRIBUTING.md.
  • I have created a discussion that was approved by a maintainer (for new features).

@andrinoff

Copy link
Copy Markdown
Member

Hm.. I'm thinking maybe there would be a switch, like in model picker to choose between disabling/enabling globally and locally?

How do you like that idea? (Anyone can discuss this)

@BrunoKrugel

Copy link
Copy Markdown
Contributor Author

Hm.. I'm thinking maybe there would be a switch, like in model picker to choose between disabling/enabling globally and locally?

How do you like that idea? (Anyone can discuss this)

This switch? I like the idea

image

@andrinoff

Copy link
Copy Markdown
Member

yes!

@andrinoff andrinoff self-assigned this Sep 9, 2026
@BrunoKrugel

BrunoKrugel commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor Author

yes!

still wip, but already working

image

@BrunoKrugel

Copy link
Copy Markdown
Contributor Author

@andrinoff can you review this when you have time?

@andrinoff andrinoff left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Also, disabling a MCP that requires auth results in MCP asking to auth. It should only disable it

Comment thread internal/db/connect.go Outdated
Comment thread internal/config/docker_mcp.go Outdated
Comment thread internal/config/docker_mcp.go Outdated

@andrinoff andrinoff left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

For UI review: @meowgorithm

@BrunoKrugel
BrunoKrugel force-pushed the feat/toggleMcp branch 2 times, most recently from 27b8314 to 8d54273 Compare September 21, 2026 09:23
@meowgorithm

meowgorithm commented Sep 22, 2026 •

Copy link
Copy Markdown
Member

You rock, Bruno. And really solid suggestions, Drew.

Small UX requests

  1. Let's use the same status dots here we see in the UI:
  2. When MCPs are in a starting state drop the periods of ellipsis: "starting…" should be just "starting". The text is less jumpy between transitions that way.

image

And after this this we should also do this for skills and tools too.

image

@BrunoKrugel

Copy link
Copy Markdown
Contributor Author

And after this this we should also do this for skills and tools too.

Yep, its on my TODO list

@BrunoKrugel

Copy link
Copy Markdown
Contributor Author

Small UX requests

  1. Let's use the same status dots here we see in the UI:
  2. When MCPs are in a starting state drop the periods of ellipsis: "starting…" should be just "starting". The text is less jumpy between transitions that way.

Done, updated the first post with the updated image.

@BrunoKrugel

Copy link
Copy Markdown
Contributor Author

@meowgorithm we good with the UX or do we need more adjustments?

@meowgorithm

Copy link
Copy Markdown
Member

We're good to go! @andrinoff, if this looks good to you let’s merge it!

/cc @gurnben

@andrinoff
andrinoff merged commit a9a257c into charmbracelet:main Sep 28, 2026
15 checks passed
@BrunoKrugel
BrunoKrugel deleted the feat/toggleMcp branch September 28, 2026 11:03
andikapradanaarif added a commit to andikapradanaarif/crush that referenced this pull request Oct 1, 2026
* ui: add mouse support to the quit dialogue

* ui: keep quit dialog buttons visible in small terminals

* ui: align quit dialog button hit regions with centered row

* ui: report all mouse motion while hoverable dialogs are open

* ui: cover quit dialog mouse buttons and hover reporting in tests

* chore(legal): @KevinFumbles has signed the CLA

* chore(legal): @djbclark has signed the CLA

* chore(legal): @wcqqq1214 has signed the CLA

* chore(legal): @Souptik96 has signed the CLA

* chore(legal): @alyraffauf has signed the CLA

* test(server): stop a timing race from failing a fire-and-forget test (charmbracelet#3967)

* chore(legal): @valdepeace has signed the CLA

* chore(legal): @vitolee-1018 has signed the CLA

* feat(mcp): Allow toggle MCPs on/off (charmbracelet#3725)

* chore: auto-update files

* fix: reorder migrations

* feat(tui): display git branch (charmbracelet#2437)

Co-authored-by: Kieran Klukas <kieran@dunkirk.sh>
Co-authored-by: drew <me@andrinoff.com>
Signed-off-by: drew <me@andrinoff.com>

* v0.97.0

Signed-off-by: drew <me@andrinoff.com>

* fix: remove the powerline symbol

Signed-off-by: drew <me@andrinoff.com>

* v0.97.1

Signed-off-by: drew <me@andrinoff.com>

* chore(legal): @Shub3am has signed the CLA

* chore(legal): @raytorresch has signed the CLA

* server: add support for git branches

* refactor(ui): poll the git branch off the render path

Reading the branch was wired into the three places that render it, so a
redraw could kick off a network request as a side effect and the value had
to be guarded by its own mutex, in-flight flag, and expiry.

The TUI already has a pattern for header data that has to be fetched: a
ticker sends a poll message, a command does the work with its own timeout,
and the result lands in model state that views read plainly. The Hyper
credits balance is fetched this way and is passed into the header
alongside what this now passes.

Moving the branch onto that path drops the second cache entirely. With no
caller left asking once per frame, the cache inside the git helper had
nothing to protect either, and removing it also removes the stale window
where a client could show a branch two expiries out of date.

Asking for the branch now names its cost: it takes a context and can
fail, which is honest for something that crosses the network in
client/server mode.

* perf(prompt): read the current git branch without spawning a shell

* test: remove signing off of the branch test (charmbracelet#3999)

Signed-off-by: drew <me@andrinoff.com>

* chore(legal): @0-wiz-0 has signed the CLA

* fix(ui): stop the attachment row from claiming files that are visible

On a narrow editor the row budgeted every attachment chip at the widest
filename it allows rather than the width it actually needs, so a single
short-named file was counted as overflowing its own row and got an
unstyled "1 more…" tacked on beside it, promising a file already on
screen. Chips are now measured as they are laid out, the hint counts only
what was left out, and it is drawn with a theme style.

When the row has space for just one chip, that chip now gives up filename
width so the hint can stay, rather than dropping the count and leaving
several attached files looking like one. The name is trimmed down to a
floor; past it the name would be mostly ellipsis and identify nothing, so
the hint gives way instead.

The renderer's style constructor also took seven positional arguments of
the same type, so adding the hint's style meant editing eight files and
the compiler could not have caught a transposition. Those styles now
travel as one named value.

---------

Signed-off-by: drew <me@andrinoff.com>
Co-authored-by: Christian Rocha <christian@rocha.is>
Co-authored-by: Charm <124303983+charmcli@users.noreply.github.com>
Co-authored-by: Kieran Klukas <kieran@dunkirk.sh>
Co-authored-by: Bruno Krugel <brunokrugel@gmail.com>
Co-authored-by: Gustave <2909789120@qq.com>
Co-authored-by: drew <me@andrinoff.com>
Co-authored-by: Drew Smirnoff <drew@charm.land>
andikapradanaarif added a commit to andikapradanaarif/crush that referenced this pull request Oct 1, 2026
* ui: add mouse support to the quit dialogue

* ui: keep quit dialog buttons visible in small terminals

* ui: align quit dialog button hit regions with centered row

* ui: report all mouse motion while hoverable dialogs are open

* ui: cover quit dialog mouse buttons and hover reporting in tests

* chore(legal): @KevinFumbles has signed the CLA

* chore(legal): @djbclark has signed the CLA

* chore(legal): @wcqqq1214 has signed the CLA

* chore(legal): @Souptik96 has signed the CLA

* chore(legal): @alyraffauf has signed the CLA

* test(server): stop a timing race from failing a fire-and-forget test (charmbracelet#3967)

* chore(legal): @valdepeace has signed the CLA

* chore(legal): @vitolee-1018 has signed the CLA

* feat(mcp): Allow toggle MCPs on/off (charmbracelet#3725)

* chore: auto-update files

* fix: reorder migrations

* feat(tui): display git branch (charmbracelet#2437)

Co-authored-by: Kieran Klukas <kieran@dunkirk.sh>
Co-authored-by: drew <me@andrinoff.com>
Signed-off-by: drew <me@andrinoff.com>

* v0.97.0

Signed-off-by: drew <me@andrinoff.com>

* fix: remove the powerline symbol

Signed-off-by: drew <me@andrinoff.com>

* v0.97.1

Signed-off-by: drew <me@andrinoff.com>

* chore(legal): @Shub3am has signed the CLA

* chore(legal): @raytorresch has signed the CLA

* server: add support for git branches

* refactor(ui): poll the git branch off the render path

Reading the branch was wired into the three places that render it, so a
redraw could kick off a network request as a side effect and the value had
to be guarded by its own mutex, in-flight flag, and expiry.

The TUI already has a pattern for header data that has to be fetched: a
ticker sends a poll message, a command does the work with its own timeout,
and the result lands in model state that views read plainly. The Hyper
credits balance is fetched this way and is passed into the header
alongside what this now passes.

Moving the branch onto that path drops the second cache entirely. With no
caller left asking once per frame, the cache inside the git helper had
nothing to protect either, and removing it also removes the stale window
where a client could show a branch two expiries out of date.

Asking for the branch now names its cost: it takes a context and can
fail, which is honest for something that crosses the network in
client/server mode.

* perf(prompt): read the current git branch without spawning a shell

* test: remove signing off of the branch test (charmbracelet#3999)

Signed-off-by: drew <me@andrinoff.com>

* chore(legal): @0-wiz-0 has signed the CLA

* fix(ui): stop the attachment row from claiming files that are visible

On a narrow editor the row budgeted every attachment chip at the widest
filename it allows rather than the width it actually needs, so a single
short-named file was counted as overflowing its own row and got an
unstyled "1 more…" tacked on beside it, promising a file already on
screen. Chips are now measured as they are laid out, the hint counts only
what was left out, and it is drawn with a theme style.

When the row has space for just one chip, that chip now gives up filename
width so the hint can stay, rather than dropping the count and leaving
several attached files looking like one. The name is trimmed down to a
floor; past it the name would be mostly ellipsis and identify nothing, so
the hint gives way instead.

The renderer's style constructor also took seven positional arguments of
the same type, so adding the hint's style meant editing eight files and
the compiler could not have caught a transposition. Those styles now
travel as one named value.

---------

Signed-off-by: drew <me@andrinoff.com>
Co-authored-by: Christian Rocha <christian@rocha.is>
Co-authored-by: Charm <124303983+charmcli@users.noreply.github.com>
Co-authored-by: Kieran Klukas <kieran@dunkirk.sh>
Co-authored-by: Bruno Krugel <brunokrugel@gmail.com>
Co-authored-by: Gustave <2909789120@qq.com>
Co-authored-by: drew <me@andrinoff.com>
Co-authored-by: Drew Smirnoff <drew@charm.land>
Litexplorer pushed a commit to Litexplorer/crush that referenced this pull request Oct 8, 2026
共 4 个上游提交:
- a9a257c feat(mcp): Allow toggle MCPs on/off (charmbracelet#3725)
- 1f3827b fix: reorder migrations
- 06e50a3 chore: auto-update files
- 056387b chore(legal): CLA

迁移文件与本地允许乱序迁移的补丁并存,无重名冲突。
@andrinoff andrinoff mentioned this pull request Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: Toggle enable/disable MCPs per session

3 participants