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, optionalargs,env)http— connects to a remote HTTP server (url, optionalheaders)sse— legacy HTTP with Server-Sent Events (same structure ashttp)
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.