Skip to content

Feat/custom mcp servers#1094

Open
lukashankeln wants to merge 6 commits into
developfrom
feat/custom-mcp-servers
Open

Feat/custom mcp servers#1094
lukashankeln wants to merge 6 commits into
developfrom
feat/custom-mcp-servers

Conversation

@lukashankeln

Copy link
Copy Markdown
Contributor

No description provided.

@lukashankeln
lukashankeln marked this pull request as ready for review July 24, 2026 12:36
@lukashankeln
lukashankeln requested a review from beneiltis as a code owner July 24, 2026 12:36
lukashankeln and others added 6 commits July 24, 2026 14:37
Introduces McpServer (mogenius.com/v1alpha1) — a namespaced resource that
declares an external MCP server agents can pull tools from.

- type_mcp_server.go: McpServer/Spec/Auth/Header/Status types with
  transport (streamableHttp, sse), bearer/apiKey auth, per-header secret
  refs, allowedTools allowlist, and Ready status condition
- type_agent.go: McpServerRefs []string field on AgentSpec
- zz_generated.deepcopy.go: DeepCopy for all new types
- utils/config.go: McpServerResource descriptor
- store/store.go: GetMcpServer / GetAllMcpServers
- crds/client/v1alpha1.go: full CRUD + UpdateMcpServerStatus client methods
- mogenius.com_mcpservers.yaml: generated CRD manifest

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Validates McpServer CRs, probes the server on create/update, and writes
status (Ready condition, availableTools, toolCount, lastConnectedAt).
Also validates mcpServerRefs on Agent CRs so missing servers surface as
a Ready=False condition rather than a silent runtime error.

- mcp_servers.go: reconcileMcpServers + evaluateMcpServer (spec
  validation, secret existence checks, transport enum check)
- reconciler/agents.go: McpServerRef existence check in evaluateAgent
- factory.go: register McpServer reconciler with NamespaceFilter

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Agents that list mcpServerRefs now have those servers' tools available
during every run, in addition to the built-in read-only K8s/Helm tools.

- mcp_client.go: SSE transport support, arbitrary header injection,
  AllowedTools filtering, session-scoped GetTools/IsTool/CallTool methods,
  RemoveSession
- mcp_crd_connector.go: NotifyMcpServerChanged (reconnect + return
  discovered tools), NotifyMcpServerDeleted, RefreshAllMcpServerCRConnections
- aimanager.go: extend AiManager interface; call
  RefreshAllMcpServerCRConnections at startup
- tools.go: McpSessions field on ToolContext
- agents.go: populate McpSessions from agent.Spec.McpServerRefs
- anthropic/openai/ollama: inject session-scoped MCP tools into the
  agent pipeline and dispatch MCP tool calls alongside built-in tools

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Lukas Hankeln <lukashankeln@googlemail.com>
Signed-off-by: Lukas Hankeln <lukashankeln@googlemail.com>
Signed-off-by: Lukas Hankeln <lukashankeln@googlemail.com>
@lukashankeln
lukashankeln force-pushed the feat/custom-mcp-servers branch from 0f2dc71 to 629b18f Compare July 24, 2026 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant