Sessions get the MCP servers the city configures #5

Merged
mikluko merged 3 commits from feat/mcp-servers into main 2026-11-17 15:07:49 +00:00
Owner

Based on #4 (feat/claude-otel), itself based on #3; neither is merged. Retarget to main as they merge.

New [[mcp_servers]] list: name (unique), transport (http or sse), url, optional agents (limit to those agents; default all), and [[mcp_servers.headers]] entries with name and exactly one of file (path in the pod) or env (variable of the host's environment); there is no inline value key. The Job puts the agent's servers in AKEPHALOS_MCP_SERVERS (paths and variable names only). The host reads the values and adds the servers to ACP session/new, session/resume and session/load; claudeacp turns them into Claude's --mcp-config. A transport the agent does not offer is skipped with a log line. A header with an unreadable file or empty value ends the host before the agent starts, naming server and header.

The city must provide: [[mcp_servers]] in akephalos.toml; for a secret header, a Secret mounted through [kube].secrets or [agents.<name>].secrets (mount_path is the header's file, or the Secret's env names the variable the header's env reads). Note: claudeacp passes the resolved header values to Claude on its command line inside the pod.

Tests: a session with one HTTP server has it in Claude's --mcp-config with the header read from a file; a resumed session too; none configured means no --mcp-config; failing header; Job env per agent; config validation (inline values are rejected as unknown keys).

Based on #4 (`feat/claude-otel`), itself based on #3; neither is merged. Retarget to main as they merge. New `[[mcp_servers]]` list: `name` (unique), `transport` (`http` or `sse`), `url`, optional `agents` (limit to those agents; default all), and `[[mcp_servers.headers]]` entries with `name` and exactly one of `file` (path in the pod) or `env` (variable of the host's environment); there is no inline value key. The Job puts the agent's servers in `AKEPHALOS_MCP_SERVERS` (paths and variable names only). The host reads the values and adds the servers to ACP `session/new`, `session/resume` and `session/load`; claudeacp turns them into Claude's `--mcp-config`. A transport the agent does not offer is skipped with a log line. A header with an unreadable file or empty value ends the host before the agent starts, naming server and header. **The city must provide:** `[[mcp_servers]]` in akephalos.toml; for a secret header, a Secret mounted through `[kube].secrets` or `[agents.<name>].secrets` (`mount_path` is the header's `file`, or the Secret's `env` names the variable the header's `env` reads). Note: claudeacp passes the resolved header values to Claude on its command line inside the pod. Tests: a session with one HTTP server has it in Claude's `--mcp-config` with the header read from a file; a resumed session too; none configured means no `--mcp-config`; failing header; Job env per agent; config validation (inline values are rejected as unknown keys).
Sessions get the MCP servers the city configures
All checks were successful
test / changelog (pull_request) Successful in 4s
image / image (pull_request) Successful in 15s
test / go (pull_request) Successful in 45s
fa83289dec
[[mcp_servers]] lists servers by name, transport (http or sse), URL and
headers whose values are read from files or environment variables at the
host. The Job hands the pod the servers of its agent, and the host adds them
to session/new, session/resume and session/load.

Assisted-By: Claude <noreply@anthropic.com>
mikluko force-pushed feat/mcp-servers from fa83289dec
All checks were successful
test / changelog (pull_request) Successful in 4s
image / image (pull_request) Successful in 15s
test / go (pull_request) Successful in 45s
to d6100fe93b
All checks were successful
test / changelog (pull_request) Successful in 6s
image / image (pull_request) Successful in 19s
test / go (pull_request) Successful in 1m6s
2026-11-17 15:02:46 +00:00
Compare
CHANGELOG: state the MCP header handling without a contrast
Some checks failed
image / image (pull_request) Successful in 4s
test / changelog (pull_request) Successful in 5s
test / go (pull_request) Has been cancelled
dd4ef1e73d
Assisted-By: Claude <noreply@anthropic.com>
mikluko force-pushed feat/mcp-servers from dd4ef1e73d
Some checks failed
image / image (pull_request) Successful in 4s
test / changelog (pull_request) Successful in 5s
test / go (pull_request) Has been cancelled
to 3de26059e3
Some checks failed
image / image (pull_request) Successful in 4s
test / changelog (pull_request) Failing after 4s
test / go (pull_request) Has been cancelled
2026-11-17 15:05:46 +00:00
Compare
mikluko changed target branch from feat/claude-otel to main 2026-11-17 15:05:50 +00:00
mikluko force-pushed feat/mcp-servers from 3de26059e3
Some checks failed
image / image (pull_request) Successful in 4s
test / changelog (pull_request) Failing after 4s
test / go (pull_request) Has been cancelled
to ea63b8cb09
All checks were successful
image / image (pull_request) Successful in 4s
test / changelog (pull_request) Successful in 5s
test / go (pull_request) Successful in 59s
2026-11-17 15:06:14 +00:00
Compare
mikluko deleted branch feat/mcp-servers 2026-11-17 15:07:50 +00:00
Commenting is not possible because the repository is archived.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
mikluko/gascity-ak6s-pack!5
No description provided.