pub struct CanonServer {
pub kind: Option<String>,
pub command: Option<String>,
pub args: Option<Vec<String>>,
pub env: Option<BTreeMap<String, String>>,
pub cwd: Option<String>,
pub url: Option<String>,
pub headers: Option<BTreeMap<String, String>>,
pub bearer_token_env_var: Option<String>,
pub enabled: Option<bool>,
}Expand description
Configuration for a single MCP server.
Supports two kinds of servers:
- stdio: Local process with
command,args, and optionalenv/cwd - http: Remote server with
urland optionalheaders
Fields§
§kind: Option<String>Explicit kind: “stdio” or “http”. Auto-detected if not specified.
command: Option<String>Command to execute (for stdio servers).
args: Option<Vec<String>>Arguments to pass to the command.
env: Option<BTreeMap<String, String>>Environment variables to set.
cwd: Option<String>Working directory for the process.
url: Option<String>URL for HTTP servers.
headers: Option<BTreeMap<String, String>>HTTP headers to include in requests.
bearer_token_env_var: Option<String>Environment variable containing the bearer token.
enabled: Option<bool>Whether the server is enabled (default: true).
Implementations§
Trait Implementations§
Source§impl Clone for CanonServer
impl Clone for CanonServer
Source§fn clone(&self) -> CanonServer
fn clone(&self) -> CanonServer
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 CanonServer
impl Debug for CanonServer
Source§impl<'de> Deserialize<'de> for CanonServer
impl<'de> Deserialize<'de> for CanonServer
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 CanonServer
impl RefUnwindSafe for CanonServer
impl Send for CanonServer
impl Sync for CanonServer
impl Unpin for CanonServer
impl UnwindSafe for CanonServer
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