programs.github-copilot-cli.mcpServers

Home-Manager option

attribute set of (JSON value)

MCP server configurations written to mcp-config.json inside programs.github-copilot-cli.configDir. Each attribute defines a server entry under mcpServers in the config file. Supported server types: - local — starts a local process via stdio (command, optional args, env) - http — connects to a remote HTTP server (url, optional headers) - sse — legacy HTTP with Server-Sent Events (same structure as http) The tools field accepts ["*"] to enable all tools or a list of specific tool names. These values are written to the world-readable Nix store, so avoid putting API keys or tokens in headers, env, or other values. For a local server that reads a secret from an environment variable, you can set env.<NAME>.file = "/run/secrets/..." instead; Home Manager then wraps the command so it reads the file at startup. See <https://docs.github.com/en/copilot/how-tos/copilot-cli/customize-copilot/add-mcp-servers> for the documentation.

type: attribute set of (JSON value)
Default
{ }
Example
{ playwright = { type = "local"; command = "npx"; args = [ "@playwright/mcp@latest" ]; tools = [ "*" ]; }; context7 = { type = "http"; url = "https://mcp.context7.com/mcp"; tools = [ "*" ]; }; }
declared in: <home-manager/modules/programs/github-copilot-cli.nix>source unavailable