-
Notifications
You must be signed in to change notification settings - Fork 1.8k
feat: add toggle functionality for enabling/disabling/reloading all MCP servers #3737
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
4dce299
6a015ab
74384e2
783cbc6
ac26ff6
03d96ab
a7a96fb
e8f99e2
7d5dd40
cc278a6
0123cad
8856dab
8d937c3
fe0a70e
999d27b
442ad40
fe34086
f0596ac
77e9ae1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1317,15 +1317,13 @@ export class McpHub { | |
const allServers = this.getAllServers() | ||
|
||
// Set the Disabled flag for all servers | ||
await Promise.all( | ||
allServers.map(async (server) => { | ||
await this.updateServerConfig(server.name, { disabled }, server.source) | ||
const conn = this.findConnection(server.name, server.source) | ||
if (conn) { | ||
conn.server.disabled = disabled | ||
} | ||
}), | ||
) | ||
for (const server of allServers) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As also noted by a previous comment, updating server configurations sequentially in this loop: It might be a good idea to use |
||
await this.updateServerConfig(server.name, { disabled }, server.source) | ||
const conn = this.findConnection(server.name, server.source) | ||
if (conn) { | ||
conn.server.disabled = disabled | ||
} | ||
} | ||
|
||
// If activated, reload configuration | ||
if (!disabled) { | ||
|
Uh oh!
There was an error while loading. Please reload this page.