pub enum McpServerConfig {
Stdio(StdioServerConfig),
Remote(RemoteServerConfig),
InMemory(InMemoryServerConfig),
}Expand description
A single MCP server. The type field selects the transport; stdio is the
default and may be omitted.
A local stdio server launched as a subprocess:
{
"type": "stdio",
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": { "GITHUB_TOKEN": "ghp_..." }
}A remote streamable-HTTP server using a pre-registered public OAuth client:
{
"type": "http",
"url": "https://mcp.slack.com/mcp",
"oauth": {
"clientId": "1601185624273.8899143856786",
"callbackPort": 3118
}
}When a remote HTTP server returns an OAuth challenge, Aether uses its first-party
Client ID Metadata Document at
https://aether-agent.io/oauth/client-metadata.json and listens on
127.0.0.1:3118, advertising the exact redirect URI http://localhost:3118/.
If port 3118 is occupied, authentication fails until the port is available.
The oauth object is optional. Set clientMetadataUrl for a custom CIMD, or
clientId for a pre-registered public client; a configured clientId takes
priority. callbackPort defaults to 3118 and must exactly match the client’s
registered redirect URI. If the authorization server does not advertise CIMD,
Aether falls back to deprecated Dynamic Client Registration. An
Authorization header on its own turns off OAuth.
A server can configure one of oauth, sigv4, or an Authorization header. For example:
{
"type": "http",
"url": "https://abc123.execute-api.us-east-1.amazonaws.com/mcp",
"sigv4": { "service": "execute-api", "region": "us-east-1", "profile": "dev" }
}A remote server using a bearer token:
{
"type": "http",
"url": "https://mcp.example.com",
"headers": { "Authorization": "Bearer ..." }
}Set "deferTools": true to omit every tool on this server from the model-visible
tool definitions and make it available through progressive aether mcp discovery.
For selective deferral, set deferTools to an object with include and exclude
lists. Entries match either an exact MCP-local tool name or a prefix ending in *:
{
"type": "in-memory",
"deferTools": {
"include": ["*"],
"exclude": ["bash", "lsp_*"]
}
}Variants§
Implementations§
Source§impl McpServerConfig
impl McpServerConfig
pub fn defer_tools(&self) -> &ToolExposure
Trait Implementations§
Source§impl Clone for McpServerConfig
impl Clone for McpServerConfig
Source§impl Debug for McpServerConfig
impl Debug for McpServerConfig
Source§impl<'de> Deserialize<'de> for McpServerConfig
impl<'de> Deserialize<'de> for McpServerConfig
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>,
Source§impl JsonSchema for McpServerConfig
impl JsonSchema for McpServerConfig
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for McpServerConfig
impl PartialEq for McpServerConfig
Source§impl Serialize for McpServerConfig
impl Serialize for McpServerConfig
impl StructuralPartialEq for McpServerConfig
Auto Trait Implementations§
impl Freeze for McpServerConfig
impl RefUnwindSafe for McpServerConfig
impl Send for McpServerConfig
impl Sync for McpServerConfig
impl Unpin for McpServerConfig
impl UnsafeUnpin for McpServerConfig
impl UnwindSafe for McpServerConfig
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>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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