-
Notifications
You must be signed in to change notification settings - Fork 613
[CHORE]: Cleanup unused Federation module and duplicate Forwarding logic #1912
Copy link
Copy link
Closed
Copy link
Description
🐞 Bug Summary
The mcpgateway.federation module (containing DiscoveryService and ForwardingService) is currently unused and not wired into the application lifecycle.
- DiscoveryService (mDNS auto-discovery) is not required for the current deployment model.
- ForwardingService logic is largely duplicated by ToolService, which implements a more advanced version of tool invocation (supporting OAuth, Plugins, SSE).
To reduce technical debt and confusion, this unused code should be removed.
Note: Check all the corresponding dependencies, documentation, env variables and more related to federation for cleanup
🧩 Affected Component
Select the area of the project impacted:
-
mcpgateway- API -
mcpgateway- UI (admin panel) -
mcpgateway.wrapper- stdio wrapper - Federation or Transports
- CLI, Makefiles, or shell scripts
- Container setup (Docker/Podman/Compose)
- Other (explain below)
🔁 Steps to Reproduce
- Inspect mcpgateway/main.py and observe that DiscoveryService and ForwardingService are never instantiated.
- Inspect mcpgateway/services/tool_service.py (invoke_tool method) and verify it manages its own connections to remote gateways, bypassing ForwardingService.
- Check mcpgateway/federation/ directory to see the dead code.
🤔 Expected Behavior
The codebase should be clean and devoid of large blocks of unused or duplicate code. The mcpgateway.federation package should be deleted.
📓 Logs / Error Output
Paste any relevant stack traces or logs here.
🧠 Environment Info
You can retrieve most of this from the /version endpoint.
| Key | Value |
|---|---|
| Version or commit | e.g. v0.9.0 or main@a1b2c3d |
| Runtime | e.g. Python 3.11, Gunicorn |
| Platform / OS | e.g. Ubuntu 22.04, macOS |
| Container | e.g. Docker, Podman, none |
🧩 Additional Context (optional)
Add any configuration details, flags, or related issues.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working