Skip to content

Commit a70a090

Browse files
committed
Align Fly agents with Project-owned MCP connections
Co-authored-by: Annedaynl <info@anneday.nl> Signed-off-by: Annedaynl <info@anneday.nl>
1 parent a2f4ddb commit a70a090

23 files changed

Lines changed: 372 additions & 1390 deletions

File tree

Dockerfile.fly-agent

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# syntax=docker/dockerfile:1.7
2-
# Buzz cloud-agent image: the pinned Sprig runtime plus a pinned bridge for
3-
# remote Streamable HTTP/SSE MCP servers.
2+
# Buzz cloud-agent image: the pinned Sprig runtime used by isolated Fly agents.
43
FROM rust:1.95-alpine3.22@sha256:064dfc925d68d1a63f4fd2871bd7dc6e6ea56692989a487185855d62885d90aa AS builder
54

65
RUN apk add --no-cache \
@@ -20,12 +19,7 @@ RUN cargo build --locked --profile sprig -p sprig \
2019

2120
FROM alpine:3.22@sha256:14358309a308569c32bdc37e2e0e9694be33a9d99e68afb0f5ff33cc1f695dce
2221

23-
# mcp-remote is pinned: cloud agents must not execute the newest npm package
24-
# merely because a Machine restarted. Update this version through the normal
25-
# image review and rollout path.
26-
RUN apk add --no-cache bash ca-certificates curl git nodejs npm su-exec \
27-
&& npm install --global --ignore-scripts mcp-remote@0.1.38 \
28-
&& npm cache clean --force \
22+
RUN apk add --no-cache bash ca-certificates curl git su-exec \
2923
&& adduser -D -h /home/agent agent \
3024
&& install -d -o agent -g agent /workspace /home/agent \
3125
&& git config --system gpg.format x509 \
@@ -43,7 +37,6 @@ RUN for name in \
4337
done
4438

4539
ENV HOME=/home/agent \
46-
MCP_REMOTE_CONFIG_DIR=/home/agent/.mcp-auth \
4740
PATH=/usr/local/bin:/usr/local/sbin:/usr/sbin:/usr/bin:/sbin:/bin
4841
WORKDIR /home/agent
4942
ENTRYPOINT ["/usr/local/bin/fly-agent-entrypoint"]

crates/buzz-acp/README.md

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ All configuration is via environment variables (or CLI flags — every env var h
111111
| `BUZZ_ACP_AGENT_COMMAND` | no | `goose` | Agent binary to spawn. |
112112
| `BUZZ_ACP_AGENT_ARGS` | no | `acp` | Agent arguments (comma-separated). |
113113
| `BUZZ_ACP_MCP_COMMAND` | no | `""` (empty) | Path to an optional MCP server binary to provide to the agent subprocess. |
114-
| `BUZZ_ACP_MCP_SERVERS` | no || JSON array of additional stdio MCP servers. Supports `name`, `command`, `args`, literal `env`, `inherit_env` names resolved from the harness environment, and optional exact `allowed_tools`. Maximum 16 total including `BUZZ_ACP_MCP_COMMAND`. |
115114
| `BUZZ_ACP_IDLE_TIMEOUT` | no | `620` | Idle timeout: max seconds of silence before cancelling a turn. Resets on any agent stdout activity. |
116115
| `BUZZ_ACP_MAX_TURN_DURATION` | no | `7200` | Absolute wall-clock cap per turn (safety valve). |
117116
| `BUZZ_API_TOKEN` | no || API token (required if relay enforces token auth). |
@@ -120,42 +119,6 @@ All configuration is via environment variables (or CLI flags — every env var h
120119

121120
**Legacy env vars:** `BUZZ_ACP_PRIVATE_KEY`, `BUZZ_ACP_API_TOKEN`, and `BUZZ_ACP_TURN_TIMEOUT` (replaced by `BUZZ_ACP_IDLE_TIMEOUT`) are still accepted as fallbacks.
122121

123-
### Additional MCP servers
124-
125-
`BUZZ_ACP_MCP_SERVERS` lets one agent attach multiple account-scoped MCP
126-
servers without rebuilding `buzz-acp`. Keep credential values in the process
127-
environment and name them through `inherit_env`; the harness resolves those
128-
values only when it starts the corresponding child process.
129-
130-
```bash
131-
export CRM_AUTH_HEADER='Bearer account-specific-token'
132-
export BUZZ_ACP_MCP_SERVERS='[
133-
{
134-
"name": "crm",
135-
"command": "mcp-remote",
136-
"args": [
137-
"https://crm.example/mcp",
138-
"--header", "Authorization:${CRM_AUTH_HEADER}",
139-
"--transport", "http-only"
140-
],
141-
"inherit_env": ["CRM_AUTH_HEADER"],
142-
"allowed_tools": ["search_contacts", "create_note"]
143-
},
144-
{
145-
"name": "local_reporting",
146-
"command": "/opt/mcp/reporting-server",
147-
"args": ["--read-only"]
148-
}
149-
]'
150-
```
151-
152-
The server command must already exist in the agent image or host. Remote HTTP
153-
connections therefore use a pinned proxy such as `mcp-remote` only when that
154-
proxy is part of the trusted image; avoid pulling an unpinned package at agent
155-
startup. When `allowed_tools` is non-empty, Buzz Agent exposes only those exact
156-
bare tool names from that server. Omitting it preserves the ACP default of
157-
exposing every server tool.
158-
159122
### Parallel Agents & Heartbeat
160123

161124
| Flag | Env Var | Default | Description |

crates/buzz-acp/src/acp.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,6 @@ pub struct McpServer {
3030
pub command: String,
3131
pub args: Vec<String>,
3232
pub env: Vec<EnvVar>,
33-
/// Buzz extension: exact bare tool names this server may expose. Empty
34-
/// preserves the ACP default of exposing every server tool.
35-
#[serde(rename = "allowedTools", skip_serializing_if = "Vec::is_empty")]
36-
pub allowed_tools: Vec<String>,
3733
}
3834

3935
/// A single environment variable for an MCP server.
@@ -2446,7 +2442,6 @@ mod tests {
24462442
value: "nsec1abc".into(),
24472443
},
24482444
],
2449-
allowed_tools: vec![],
24502445
};
24512446
let serialized = serde_json::to_value(&server).unwrap();
24522447
assert_eq!(serialized["name"].as_str(), Some("test-mcp"));

0 commit comments

Comments
 (0)