Skip to content

McpConfig

Category: Config

Source: mcp_config.dart

YAML→config parser for MCP servers.

The typed config classes themselves live in glue_strategies/src/mcp_client/config.dart so the pool (in strategies) can consume them without crossing the layer boundary. This file is the harness-side adapter: YAML + ConfigError + env-var expansion.

Functions

McpConfig parseMcpConfig(Object? section, Map<String, String> env)

Parses the mcp: section of a YAML config map. Returns the default (empty) [McpConfig] when [section] is null.

Throws [ConfigError] for malformed shapes or unresolved ${VAR} interpolations. The error message names the offending server and key.

Released under the MIT License.