[PR #1558] [CLOSED] Honor disabled MCP server overrides from higher-priority configuration #3529

Closed
opened 2026-11-07 14:42:08 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/1558
Author: @bettercallcaleb
Created: 10/8/2026
Status: ❌ Closed

Base: main ← Head: fix/mcp-disabled-config-overrides-20261008


📝 Commits (1)

  • 1fc8324 Honor disabled MCP server configuration overrides

📊 Changes

2 files changed (+83 additions, -3 deletions)

View changed files

📝 serve/mcp.py (+10 -3)
➕ serve/test_mcp_config_overlay.py (+73 -0)

📄 Description

Title

Honor disabled MCP server overrides from higher-priority configuration

Issue: none (standalone correctness fix)

Summary

A server disabled by a higher-priority MCP configuration remains enabled when a lower-priority configuration already defines it. servers_from() removes entries marked disabled: true before hub_from_config() merges the layers, so a later override cannot remove the earlier server.

For example, if the run config enables notes and weather but --mcp-config disables notes, the effective configuration incorrectly retains both.

What changed

  • Apply MCP configuration layers in priority order and remove earlier definitions explicitly disabled in a later layer.
  • Preserve existing validation, ordinary replacement and the ability to re-enable a server in a subsequent layer.
  • Add 10 regression tests covering disable/re-enable, configuration precedence, the last-server case, unrelated servers, invalid input and input non-mutation.
  • Unchanged: MCP tool invocation, transport, server lifecycle and GPU/engine code.

Extra Notes

Before/after evidence: Four of the ten new tests fail on upstream main; all ten pass with this fix.

Validation actually executed:

python -m unittest serve.test_mcp_config_overlay serve.test_mcp -q
Ran 35 tests in 13.773s
OK

git diff --check passed.

Tested in a separate clean sparse checkout at upstream commit fb58e0dbc8399662c0e47c76578c6e878b14f6cf using a previously installed Python virtual environment. These tests use mock/local MCP servers. No production service, GPU inference, or full repository test suite was run.

AI disclosure: I used AI to help review the code and prepare the patch and tests. I ran the tests listed above locally.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/1558 **Author:** [@bettercallcaleb](https://github.com/bettercallcaleb) **Created:** 10/8/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/mcp-disabled-config-overrides-20261008` --- ### 📝 Commits (1) - [`1fc8324`](https://github.com/Niko1221/Strata/commit/1fc83246a44f12b6a4b416bd7faa5dc8adca1101) Honor disabled MCP server configuration overrides ### 📊 Changes **2 files changed** (+83 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `serve/mcp.py` (+10 -3) ➕ `serve/test_mcp_config_overlay.py` (+73 -0) </details> ### 📄 Description ## Title Honor disabled MCP server overrides from higher-priority configuration Issue: none (standalone correctness fix) ## Summary A server disabled by a higher-priority MCP configuration remains enabled when a lower-priority configuration already defines it. `servers_from()` removes entries marked `disabled: true` before `hub_from_config()` merges the layers, so a later override cannot remove the earlier server. For example, if the run config enables `notes` and `weather` but `--mcp-config` disables `notes`, the effective configuration incorrectly retains both. ## What changed - Apply MCP configuration layers in priority order and remove earlier definitions explicitly disabled in a later layer. - Preserve existing validation, ordinary replacement and the ability to re-enable a server in a subsequent layer. - Add 10 regression tests covering disable/re-enable, configuration precedence, the last-server case, unrelated servers, invalid input and input non-mutation. - **Unchanged:** MCP tool invocation, transport, server lifecycle and GPU/engine code. ## Extra Notes **Before/after evidence:** Four of the ten new tests fail on upstream `main`; all ten pass with this fix. **Validation actually executed:** ```text python -m unittest serve.test_mcp_config_overlay serve.test_mcp -q Ran 35 tests in 13.773s OK ``` `git diff --check` passed. Tested in a separate clean sparse checkout at upstream commit `fb58e0dbc8399662c0e47c76578c6e878b14f6cf` using a previously installed Python virtual environment. These tests use mock/local MCP servers. No production service, GPU inference, or full repository test suite was run. **AI disclosure:** I used AI to help review the code and prepare the patch and tests. I ran the tests listed above locally. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 14:42:08 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#3529
No description provided.