pub struct McpConfig {
pub workspace_file: PathBuf,
pub global_dir: Option<PathBuf>,
pub supplied: Vec<McpServer>,
}Expand description
Which MCP servers a run gets: where to look for configured ones, and any the host already has in hand.
Fields§
§workspace_file: PathBufPath relative to the workspace root. Empty names no file to look for;
McpConfig::supplied_only writes it.
global_dir: Option<PathBuf>The global config directory, if any. mcp.json inside it is used.
supplied: Vec<McpServer>Servers the host supplies directly, outranking anything on disk of the
same name. This is where an ACP client’s mcpServers arrives.
Implementations§
Source§impl McpConfig
impl McpConfig
Sourcepub fn with_supplied(self, supplied: Vec<McpServer>) -> Self
pub fn with_supplied(self, supplied: Vec<McpServer>) -> Self
Adds servers the host already holds, replacing any set before.
Sourcepub fn supplied_only(self) -> Self
pub fn supplied_only(self) -> Self
The host’s own servers, and no file discovery at all: neither
.mcp.json nor the global one is read.
What WorkspaceBuilder::without_discovery leaves of this config. An
ACP client’s mcpServers arrived through
with_supplied and still connects, because
being handed a server is not finding one.