GitHub Copilot CLI reads MCP servers from `~/.copilot/mcp-config.json`. The `type` field must be `local` for stdio servers.
OVERVIEW
Copilot CLI uses `~/.copilot/mcp-config.json` for MCP server definitions. Local servers require `"type": "local"` — this tells the CLI to launch the process via stdio. The `"tools": ["*"]` field exposes all tools; omit it or list specific names to restrict access. The built-in GitHub MCP server is always available without configuration.
CONFIG FILE LOCATION
Create this file: ~/.copilot/mcp-config.json. Create the .copilot directory in your home folder if it does not exist.
Paste the JSON exactly as shown. The `"type": "local"` field is required — without it, Copilot CLI will not launch the process.
Replace `mcp_sk_your_key_here` with the real key from Dashboard → API Keys.
{ "mcpServers": { "zephex": { "type": "local", "command": "npx", "args": ["-y", "zephex"], "env": { "ZEPHEX_API_KEY": "mcp_sk_your_key_here" }, "tools": ["*"] } }}You can also add the server interactively inside a running session:
Verify the server loaded before asking Copilot to use it.
Check that ~/.copilot/mcp-config.json exists and is valid JSON. Validate with `cat ~/.copilot/mcp-config.json | python3 -m json.tool`.
The `type` field must be `"local"` (not `"http"` or `"stdio"`). Copilot CLI uses `"local"` as the keyword for stdio transport.
Copilot CLI inherits PATH from your shell. Run `which npx` to verify. If using nvm, ensure the correct Node version is active before starting the CLI.
Check that `"tools": ["*"]` is set. If you listed specific tool names, verify they match exactly (tool names are case-sensitive).
If the editor still does not connect, return to Quickstart or check Connection Issues.