MCP Config • Rust AI Agent SDK
MCPConfig: Configuration for MCP client.
MCPConfig
Defined in the MCP module.
Rust AI Agent SDK
Configuration for MCP client.
Fields
| Name | Type | Description |
|---|---|---|
name | String | Server name |
transport | TransportConfig | Transport configuration |
security | SecurityConfig | Security configuration |
auto_reconnect | bool | Auto-reconnect on disconnect |
max_reconnect_attempts | u32 | Maximum reconnect attempts |
debug | bool | Enable debug logging |
Methods
new
fn new(name: impl Into<String>) -> SelfCreate a new MCPConfig
Parameters:
| Name | Type |
|---|---|
name | impl Into<String> |
transport
fn transport(mut self, transport: TransportConfig) -> SelfSet transport
Parameters:
| Name | Type |
|---|---|
transport | TransportConfig |
security
fn security(mut self, security: SecurityConfig) -> SelfSet security
Parameters:
| Name | Type |
|---|---|
security | SecurityConfig |
debug
fn debug(mut self, debug: bool) -> SelfEnable debug mode
Parameters:
| Name | Type |
|---|---|
debug | bool |
Source
View on GitHubpraisonai/src/mcp/mod.rs at line 201