pub struct McpConfig {
pub enabled: bool,
pub transport: String,
pub url: Option<String>,
pub protocol_version: String,
pub auto_resources: bool,
pub tools: Vec<McpToolDecl>,
pub prompts: Vec<McpPromptDecl>,
}Expand description
MCP registry settings. Mirrors the JSON shape consumed by clients
(Claude Desktop, IDE integrations, …) but expressed in TOML so site
authors can edit it alongside the rest of ssg.toml.
Hand-rolled Default so the transport and protocol_version
fields carry the same defaults that #[serde(default = …)] applies
during deserialisation — otherwise constructing the struct via
McpConfig::default() (rather than parsing TOML) would leave both
strings empty.
Fields§
§enabled: boolMaster toggle. When false, no mcp.json is written.
transport: StringTransport descriptor — currently always "http". Held as a
string so future transports ("stdio", "sse") can land
without bumping the schema.
url: Option<String>Override the URL the transport listens on. When omitted, the
emitter synthesises {base_url}/.well-known/mcp so the
registry is self-describing.
protocol_version: StringMCP protocol version reported in the registry. Defaults to
"2025-03-26", the version pinned across the public MCP
servers we tested against during the v0.0.44 cycle.
auto_resources: boolWhen true, walk .meta.json sidecars under site_dir and
emit one MCP resource per public page. AC5 of #552.
tools: Vec<McpToolDecl>Statically-declared MCP tools. Optional — most sites won’t
expose any. Authors may extend this list in ssg.toml.
prompts: Vec<McpPromptDecl>Statically-declared MCP prompt templates.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for McpConfig
impl<'de> Deserialize<'de> for McpConfig
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>,
Auto Trait Implementations§
impl Freeze for McpConfig
impl RefUnwindSafe for McpConfig
impl Send for McpConfig
impl Sync for McpConfig
impl Unpin for McpConfig
impl UnsafeUnpin for McpConfig
impl UnwindSafe for McpConfig
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§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