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.
See https://docs.github.com/en/copilot/how-tos/copilot-cli/customize-copilot/add-mcp-servers for the documentation.
Declarations
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";
headers = { CONTEXT7_API_KEY = "YOUR-API-KEY"; };
tools = [ "*" ];
};
}