skills/copilot-cli-mcp-config/SKILL.md
Manage GitHub Copilot CLI MCP server configuration, including ~/.copilot/mcp-config.json, COPILOT_HOME or --config-dir, project-level .mcp.json/.github/mcp.json/.vscode/mcp.json, /mcp commands, --additional-mcp-config, and VS Code mcp.json migration.
npx skillsauth add arisng/github-copilot-fc copilot-cli-mcp-configInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Configure MCP servers for GitHub Copilot CLI using the mcp-config.json file, which uses different syntax from VS Code's mcp.json.
Default: ~/.copilot/mcp-config.json
Relocating the config directory (precedence, highest first):
--config-dir CLI flag: copilot --config-dir /path/to/dirCOPILOT_HOME environment variable: export COPILOT_HOME=/path/to/dir~/.copilot/Setting either option redirects the entire config tree (agents, skills, MCP config, logs, sessions).
Project-level MCP configs: .mcp.json, .github/mcp.json, or .vscode/mcp.json — these take precedence over user-level definitions when server names conflict and are shared via source control.
Additional config at runtime: --additional-mcp-config augments ~/.copilot/mcp-config.json for the current session only. It is repeatable, and accepts either a JSON string or a file path prefixed with @:
copilot --additional-mcp-config '{"mcpServers":{"extra":{"type":"stdio","command":"npx","args":["my-server"],"tools":["*"]}}}' \
--additional-mcp-config @/path/to/project-mcp.json
These are slash commands entered inside the Copilot CLI interactive session (not shell commands):
/mcp add # Interactive form — Tab to navigate fields, Ctrl+S to save
/mcp show # List all configured servers
/mcp show SERVER-NAME # Details for a specific server
/mcp edit SERVER-NAME # Edit an existing server
/mcp delete SERVER-NAME # Delete a server
/mcp disable SERVER-NAME # Disable a server (keeps config, stops loading)
/mcp enable SERVER-NAME # Re-enable a disabled server
Note:
/mcp addis fully interactive — no server name argument is passed. Start Copilot CLI withcopilot, then type/mcp addat the prompt.
GitHub Copilot CLI uses mcpServers (VS Code uses servers):
{
"mcpServers": {
"server-name": { /* config */ }
}
}
GitHub Copilot CLI supports four server types:
stdio / local (Subprocess — standard transport)stdio and local are equivalent: both launch a subprocess and communicate via stdin/stdout. stdio is the portable standard name (aligns with VS Code, the Copilot cloud agent, and the MCP spec); local is a CLI-specific alias that also works.
{
"mcpServers": {
"azure": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@azure/mcp@latest", "server", "start"],
"tools": ["*"],
"env": {}
},
"serena": {
"type": "local",
"command": "uvx",
"args": ["--from", "git+https://github.com/oraios/serena", "serena", "start-mcp-server"],
"tools": ["*"],
"env": {
"API_KEY": "${MY_API_KEY}"
}
}
}
}
http (HTTP Server)Connect to HTTP-based MCP server:
{
"mcpServers": {
"github": {
"type": "http",
"url": "https://api.githubcopilot.com/mcp/readonly",
"tools": ["*"],
"headers": {
"Authorization": "Bearer ${GITHUB_TOKEN}",
"X-MCP-Toolsets": "repos,issues,pull_requests"
}
}
}
}
sse (Server-Sent Events) — DeprecatedDeprecation notice: SSE transport is deprecated in the MCP specification. Use
http(streamable HTTP) for new remote server connections. Existingsseconfigurations continue to work but should be migrated.
Connect to SSE-based MCP server:
{
"mcpServers": {
"cloudflare": {
"type": "sse",
"url": "https://docs.mcp.cloudflare.com/sse",
"tools": ["*"]
}
}
}
Required for all types:
type: Server type ("local", "stdio", "http", "sse")tools: Array of tool names or ["*"] for all toolsLocal/stdio specific (required):
command: Executable command (e.g., "npx", "uvx", "docker")args: Array of command argumentsHTTP/sse specific (required):
url: Server endpoint URLOptional for all:
env: Environment variables object (local/stdio only)headers: HTTP headers object (http/sse only)Use ${VAR_NAME} syntax for variable substitution:
{
"mcpServers": {
"sentry": {
"type": "local",
"command": "npx",
"args": ["@sentry/mcp-server@latest", "--host=${SENTRY_HOST}"],
"tools": ["*"],
"env": {
"SENTRY_HOST": "${COPILOT_MCP_SENTRY_HOST}",
"SENTRY_TOKEN": "${COPILOT_MCP_SENTRY_TOKEN}"
}
}
}
}
Key differences between mcp.json (VS Code) and mcp-config.json (GitHub Copilot CLI):
| Feature | VS Code (mcp.json) | GitHub Copilot CLI (mcp-config.json) |
| ------------------- | ------------------------------------- | --------------------------------------------------------------------------- |
| Root key | "servers" | "mcpServers" |
| Type values | "stdio", "http" | "local", "stdio", "http", "sse" |
| Env vars | Supports inputs and envFile | Only env object with ${VAR} syntax |
| Location | .vscode/mcp.json or global settings | ~/.copilot/mcp-config.json (or $COPILOT_HOME/mcp-config.json) |
| Variable syntax | Can use inputs references | Must use ${VARIABLE} syntax |
VS Code example:
{
"servers": {
"memory": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-memory"],
"env": {
"MEMORY_FILE_PATH": "${workspaceFolder}/.github/memory.json"
},
"type": "stdio"
}
}
}
GitHub Copilot CLI equivalent:
{
"mcpServers": {
"memory": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-memory"],
"tools": ["*"],
"env": {
"MEMORY_FILE_PATH": "${MEMORY_FILE_PATH}"
}
}
}
}
CLI agent files can declare remote HTTP MCP servers in mcp-servers frontmatter. This is the right surface when an MCP server is specific to one agent and uses the http transport:
mcp-servers:
- type: http
url: https://example.com/mcp
name: example-server
Local stdio/local MCP servers cannot be declared per-agent — they must be configured globally in ~/.copilot/mcp-config.json.
{
"mcpServers": {
"azure": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@azure/mcp@latest", "server", "start"],
"tools": ["*"]
},
"github": {
"type": "http",
"url": "https://api.githubcopilot.com/mcp/readonly",
"tools": ["get_issue", "list_repositories"],
"headers": {
"Authorization": "Bearer ${GITHUB_PAT}"
}
},
"cloudflare": {
"type": "sse",
"url": "https://docs.mcp.cloudflare.com/sse",
"tools": ["*"]
}
}
}
{
"mcpServers": {
"notion": {
"type": "local",
"command": "docker",
"args": [
"run", "--rm", "-i",
"-e", "OPENAPI_MCP_HEADERS={\"Authorization\": \"Bearer ${NOTION_API_KEY}\"}",
"mcp/notion"
],
"tools": ["*"],
"env": {
"NOTION_API_KEY": "${COPILOT_MCP_NOTION_API_KEY}"
}
}
}
}
| Method | Usage |
|--------|-------|
| COPILOT_HOME env var | export COPILOT_HOME=/path/to/dir — redirects entire config tree |
| --config-dir flag | copilot --config-dir /path/to/dir — takes precedence over COPILOT_HOME |
Project-level MCP configs (shareable via source control): .mcp.json, .github/mcp.json, or .vscode/mcp.json — these take precedence over user-level definitions for conflicting server names.
Configuration not loading:
/session inside Copilot CLI to see the config pathmcp-config.json exists at that locationMCP server not starting:
which npx, which uvx)~/.copilot/logs/ (or $COPILOT_HOME/logs/ if overridden)Environment variables not expanding:
${VAR_NAME} syntax (not $VAR_NAME)echo $VAR_NAMEexport VAR_NAME="value"Tools not appearing:
"tools" field is present (required)["*"] to enable all toolsWhen migrating from VS Code mcp.json to CLI mcp-config.json:
"servers" → "mcpServers""tools" field to each server (required)inputs with env and use ${VAR} syntaxenvFile to explicit env entriestype is valid for CLI: "local", "stdio", "http", or "sse"Personal configuration: Default ~/.copilot/mcp-config.json
Session-specific servers: --additional-mcp-config flag (repeatable, JSON string or @file)
Project-level / team sharing: .mcp.json, .github/mcp.json, or .vscode/mcp.json — commit to source control
Agent-specific remote servers: Per-agent mcp-servers frontmatter (HTTP only)
Custom config location: COPILOT_HOME env var or --config-dir flag
devops
Programmatically create tldraw whiteboards and visualize them with a self-hosted tldraw instance. Create boards with shapes, text, and connectors, then deploy to a self-hosted server for collaborative editing and gallery management.
tools
Execute Google Cloud Platform operations using the gcloud CLI (and gsutil/bq where applicable). Use when the user wants to: authenticate with GCP, manage GCP resources, deploy applications, configure projects or IAM, view logs, run SQL/BigQuery, or interact with any GCP service from the command line. Triggers on phrases like "gcloud", "Google Cloud CLI", "deploy to GCP", "create a VM", "Cloud Run", "GKE cluster", "Cloud Storage bucket", "set GCP project", "service account", "Cloud Functions", "App Engine deploy", or any request to manage Google Cloud resources via command line.
testing
Grilling session that challenges your plan against the existing domain model, sharpens terminology, and updates documentation (CONTEXT.md, ADRs) inline as decisions crystallise. Use when user wants to stress-test a plan against their project's language and documented decisions.
development
Session-scoped git commit orchestrator that commits only current-session changes and leaves unrelated dirty worktree edits untouched. Inherits git-atomic-commit for atomic grouping and commit message execution, and git-commit-scope-constitution for scope governance and validation. Use when asked to commit this session only or isolate commits from mixed worktree state.