data/commands/builtin/mcp_add_command library
Classes
- HttpMcpServerConfig
- HTTP-based MCP server configuration.
- McpAddCommand
- The /mcp add command — registers MCP servers in Neomage configuration.
- McpAddOptions
- Parsed options for the /mcp add command.
- McpServerConfig
- Base configuration for an MCP server.
- SseMcpServerConfig
- SSE-based MCP server configuration.
- StdioMcpServerConfig
- Stdio-based MCP server configuration.
Enums
- McpConfigScope
- Where MCP configuration is stored.
- McpTransport
- MCP transport protocol.
Functions
-
addMcpConfig(
String name, McpServerConfig serverConfig, McpConfigScope scope, String cwd) → Future< void> - Add an MCP server configuration to the config file for the given scope.
-
buildOAuthConfig(
{String? clientId, int? callbackPort, bool xaa = false}) → Map< String, dynamic> ? - Build an OAuth configuration map from the provided options.
-
describeMcpConfigFilePath(
McpConfigScope scope) → String - Human-readable description of the config file path for a scope.
-
ensureConfigScope(
String? scope) → McpConfigScope -
Parse a scope string into McpConfigScope, defaulting to
local. -
ensureTransport(
String? transport) → McpTransport -
Parse a transport string, defaulting to
stdio. -
hasXaaIdpSettings(
) → bool - Check whether XAA IdP settings are configured. Returns true if settings.xaaIdp is present in user settings.
-
isXaaEnabled(
) → bool - Check whether XAA is enabled via environment variable.
-
parseEnvVars(
List< String> ? envStrings) → Map<String, String> - Parse environment variable strings of the form "KEY=value" into a map.
-
parseHeaders(
List< String> headerStrings) → Map<String, String> - Parse header strings of the form "Key: Value" into a map.