-
Notifications
You must be signed in to change notification settings - Fork 424
Open
Description
Summary
Add three new MCP tools to the kagent-controller's existing MCP endpoint at :8083/mcp for dynamic tool server discovery and invocation:
| Tool | Purpose |
|---|---|
list_tool_servers |
List all tool servers across RemoteMCPServer, Service (with kagent.dev/mcp-service=true), and MCPServer CRs |
list_tools |
Connect to a specific tool server and return its available tools |
call_tool |
Invoke a specific tool on a specific tool server |
Motivation
This was originally proposed as kagent-dev/kmcp#123 but the reviewer correctly noted that it belongs in kagent instead of kmcp, because:
- kagent already watches all three tool source types — RemoteMCPServer, Service, and MCPServer (optional)
- kagent already has an MCP handler at
:8083/mcpwithlist_agents/invoke_agent - kmcp should stay focused on deployment — translating MCPServer CRs into Kubernetes resources
Moving to kagent provides unified discovery across all tool sources, not just MCPServer CRs.
Design
- Ref format:
Kind/namespace/name(e.g.RemoteMCPServer/default/my-server,Service/tools/prometheus,MCPServer/default/weather) - Session caching:
sync.Mapwith evict-and-retry on stale connections - URL derivation: Reuses existing
ConvertServiceToRemoteMCPServerandConvertMCPServerToRemoteMCPServerfrom the translator package - MCPServer CRD is optional: Gracefully returns empty list if kmcp is not installed
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Backlog