mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-09-15 23:32:46 +00:00
## Summary Adds support for MCP servers that use the SSE-based HTTP transport, including Playwright MCP. Fabro already supports stdio and Streamable HTTP MCP servers. Some MCP servers still expose the SSE transport shape where the client opens an SSE stream, receives an `endpoint` event, and sends JSON-RPC requests back to that endpoint. This PR adds an explicit `protocol = "sse"` option while keeping Streamable HTTP as the default. ## What Changed - Added `McpHttpProtocol` with `streamable_http` as the default and `sse` as an opt-in protocol. - Added an SSE MCP client transport implementation. - Wired HTTP MCP setup to choose Streamable HTTP or SSE based on config. - Added `protocol = "sse"` support for both `http` and `sandbox` MCP entries. - Updated sandbox MCP resolution so SSE sandbox servers connect through the preview `/sse` path. - Documented `protocol = "sse"` for Playwright MCP. - Added an integration test covering SSE initialize, tool listing, and tool calls. ## Example ```toml [run.agent.mcps.playwright] type = "sandbox" protocol = "sse" command = ["npx", "@playwright/mcp@latest", "--port", "3100", "--headless", "--browser", "chromium"] port = 3100 startup_timeout = "60s" tool_timeout = "2m" ``` ## Compatibility Existing MCP configs are unchanged because `protocol` defaults to `streamable_http`. ## Validation - `cargo +nightly-2026-04-14 fmt --check --all` - `cargo nextest run -p fabro-mcp` - `cargo check -p fabro-agent -p fabro-workflow -p fabro-config` --------- Co-authored-by: Bryan Helmkamp <bryan@brynary.com> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| crates | ||
| packages/fabro-api-client | ||