pub struct McpServerEntry {
pub name: String,
pub transport: McpTransportType,
pub enabled: bool,
pub command: Option<String>,
pub args: Vec<String>,
pub env: HashMap<String, String>,
pub url: Option<String>,
pub headers: HashMap<String, String>,
pub scope: McpScope,
pub timeout_secs: u64,
pub auto_reconnect: bool,
pub session_default_enabled: bool,
}Expand description
Full MCP server entry compatible with .mcp.json.
§Examples
use gestura_core_mcp::config::{McpServerEntry, McpTransportType};
let _stdio_server = McpServerEntry {
name: "postgres".to_string(),
transport: McpTransportType::Stdio,
command: Some("npx".to_string()),
args: vec!["-y".to_string(), "@anthropic-ai/mcp-server-postgres".to_string()],
..Default::default()
};
let _http_server = McpServerEntry {
name: "github".to_string(),
transport: McpTransportType::Http,
url: Some("https://example.invalid/mcp".to_string()),
..Default::default()
};Fields§
§name: StringUnique server name/identifier.
transport: McpTransportTypeTransport type (stdio, http, sse).
enabled: boolWhether this server is enabled.
command: Option<String>Command to execute (stdio transport).
args: Vec<String>Arguments to pass to command.
env: HashMap<String, String>Environment variables.
url: Option<String>HTTP/SSE URL.
headers: HashMap<String, String>HTTP headers to send.
scope: McpScopeConfiguration scope (user/project/local).
timeout_secs: u64Connection timeout in seconds.
auto_reconnect: boolAuto-reconnect on failure.
session_default_enabled: boolWhether tools from this server are enabled by default when a new session
is created. Individual session overrides (stored in
SessionToolSettings::enabled_tools) take precedence.
Implementations§
Source§impl McpServerEntry
impl McpServerEntry
Sourcepub fn effective_uri(&self) -> String
pub fn effective_uri(&self) -> String
Return the effective URI for this server.
For HTTP/SSE this is the url field. For stdio, a synthetic
stdio://<command> URI is returned for display/logging purposes.
Sourcepub fn to_discovery_config(&self) -> McpServerConfig
pub fn to_discovery_config(&self) -> McpServerConfig
Convert to the discovery-layer McpServerConfig.
Trait Implementations§
Source§impl Clone for McpServerEntry
impl Clone for McpServerEntry
Source§fn clone(&self) -> McpServerEntry
fn clone(&self) -> McpServerEntry
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for McpServerEntry
impl Debug for McpServerEntry
Source§impl Default for McpServerEntry
impl Default for McpServerEntry
Source§fn default() -> McpServerEntry
fn default() -> McpServerEntry
Source§impl<'de> Deserialize<'de> for McpServerEntry
impl<'de> Deserialize<'de> for McpServerEntry
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<McpServerEntry, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<McpServerEntry, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for McpServerEntry
impl PartialEq for McpServerEntry
Source§impl Serialize for McpServerEntry
impl Serialize for McpServerEntry
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl Eq for McpServerEntry
impl StructuralPartialEq for McpServerEntry
Auto Trait Implementations§
impl Freeze for McpServerEntry
impl RefUnwindSafe for McpServerEntry
impl Send for McpServerEntry
impl Sync for McpServerEntry
impl Unpin for McpServerEntry
impl UnwindSafe for McpServerEntry
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().