fabro/docs/public/agents
Fabian Kukuck 990324710c
Add legacy SSE MCP transport support (#386)
## 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>
2026-05-24 15:29:01 -04:00
..
hooks.mdx refactor(docs): split docs/ into public/ and internal/ 2026-04-27 07:21:13 -07:00
mcp.mdx Add legacy SSE MCP transport support (#386) 2026-05-24 15:29:01 -04:00
outputs.mdx Add output_schema validation with same-context repair for agent and pro… (#374) 2026-05-23 19:45:16 -04:00
permissions.mdx refactor(docs): split docs/ into public/ and internal/ 2026-04-27 07:21:13 -07:00
prompts.mdx docs: sync public docs to recent changes 2026-05-18 14:42:54 -04:00
skills.mdx refactor(docs): split docs/ into public/ and internal/ 2026-04-27 07:21:13 -07:00
subagents.mdx feat(workflow): enforce strict api/acp backends (#307) 2026-05-18 13:20:56 -04:00
tools.mdx docs: sync agent tools and model reference 2026-05-24 12:00:48 -04:00