Helpers for managing MCP server configuration through app-server config APIs.
Summary
Functions
Adds or replaces an MCP server entry under mcp_servers.<name>.
Lists configured MCP servers from the app-server config.
Removes a configured MCP server entry.
Types
@type connection() :: Codex.AppServer.connection()
@type server_config() :: map()
Functions
@spec add_server(connection(), String.t(), map() | keyword(), keyword()) :: {:ok, map()} | {:error, term()}
Adds or replaces an MCP server entry under mcp_servers.<name>.
The attrs map should include either a stdio launcher (command) or a
streamable HTTP URL (url).
@spec list_servers( connection(), keyword() ) :: {:ok, map()} | {:error, term()}
Lists configured MCP servers from the app-server config.
Options
:include_layers- include layered config metadata (passed toconfig/read):app_server- override the module used for config calls (defaults toCodex.AppServer)
@spec remove_server(connection(), String.t(), keyword()) :: {:ok, map()} | {:error, term()}
Removes a configured MCP server entry.