Repository navigation
🌱 Refactor UI to deploy and manage MCPServer as a Deployment/StatefulSet + Service - #552
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request refactors the Kagenti UI to deploy and manage MCP tools as standard Kubernetes Deployments/StatefulSets + Services instead of using the Toolhive MCPServer CRD. This is a significant architectural change that removes the dependency on the Toolhive operator and uses standard Kubernetes primitives.
Changes:
- Backend now creates Deployments/StatefulSets directly instead of MCPServer CRDs
- Services are created with new naming convention (
{name}-mcpinstead ofmcp-{name}-proxy) - Frontend updated to display workload types and service information
- Migration tooling provided (CLI script and API endpoints) to migrate existing MCPServer CRDs
- E2E tests and CI scripts updated to use new deployment approach
- StatefulSet support added for tools requiring persistent storage
Reviewed changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated 12 comments.
Show a summary per file
| File | Description |
|---|---|
kagenti/backend/app/routers/tools.py |
Major refactoring with new manifest builders for Deployments/StatefulSets/Services, migration endpoints |
kagenti/backend/app/core/constants.py |
Added constants for transport labels, service naming, migration tracking |
kagenti/backend/app/core/config.py |
Added enable_legacy_mcpserver_crd flag for backward compatibility |
kagenti/ui-v2/src/types/index.ts |
Updated types for workload types, status, and service info |
kagenti/ui-v2/src/pages/*.tsx |
UI updates to display workload types, service info, and Shipwright build status |
kagenti/tools/migrate_tools.py |
New CLI migration script (784 lines) |
kagenti/backend/tests/test_tool_workloads.py |
New unit tests for manifest builders (674 lines) |
kagenti/examples/mcpservers/weather_tool.yaml |
Replaced MCPServer CRD with Deployment + Service manifests |
.github/workflows/e2e-kind.yaml |
Removed Toolhive CRD wait step, updated tool deployment |
.github/scripts/kagenti-operator/*.sh |
Updated deployment scripts to use Deployments instead of MCPServer CRDs |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
How to test:
If testing the Weather tool with the Weather agent, copy the URL of the tool from the tool detail page and use that as MCP_URL for the weather agent. You may edit the MCP_URL before starting the build of the weather agent. |
Signed-off-by: Paolo Dettori <[email protected]>
…tion Signed-off-by: Paolo Dettori <[email protected]>
Signed-off-by: Paolo Dettori <[email protected]>
Signed-off-by: Paolo Dettori <[email protected]>
Signed-off-by: Paolo Dettori <[email protected]>
Signed-off-by: Paolo Dettori <[email protected]>
Signed-off-by: Paolo Dettori <[email protected]>
…ulset Signed-off-by: Paolo Dettori <[email protected]>
Signed-off-by: Paolo Dettori <[email protected]>
Signed-off-by: Paolo Dettori <[email protected]> Co-authored-by: Copilot <[email protected]>
Signed-off-by: Paolo Dettori <[email protected]> Co-authored-by: Copilot <[email protected]>
Signed-off-by: Paolo Dettori <[email protected]> Co-authored-by: Copilot <[email protected]>
Signed-off-by: Paolo Dettori <[email protected]> Co-authored-by: Copilot <[email protected]>
Signed-off-by: Paolo Dettori <[email protected]>
Signed-off-by: Paolo Dettori <[email protected]>
Signed-off-by: Paolo Dettori <[email protected]>
Signed-off-by: Paolo Dettori <[email protected]>
Signed-off-by: Paolo Dettori <[email protected]>
|
@paolo, I've installed pr-552 branch code and rebuilt the UI and backend (as documented ^^^). When I deploy the tool (weather-service) from source I see that the status of the pod is NotReady: And the Deployment status looks good: |
Signed-off-by: Paolo Dettori <[email protected]>


Summary
Refactor UI to deploy and manage MCPServer as a Deployment/StatefulSet + Service.
Goals:
Scope:
Target Architecture
Benefits
Service Naming Convention
Old (Toolhive):
mcp-{name}-proxyNew (Direct):
{name}-mcpImplementation Timeline
Related issue(s)
Fixes #550