Skip to content

fix(mcp): sync manage_mcp enable/disable with live manager#3825

Open
cyq1017 wants to merge 4 commits into
odysseus-dev:devfrom
cyq1017:codex/odysseus-mcp-disable-runtime-gpt55
Open

fix(mcp): sync manage_mcp enable/disable with live manager#3825
cyq1017 wants to merge 4 commits into
odysseus-dev:devfrom
cyq1017:codex/odysseus-mcp-disable-runtime-gpt55

Conversation

@cyq1017

@cyq1017 cyq1017 commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Summary

When enabling or disabling an MCP server via the manage_mcp command/action, the configuration was updated in the database but did not take effect on the active MCPManager instance. This PR connects/disconnects the live MCP server dynamically from do_manage_mcp so that changes take effect immediately without needing to restart the application.

Target branch

  • This PR targets dev, not main.

Linked Issue

Fixes #3824

Type of Change

  • Bug fix (non-breaking — fixes a confirmed issue)

Checklist

  • I searched open issues and open PRs — this is not a duplicate.
  • This PR targets dev
  • My changes are limited to the scope described above — no unrelated refactors or whitespace changes mixed in.
  • I actually ran the app and verified the change works end-to-end.

How to Test

  1. Add an MCP server to the database.
  2. Run do_manage_mcp with action="disable" and the server_id. Verify that tools registered by this server are dynamically removed from the active tool registry.
  3. Run do_manage_mcp with action="enable" and the server_id. Verify that tools are dynamically re-registered.
  4. Run the unit tests to verify database commits and connection calls are triggered in correct sequence:
    python3 -m pytest tests/test_mcp_reconnect_args.py

Visual / UI changes — REQUIRED if you touched anything that renders

N/A (Backend logic only, no UI/visual changes)

@github-actions github-actions Bot added the ready for review Description complete — ready for maintainer review label Jun 10, 2026
@alteixeira20 alteixeira20 added the bug Something isn't working label Jun 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ready for review Description complete — ready for maintainer review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: manage_mcp command does not dynamically disconnect/reconnect live MCP servers

2 participants