chore(mcp): remove unused MCP_SERVICE_HOST and MCP_SERVICE_PORT config - #42569
Conversation
These configuration variables are defined but never consumed by the MCP service runtime. Removing dead config reduces confusion. Related to apache#42425 Signed-off-by: arijitroy003 <arijitroy003@gmail.com>
Code Review Agent Run #d2e0e1Actionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
✅ Deploy Preview for superset-docs-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #42569 +/- ##
==========================================
- Coverage 65.29% 65.28% -0.02%
==========================================
Files 2798 2798
Lines 158066 158164 +98
Branches 36133 36149 +16
==========================================
+ Hits 103215 103257 +42
- Misses 52856 52905 +49
- Partials 1995 2002 +7
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Verified the removed MCP_SERVICE_HOST / MCP_SERVICE_PORT are genuinely unreferenced by any code, so this is a safe dead-config cleanup.
Unreferenced check (whole-repo grep, symbol + string forms — python, helm, docker/compose, CI workflows, k8s, .env/config examples, frontend): No hits outside documentation. The MCP service actually binds via FASTMCP_HOST / FASTMCP_PORT (superset/mcp_service/__main__.py:166-168), not these constants. get_mcp_config() placed the two keys into app.config (flask_singleton.py:91-92), but nothing ever reads them back (no config["MCP_SERVICE_HOST"], os.environ, or .config.get for either key). The dict is informational and not serialized to any API/frontend contract, and no test references the keys. Confirmed dead.
Minor (docs consistency, not a blocker): These settings are still documented as "Host/Port the MCP server binds to" and should be removed/updated in the same spirit as this cleanup, since they no longer exist and never actually drove the bind:
docs/admin_docs/configuration/mcp-server.mdx:499-500(and the versioned copyversion-6.1.0/.../mcp-server.mdx:499-500, plus the example blocks at:382-383)superset/mcp_service/PRODUCTION.md:499-500UPDATING.md:794-795, 817-818
CI: All required checks pass. The single red is playwright-tests-experimental (chromium, /app/prefix), a non-required experimental matrix leg — an unrelated flaky embedded frontend test (playwright/tests/embedded/pivot-collapse-state.spec.ts, #33406) timing out on chart render across 2 retries. The sibling playwright-tests-experimental (chromium) leg passes, and a +0/-6 deletion of two unused Python constants cannot affect a browser e2e run. Unrelated to this change.
Summary
Remove unused
MCP_SERVICE_HOSTandMCP_SERVICE_PORTconfiguration variables that are defined but never consumed by the MCP service runtime.Related to #42425
Changes
MCP_SERVICE_HOSTandMCP_SERVICE_PORTdefinitions frommcp_config.pyTesting
Verified these variables are not imported or referenced by any runtime code.