pub struct McpServerConfig {
pub command: Option<String>,
pub args: Vec<String>,
pub env: Option<HashMap<String, Value>>,
pub type: Option<String>,
pub url: Option<String>,
pub headers: Option<HashMap<String, Value>>,
pub agpm_metadata: Option<AgpmMetadata>,
}Expand description
Individual MCP server configuration.
This structure represents a single MCP server entry in the .mcp.json file.
It supports both command-based and HTTP transport configurations.
Fields§
§command: Option<String>The command to execute to start the server (command-based servers)
args: Vec<String>Arguments to pass to the command (command-based servers)
env: Option<HashMap<String, Value>>Environment variables to set when running the server (command-based servers)
type: Option<String>Transport type (HTTP-based servers) - Claude Code uses “type” field
url: Option<String>Server URL (HTTP-based servers)
headers: Option<HashMap<String, Value>>HTTP headers (HTTP-based servers)
agpm_metadata: Option<AgpmMetadata>AGPM management metadata (only present for AGPM-managed servers)
Trait Implementations§
Source§impl Clone for McpServerConfig
impl Clone for McpServerConfig
Source§fn clone(&self) -> McpServerConfig
fn clone(&self) -> McpServerConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for McpServerConfig
impl Debug for McpServerConfig
Source§impl<'de> Deserialize<'de> for McpServerConfig
impl<'de> Deserialize<'de> for McpServerConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for McpServerConfig
impl RefUnwindSafe for McpServerConfig
impl Send for McpServerConfig
impl Sync for McpServerConfig
impl Unpin for McpServerConfig
impl UnwindSafe for McpServerConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more