feat: custom MCP server configuration per session and project#1251
Conversation
Enable users to add, remove, enable, and disable MCP servers at both the session and project level, with config persisted across session stop/start cycles. Closes #1249 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
This PR implements all 4 requirements from #1249:
🤖 Session |
… mock Fix gofmt alignment in UpdateAgenticSessionRequest struct, remove unused lucide-react imports (Download, FileText, Switch, Save), and add missing useUpdateSessionMcpServers to test mock. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Two additional test files (mcp-servers-panel.test.tsx, session-header.test.tsx) also mock @/services/queries/use-mcp but were missing the new export. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@ambient-code can you verify all edge cases are handled, that this works end to end. i want a comment with your findings walking me through how this feature works |
End-to-End Review: Custom MCP Server Configuration (#1249)I reviewed every layer of this feature — CRDs, backend, operator, runner, and frontend. Here's a walkthrough of how it works and what I found. How the feature works end-to-end1. CRD Schema (data model)
Fully backward-compatible — existing CRs without 2. Backend API (CRUD)
3. Operator (env var injection)
4. Runner (merge logic)
5. Frontend UI
Edge cases verified
Items worth noting (not blockers)Medium:
Low:
Test coverage
VerdictThe feature is well-structured across all layers with correct merge semantics, proper auth, and good UI/UX. The edge cases that matter for correctness are all handled. The items noted above are improvements to consider in follow-ups, not blockers for merge. |
Merge Queue Status
This pull request spent 17 seconds in the queue, including 3 seconds running CI. Required conditions to merge
|
Summary
mcpServersfield to AgenticSession and ProjectSettings CRDs for custom server config (custom servers map + disabled list)mcpServersin create/update session requests, allows MCP-only updates on running sessions (persisted for next restart)GET/PUT /projects/:name/mcp-serversfor project-level MCP defaultsCUSTOM_MCP_SERVERSandPROJECT_MCP_SERVERSenv varsmax-w-5xlwith MCP management UI: add custom servers, disable/enable defaults, remove custom serversTest plan
kubectl apply -f components/manifests/base/crds/)mcpServersin the request bodycontext7) and verify it's excluded on next restartcd components/runners/ambient-runner && python -m pytest tests/test_mcp_config.py -vcd components/frontend && npx vitest runCloses #1249
🤖 Ambient Session