Documentation Index
Fetch the complete documentation index at: https://docs.praison.ai/llms.txt
Use this file to discover all available pages before exploring further.
TransportConfig
Defined in the MCP module.
Rust AI Agent SDK
Transport configuration for MCP.
Fields
| Name | Type | Description |
|---|
transport_type | TransportType | Transport type |
command | Option<String> | Command for stdio transport |
args | Vec<String> | Arguments for stdio transport |
url | Option<String> | URL for HTTP/WebSocket transport |
headers | HashMap<String | Headers for HTTP transport |
env | HashMap<String | Environment variables |
timeout | u32 | Connection timeout in seconds |
Methods
stdio
fn stdio(command: impl Into<String>, args: &[&str]) -> Self
Create a new stdio transport config
Parameters:
| Name | Type |
|---|
command | impl Into<String> |
args | &[&str] |
http
fn http(url: impl Into<String>) -> Self
Create a new HTTP transport config
Parameters:
| Name | Type |
|---|
url | impl Into<String> |
websocket
fn websocket(url: impl Into<String>) -> Self
Create a new WebSocket transport config
Parameters:
| Name | Type |
|---|
url | impl Into<String> |
env
fn env(mut self, key: impl Into<String>, value: impl Into<String>) -> Self
Add an environment variable
Parameters:
| Name | Type |
|---|
key | impl Into<String> |
value | impl Into<String> |
fn header(mut self, key: impl Into<String>, value: impl Into<String>) -> Self
Add a header
Parameters:
| Name | Type |
|---|
key | impl Into<String> |
value | impl Into<String> |
timeout
fn timeout(mut self, timeout: u32) -> Self
Set timeout
Parameters:
Source
View on GitHub
praisonai/src/mcp/mod.rs at line 47