-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Labels
actor/keloskelos/needs-inputkind/apiCategorizes issue or PR as related to API changesCategorizes issue or PR as related to API changeskind/featureCategorizes issue or PR as related to a new featureCategorizes issue or PR as related to a new featurepriority/important-soontriage-accepted
Description
Context
PR #304 added MCP server support to AgentConfig. The MCPServerSpec.Headers and MCPServerSpec.Env fields currently accept inline string values, which means auth tokens and other sensitive data are stored in plaintext in etcd and visible in the pod spec.
Raised by @gjkim42 in https://github.com/axon-core/axon/pull/304#discussion_r2804922408.
Proposal
Add an optional headersFrom field (and potentially envFrom) to MCPServerSpec that references a Kubernetes Secret:
mcpServers:
- name: github
type: http
url: https://api.githubcopilot.com/mcp/
headersFrom:
secretRef:
name: mcp-github-headersWhere the Secret data keys are header names and values are header values.
Implementation considerations
- The controller needs RBAC to read Secrets in the task namespace
- Secret resolution must happen in the controller (e.g., in
createJob) beforebuildMCPServersJSONis called — similar to the GitHub App token resolution pattern - Inline
headersandheadersFromvalues should be merged, withheadersFromtaking precedence for overlapping keys - The final JSON still ends up as a plain env var value in the pod spec (
AXON_MCP_SERVERS), so pod-level exposure doesn't fully change. A more complete solution would mount the secret as a file, but that requires entrypoint changes - Error handling for missing/invalid secrets is needed
- The existing
SecretReferencetype can be reused
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
actor/keloskelos/needs-inputkind/apiCategorizes issue or PR as related to API changesCategorizes issue or PR as related to API changeskind/featureCategorizes issue or PR as related to a new featureCategorizes issue or PR as related to a new featurepriority/important-soontriage-accepted