pub struct McpConfiguration {
pub cms_internal_url: Url,
pub agent_validator_secret: SecretString,
}Expand description
What the MCP server at /api/v0/mcp needs to validate agent writes: the CMS’s block validator.
Fields§
§cms_internal_url: UrlThe CMS base the validator routes are under, e.g. http://cms:3000/cms/. Ends in /
because it is a Url::join base.
agent_validator_secret: SecretStringShared with the CMS’s validator routes.
Implementations§
Source§impl McpConfiguration
impl McpConfiguration
Sourcepub fn try_from_env() -> Result<Option<Self>>
pub fn try_from_env() -> Result<Option<Self>>
Reads CMS_INTERNAL_URL and AGENT_VALIDATOR_SECRET. Either missing gives Ok(None):
agent writes then fail closed and reads keep working. Errors only on an unparseable URL.
Trait Implementations§
Source§impl Clone for McpConfiguration
impl Clone for McpConfiguration
Source§fn clone(&self) -> McpConfiguration
fn clone(&self) -> McpConfiguration
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 moreAuto Trait Implementations§
impl Freeze for McpConfiguration
impl RefUnwindSafe for McpConfiguration
impl Send for McpConfiguration
impl Sync for McpConfiguration
impl Unpin for McpConfiguration
impl UnsafeUnpin for McpConfiguration
impl UnwindSafe for McpConfiguration
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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>
Converts
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>
Converts
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