Skip to content

Commit ddce720

Browse files
feat(acp): support remote HTTP MCP servers
Signed-off-by: custard-pirate <[email protected]>
1 parent 780561c commit ddce720

8 files changed

Lines changed: 868 additions & 109 deletions

File tree

‎Cargo.lock‎

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎crates/buzz-acp/Cargo.toml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ tokio-tungstenite = { workspace = true }
3434
tokio-util = { workspace = true }
3535
rustls = { version = "0.23", default-features = false, features = ["ring", "std"] }
3636
futures-util = { workspace = true }
37+
aho-corasick = "1.1"
3738

3839
# HTTP (channel discovery REST API)
3940
reqwest = { workspace = true }
@@ -61,6 +62,7 @@ tracing-subscriber = { workspace = true }
6162
# Error handling
6263
thiserror = { workspace = true }
6364
anyhow = { workspace = true }
65+
zeroize = { workspace = true }
6466

6567
# CLI
6668
clap = { version = "4", features = ["derive", "env"] }

‎crates/buzz-acp/README.md‎

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ 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_CONFIG` | no | `""` (empty) | Path to a version 1 JSON file defining additional stdio MCP servers. |
114+
| `BUZZ_ACP_MCP_CONFIG` | no | `""` (empty) | Path to a version 1 JSON file defining additional stdio and Streamable HTTP MCP servers. |
115115
| `BUZZ_ACP_IDLE_TIMEOUT` | no | `620` | Idle timeout: max seconds of silence before cancelling a turn. Resets on any agent stdout activity. |
116116
| `BUZZ_ACP_MAX_TURN_DURATION` | no | `7200` | Absolute wall-clock cap per turn (safety valve). |
117117
| `BUZZ_API_TOKEN` | no | — | API token (required if relay enforces token auth). |
@@ -122,8 +122,8 @@ All configuration is via environment variables (or CLI flags — every env var h
122122

123123
### Multiple MCP servers
124124

125-
Use `--mcp-config <absolute-path>` or `BUZZ_ACP_MCP_CONFIG` to add named stdio
126-
MCP servers:
125+
Use `--mcp-config <absolute-path>` or `BUZZ_ACP_MCP_CONFIG` to add named local
126+
and remote MCP servers:
127127

128128
```json
129129
{
@@ -137,6 +137,19 @@ MCP servers:
137137
"env": {
138138
"ANALYTICS_TOKEN": "replace-me"
139139
}
140+
},
141+
{
142+
"name": "hosted-context",
143+
"transport": "http",
144+
"url": "https://mcp.example.test/mcp",
145+
"headers": [
146+
{
147+
"name": "Authorization",
148+
"env_file": "/run/secrets/hosted-context.env",
149+
"env_name": "MCP_TOKEN",
150+
"value_prefix": "Bearer "
151+
}
152+
]
140153
}
141154
]
142155
}
@@ -148,9 +161,13 @@ loaded by `buzz-acp` automatically; a launcher must resolve and approve them
148161
before writing this document.
149162

150163
The JSON is strict. The only top-level fields are `version` and `servers`.
151-
Each server has `name`, `transport`, `command`, `args`, and `env`. Version 1
152-
supports the `stdio` transport. Server names must be unique, contain 1 to 128
153-
ASCII bytes using only letters, digits, `_`, or `-`, and cannot contain `__`.
164+
Each server has a `name` and tagged `transport`. A `stdio` entry contains
165+
`command`, `args`, and `env`; an `http` entry contains a URL and optional
166+
headers. URLs and header values can be literal, loaded from protected files,
167+
or selected by name from protected environment files. Public endpoints require
168+
HTTPS; plain HTTP is limited to literal private IP addresses. Server names must
169+
be unique, contain 1 to 128 ASCII bytes using only letters, digits, `_`, or `-`,
170+
and cannot contain `__`.
154171
Names are checked across both structured entries and the legacy server.
155172

156173
The config file is limited to 64 KiB. A harness can have at most 16 MCP

0 commit comments

Comments
 (0)