Repository navigation
Description
Problem or Motivation
There is no manifest for an MCP server. k8s/ and tf/ hold none, and the service image holds only git, gh, Node and openspec, so most MCP tools would fail in it (kubectl, helm, the scanners and bubblewrap are not there). The issue feat(mcp): serve role-scoped tool sets over authenticated HTTP adds the server side: role-scoped tool sets, streamable HTTP and token authentication. A cluster deployment has to be made so that the jobs can reach it, and so that nothing else can.
Proposed Solution & Architectural Design
- Add
k8s/devops/mcp-server/next tok8s/devops/roadmap-service/: a Deployment, a Service, a ServiceAccount, a Role with the least rights the enabled tools need, and a NetworkPolicy. The NetworkPolicy allows ingress only from the pods of the roadmap runner Jobs and the roadmap Service (label selectors), and the egress it needs. It is the control that stops other pods in the cluster from calling the server. - Add an image target for the server with the tools of the enabled roles (
kubectl,helmand the scanners, pinned and scanned like the runner image, see the Dockerfilerunnertarget). It is a new target, so the roadmapserviceimage stays small. - Read-only roles first. The
opsrole, with the mutating tools, is off by default and has its own switch in the config. - Settings and an admission policy: the server pod runs non-root with a read-only root filesystem, like the roadmap Service, and the Role is checked by a test the way
role.yamlis. - Add the telemetry the other Services have (
OTEL_SERVICE_NAME), and an alert for the server being down. - Document the rollout order in
k8s/README.md: the server first, then the jobs that call it. A job that calls a server that is not up must fail with a clear class (see the failure taxonomy of feat(roadmap): a failure taxonomy, and one action for each class #3065) and not hang.
Open questions for the refine step: one replica or more (SSE sessions are stateful; streamable HTTP can be stateless); the cost in image size of the scanners; and whether kubectl-based tools should run with the server's ServiceAccount or with a per-call identity.
Target Subsystem
k8s/devops/mcp-server/, Dockerfile, .github/workflows/ (the image build and scan), k8s/README.md.
Existing Tool Considered
The roadmap Service manifests in k8s/devops/roadmap-service/ are the pattern to copy (Deployment, NetworkPolicy, Role, admission policy). No other project in the cluster serves MCP. Cost to build: about 150k tokens and 8 hours, plus the cluster checks that need kubectl, which this sandbox lacks. A person has to apply the manifests.
Related: feat(mcp): serve role-scoped tool sets over authenticated HTTP, and the issue for the MCP client in the jobs.
Alternatives check of 2026-11-05: partly.
Tool: stacklok/toolhive (https://github.com/stacklok/toolhive), Apache-2.0, last activity 2026-11-04, maintained.
Proposed design
Problem statement
The repository has no image target for the MCP server, so a deployment cannot run the pinned scanners, kubectl or helm. The live Deployment also waits on the MCP server entrypoint from the related issue. This change adds the mcp-server image target and its gate. It defers the live manifest set until the MCP server implementation lands.
Acceptance criteria
Requirement: MCP server image target
The Dockerfile SHALL add an mcp-server target that inherits the runner stage.
Scenario: Target inherits runner
- WHEN A test parses the stages of the
Dockerfile. - THEN The stage
mcp-serverexists and itsFROMline namesrunner.
Requirement: Pinned cluster tools
The mcp-server target SHALL install kubectl and helm at the versions that tools.lock pins.
Scenario: Tool pins match
- WHEN The image build runs the tool version check.
- THEN Each installed version equals its pin, and a mismatch fails the build and names the tool.
Requirement: Runtime user and directories
The mcp-server target SHALL run as user 1000:1000 and SHALL keep the data and uv cache directories under HOME.
Scenario: Runtime user is non-root
- WHEN A test reads the
USERandENVlines of themcp-serverstage. - THEN
USERis1000:1000andDEVOPS_CLI_DATA_DIRandUV_CACHE_DIRstart withHOME.
Requirement: MCP server image gate
The mcp-server image SHALL pass the HIGH and CRITICAL vulnerability scan and SHALL stay at or below 3,000,000,000 bytes.
Scenario: Image gate passes
- WHEN CI builds the
mcp-serverimage. - THEN
trivy imageexits 0 anddocker image inspectreports at most 3,000,000,000 bytes.
Requirement: Default Docker build stays on service
The service stage SHALL stay the last stage of the Dockerfile.
Scenario: Service stage is last
- WHEN A test lists the stages of the
Dockerfile. - THEN The last stage is
serviceandmcp-servercomes before it.
Existing Tool Considered
ToolHive (https://github.com/stacklok/toolhive, Apache-2.0, maintained) partly covers the deployment. It deploys an MCP server from an MCPServer resource, creates a ServiceAccount and RoleBinding, customises the pod template and documents NetworkPolicy restrictions. It lacks the project image target, the plain kustomize manifest set of Deployment, Service, ServiceAccount, Role and NetworkPolicy, the label-selector ingress restriction to devops-cli-job and roadmap-service pods, OTEL_SERVICE_NAME, the McpServerDown alert, the k8s/README.md rollout order and failure class, and it runs a proxy pod per server. Cost to build the image target and the deferred plain manifests: about 150k tokens and 8 hours, plus cluster checks that need kubectl; a person applies the manifests.
Key questions
- Does the repository hold an MCP server manifest set or image target at the staging commit?: No.
k8s/README.mdlists nomcp-serverdirectory, and theDockerfilehas nomcp-servertarget. The related MCP server issue supplies the entrypoint. [sources: k8s/README.md] - Which parts can this change deliver while the MCP server entrypoint is absent?: Add the image target and its gate in this change. Defer the live manifest set, the NetworkPolicy, the Role, the telemetry, the alert and the rollout documentation to a new issue. The new issue waits on the MCP server entrypoint. (best practice) [sources: k8s/README.md, tests/invariants/test_runner_image.py]
- Chosen: Image target only. The target builds and passes its gate without a server entrypoint.
- Rejected: Whole deployment now. The Deployment would start a container with no server process.
- Rejected: Manifests with a placeholder command. Static tests would pass, but the pod would crash and the gate would hide the missing entrypoint.
- Which tools go into the MCP server image?: Inherit the
runnerstage and addkubectlandhelmat the pins intools.lock. Therunnerstage already holds the pinned scanners and dev tools, so the image reuses them and stays under the 3,000,000,000-byte gate. (best practice) [sources: k8s/README.md, tests/invariants/test_runner_image.py]- Chosen: Inherit runner and add kubectl and helm. This reuses the pinned scanners and keeps one set of tool pins.
- Rejected: Start from builder and install each scanner. This duplicates the scanner pins and the build logic.
- Rejected: Start from the service image. The service image stays small and lacks the scanners.
- Should this change use ToolHive for the MCP server image or deployment?: Use the project image target for this change. ToolHive partly covers the deployment, but it has no image target and runs a proxy pod. The deferred manifest issue keeps the plain kustomize manifest set because ToolHive lacks the tested plain manifest set and project telemetry. (best practice) [sources: k8s/README.md]
- Chosen: Project image target and plain manifests. This keeps the project image, the tested manifest set, the telemetry and the alert.
- Rejected: ToolHive operator. It adds an operator and a CRD, and it does not produce the plain manifest set that the tests read.
- Rejected: ToolHive proxy only. It runs a proxy pod and does not carry the project scanners or telemetry.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
devops-cli-service commentedon Nov 2, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
featprefix of the title gives the type.(k8s)scope of the title gives the scope.It is a required dependency for the MCP server to be reachable by jobs, but it is not a security fix or a blocking defect.It makes the MCP server reachable by roadmap jobs and restricts access to authorised pods only.The body estimates about 8 hours of work plus cluster checks, covering manifests, a Dockerfile target, and docs.Both deploy a service in the devops namespace, but #1083 deploys the roadmap service while this item deploys the MCP server.feat(mcp): serve role-scoped tools over streamable HTTP (#3233)
devops-cli-service commentedon Nov 2, 2026
Status set to Ready at 4571d5f (see proposed design in issue body).
devops-cli-service commentedon Nov 2, 2026
The stage job returned the item to New. The premise of the issue does not hold at the staging commit, so the job planned no change and opened no pull request.
Evidence:
Placeholder
devops-cli-service commentedon Nov 5, 2026
Alternatives check: partly
Tool: stacklok/toolhive (https://github.com/stacklok/toolhive)
Covers:
Lacks:
Searches run:
Sources:
Checked on 2026-11-05. A person decides what this means for the item. The check changes no label and closes no issue.
devops-cli-service commentedon Nov 5, 2026
Status set to Ready at d254410 (see proposed design in issue body).
Moved to new items: #3600.
feat(k8s): deploy the MCP server for the roadmap jobs (#3220)
feat(k8s): deploy the MCP server for the roadmap jobs (#3220)
devops-cli-service commentedon Nov 8, 2026
Released in v0.95.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.95.0
devops-cli-service commentedon Nov 8, 2026
Live since 2026-11-08 22:36 UTC