Expand description
Programmatic proxy builder for library users.
Constructs a ProxyConfig via a fluent API, avoiding the need for
TOML files. The resulting config is passed to Proxy::from_config()
as usual.
§Example
use mcp_proxy::builder::ProxyBuilder;
let proxy = ProxyBuilder::new("my-proxy")
.version("1.0.0")
.listen("0.0.0.0", 9090)
.stdio_backend("files", "npx", &["-y", "@modelcontextprotocol/server-filesystem"])
.http_backend("api", "http://api:8080")
.build()
.await?;
// Embed in an existing axum app
let (router, _session_handle) = proxy.into_router();Structs§
- Proxy
Builder - Fluent builder for constructing an MCP proxy without TOML config files.