pub struct BackendConfig {Show 29 fields
pub name: String,
pub transport: TransportType,
pub command: Option<String>,
pub args: Vec<String>,
pub url: Option<String>,
pub env: HashMap<String, String>,
pub timeout: Option<TimeoutConfig>,
pub circuit_breaker: Option<CircuitBreakerConfig>,
pub rate_limit: Option<RateLimitConfig>,
pub concurrency: Option<ConcurrencyConfig>,
pub retry: Option<RetryConfig>,
pub outlier_detection: Option<OutlierDetectionConfig>,
pub hedging: Option<HedgingConfig>,
pub mirror_of: Option<String>,
pub mirror_percent: u32,
pub cache: Option<BackendCacheConfig>,
pub bearer_token: Option<String>,
pub forward_auth: bool,
pub aliases: Vec<AliasConfig>,
pub default_args: Map<String, Value>,
pub inject_args: Vec<InjectArgsConfig>,
pub expose_tools: Vec<String>,
pub hide_tools: Vec<String>,
pub expose_resources: Vec<String>,
pub hide_resources: Vec<String>,
pub expose_prompts: Vec<String>,
pub hide_prompts: Vec<String>,
pub canary_of: Option<String>,
pub weight: u32,
}Expand description
Configuration for a single backend MCP server.
Fields§
§name: StringUnique backend name, used as the namespace prefix for its tools/resources.
transport: TransportTypeTransport protocol to use when connecting to this backend.
command: Option<String>Command for stdio backends
args: Vec<String>Arguments for stdio backends
url: Option<String>URL for HTTP backends
env: HashMap<String, String>Environment variables for subprocess backends
timeout: Option<TimeoutConfig>Per-backend timeout
circuit_breaker: Option<CircuitBreakerConfig>Per-backend circuit breaker
rate_limit: Option<RateLimitConfig>Per-backend rate limit
concurrency: Option<ConcurrencyConfig>Per-backend concurrency limit
retry: Option<RetryConfig>Per-backend retry policy
outlier_detection: Option<OutlierDetectionConfig>Per-backend outlier detection (passive health checks)
hedging: Option<HedgingConfig>Per-backend request hedging (parallel redundant requests)
mirror_of: Option<String>Mirror traffic from another backend (fire-and-forget). Set to the name of the source backend to mirror.
mirror_percent: u32Percentage of requests to mirror (1-100, default: 100).
cache: Option<BackendCacheConfig>Per-backend cache policy
bearer_token: Option<String>Static bearer token for authenticating to this backend (HTTP only).
Supports ${ENV_VAR} syntax for env var resolution.
forward_auth: boolForward the client’s inbound auth token to this backend. Only works with HTTP backends when the proxy has auth enabled.
aliases: Vec<AliasConfig>Tool aliases: rename tools exposed by this backend
default_args: Map<String, Value>Default arguments injected into all tool calls for this backend. Merged into tool call arguments (does not overwrite existing keys).
inject_args: Vec<InjectArgsConfig>Per-tool argument injection rules.
expose_tools: Vec<String>Capability filtering: only expose these tools (allowlist)
hide_tools: Vec<String>Capability filtering: hide these tools (denylist)
expose_resources: Vec<String>Capability filtering: only expose these resources (allowlist, by URI)
hide_resources: Vec<String>Capability filtering: hide these resources (denylist, by URI)
expose_prompts: Vec<String>Capability filtering: only expose these prompts (allowlist)
hide_prompts: Vec<String>Capability filtering: hide these prompts (denylist)
canary_of: Option<String>Canary routing: name of the primary backend this is a canary for. When set, this backend’s tools are hidden and requests targeting the primary are probabilistically routed here based on weight.
weight: u32Routing weight for canary deployments (default: 100). Higher values receive proportionally more traffic.
Implementations§
Source§impl BackendConfig
impl BackendConfig
Sourcepub fn build_filter(&self, separator: &str) -> Option<BackendFilter>
pub fn build_filter(&self, separator: &str) -> Option<BackendFilter>
Build a BackendFilter from this backend’s expose/hide lists.
Returns None if no filtering is configured.
Canary backends automatically hide all capabilities so their tools
don’t appear in ListTools responses (traffic reaches them via the
canary routing middleware, not direct tool calls).