Skip to content

Pass an MCP server's secret-backed headers and env vars to the pod - #70

Merged
gedaiu merged 1 commit into
mainfrom
mcp-headers-env
Nov 10, 2026
Merged

gedaiu merged 1 commit into
mainfrom
mcp-headers-env

Conversation

@gedaiu

@gedaiu gedaiu commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

An agent definition's mcp_servers could only name one secret, headers_secret, sent as the Authorization header. The subsystem (v0.15.0, already vendored here) also reads headers for http and sse servers and env for stdio servers, each a list of {name, ref} valued from agent-secrets. The config schema silently dropped both on put.

The schema now accepts them and refuses an entry without a ref. They travel in the brief's settings to the cluster agent, which already spreads a server's fields into the AgentDefinition. ExecutorSettings in the API was a copy of the contracts type and is now imported from there.

Lore's agent edit form will offer these fields next; it needs this deployed first, because Lore reads a definition back after every put and fails when a field was dropped.

🤖 Generated with Claude Code

A definition's mcp_servers kept only headers_secret, so a server that
wants X-API-Key, several headers, or a token in a stdio process's
environment could not be declared: the put dropped the fields. The
config schema now takes headers and env as {name, ref} lists, and the
brief carries them to the cluster agent, which hands them to the
subsystem (v0.15.0 reads both).
@lore-agent

lore-agent Bot commented Nov 10, 2026

Copy link
Copy Markdown

Lore is reviewing this PR — 02eee7f2-daac-40f0-91d0-5ecd6a341534.

Submit a review that requests changes to have Lore push a fix for it. Comment @lore review to re-run the review.

@lore-agent lore-agent Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lore review — Approved

Clean passthrough and validation of MCP server secret-backed headers and env vars across contracts, API config schema, cluster-agent recipe builder, and entity docs.

Must fix (0) · Consider (0) · Nits (0)

Reviewed by gemini-4-argon

Submit a review that requests changes to have Lore push a fix for it. Comment @lore review to re-run the review.

Posted by floor, visit 719cc6f9-212c-4057-ab03-d101a073c79a.

@gedaiu
gedaiu merged commit 874a8e4 into main Nov 10, 2026
16 checks passed
@gedaiu
gedaiu deleted the mcp-headers-env branch November 10, 2026 11:08
gedaiu added a commit to re-cinq/lore that referenced this pull request Nov 10, 2026
The agent edit page had no way to give an agent an MCP server;
`config.mcp_servers` could only be set in the shipped md file. The org
page (`/agents/edit/<name>`) and a repo's agent form now have an MCP
servers section. Each server is a card of input fields: name, transport,
a URL with an optional Authorization secret for http and sse, or a
command with arguments for stdio, plus any number of headers (env vars
for stdio) that each name a key of the cluster's `agent-secrets`.

The API takes `mcp_servers` on create and update the same way it takes
`pod_resources`: a list replaces the stored one, null removes it, an
absent key keeps it. The form only submits the field once a row changed,
so a save that never touched the servers leaves the floor's list alone
and a repo's page does not copy the org default's servers into its
variant. `PodResourcesWrite` became `ConfigWrite`, since it now carries
two config keys. A refused write shows its first validation issue on the
form.

`headers` and `env` need re-cinq/floor#70 deployed: until then the floor
drops those two fields and Lore's read-back check fails the save.
Servers that use only a URL, a command or `headers_secret` work on
today's floor.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
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