pub struct McpServerConfig {
pub command: Option<String>,
pub resolved_path_cache: Option<String>,
pub args: Option<Vec<String>>,
pub working_dir: Option<String>,
pub path_extra: Option<String>,
pub url: Option<String>,
}Expand description
Execution configuration for an MCP server.
This contains the runtime configuration needed to start/connect to a server.
For stdio servers, command is required. For SSE servers, url is required.
Fields§
§command: Option<String>Command to execute (e.g., “npx” or “/opt/homebrew/bin/npx”). Can be a simple command name (resolved via PATH + platform defaults) or an absolute path. Required for stdio servers.
resolved_path_cache: Option<String>Cached resolved absolute path to the executable. Populated by the path resolver when command is successfully resolved. Used to avoid repeated PATH searches.
args: Option<Vec<String>>Arguments to pass to the executable
working_dir: Option<String>Working directory for the process (must exist if specified)
path_extra: Option<String>Additional PATH entries to prepend to the child process PATH. Useful for nvm/asdf shims or custom tool locations.
url: Option<String>URL for SSE connection (e.g., http://localhost:3001/sse)
Required for SSE servers.
Implementations§
Trait Implementations§
Source§impl Clone for McpServerConfig
impl Clone for McpServerConfig
Source§fn clone(&self) -> McpServerConfig
fn clone(&self) -> McpServerConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more