pub struct ServerConfig {
pub prefix: String,
pub allowed_tools: Vec<String>,
pub tool_authorizer: Option<Arc<dyn ToolAuthorizer>>,
pub tool_audit_sink: Option<Arc<dyn ToolAuditSink>>,
pub max_input_bytes: usize,
pub max_result_bytes: usize,
pub prompts: Vec<PromptEntry>,
pub resources: Vec<ResourceEntry>,
pub resource_templates: Vec<ResourceTemplateEntry>,
}Expand description
Configuration for the MCP server.
Fields§
§prefix: StringOptional prefix prepended to all tool names exposed via MCP.
allowed_tools: Vec<String>Optional registry tool-name allow-list. Empty means expose all registered tools.
Optional per-call authorization hook.
tool_audit_sink: Option<Arc<dyn ToolAuditSink>>Optional audit sink for all tool invocation outcomes.
max_input_bytes: usizeReject JSON argument payloads larger than this many bytes. Zero disables the limit.
max_result_bytes: usizeReject serialized tool results larger than this many bytes. Zero disables the limit.
prompts: Vec<PromptEntry>Static MCP prompts exposed by this server.
resources: Vec<ResourceEntry>Static MCP resources exposed by this server.
resource_templates: Vec<ResourceTemplateEntry>Static MCP resource templates exposed by this server.
Trait Implementations§
Source§impl Clone for ServerConfig
impl Clone for ServerConfig
Source§fn clone(&self) -> ServerConfig
fn clone(&self) -> ServerConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for ServerConfig
impl Default for ServerConfig
Source§fn default() -> ServerConfig
fn default() -> ServerConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for ServerConfig
impl !UnwindSafe for ServerConfig
impl Freeze for ServerConfig
impl Send for ServerConfig
impl Sync for ServerConfig
impl Unpin for ServerConfig
impl UnsafeUnpin for ServerConfig
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