Get the FREE Ultimate OpenClaw Setup Guide →

copilot

MCP server for GitHub Copilot CLI integration

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio x51xxx-copilot-mcp-server npx -y @trishchuk/copilot-mcp-server \
  --env COPILOT_MODEL="<default-model-placeholder>" \
  --env COPILOT_MCP_CWD="<absolute-path-to-project>"

How to use

Copilot MCP Tool exposes a server that lets your MCP clients talk to GitHub Copilot CLI via a centralized interface. It enables non-interactive automation for code understanding, analysis, and edits by routing requests through Copilot CLI with configurable models and working directories. You can use it for tasks like code explanations, batch file processing, and targeted code reviews within your editor or IDE workflows. The server supports tool permissions and directory access controls, so you can safely specify what Copilot CLI is allowed to access when operating inside an MCP session.

To use it, configure your MCP client (or Claude/IDE integration) to point at the copilot-mcp-server via NPX (recommended) or a globally installed implementation. By default you can set environment variables such as COPILOT_MODEL to pick the AI model (e.g., claude-sonnet-4.5) and COPILOT_MCP_CWD to enforce a specific working directory for Copilot CLI commands. When making requests, you’ll typically reference file paths with @ references and use commands like explain, review, or batch to drive Copilot CLI tasks through the MCP server.

How to install

Prerequisites:

  • Node.js v18.0.0 or higher
  • npm (included with Node.js) or yarn
  • GitHub Copilot CLI installed separately if not using the MCP setup directly

Installation steps:

  1. Install Node.js from https://nodejs.org/

  2. Install the Copilot MCP server via NPX (recommended):

    • Ensure you have npm installed
    • Run the one-line setup provided by your environment to register the MCP server with Copilot (as shown in the README): claude mcp add copilot-cli -- npx -y @trishchuk/copilot-mcp-server
  3. Alternatively, install the server locally (if you prefer a non-NPX path):

    • npm install -g @trishchuk/copilot-mcp-server
    • Configure your MCP client to use the global command, e.g., "command": "copilot-mcp" with appropriate env vars
  4. Verify installation:

    • In Claude Code or your MCP client, issue a command to enumerate or call the Copilot MCP server to confirm responsiveness.

Note: If you are using Claude Desktop/Claude Code integration, follow the configuration guidance in the README to add the MCP server with the correct command and arguments.

Additional notes

Tips and considerations:

  • Use COPILOT_MODEL to select the AI model (e.g., claude-sonnet-4.5, claude-sonnet-4, or gpt-5); the requested model can override defaults per request.
  • Set COPILOT_MCP_CWD to the project directory when Copilot CLI needs a specific working context; this helps ensure file references and @path lookups resolve correctly.
  • The MCP server configuration supports an env block for per-server environment variables. Use this to pin models, working directories, or other Copilot CLI options.
  • If Copilot CLI cannot locate your project files within the IDE, ensure COPILOT_MCP_CWD points to the correct path or adjust the workingDir parameter in requests.
  • For NPX usage, the server can be referenced as @trishchuk/copilot-mcp-server, allowing seamless integration with Claude Code/macros.
  • Common issues: mismatched Node/CLI versions, inaccessible project paths due to permissions, or missing Copilot CLI installation. Ensure proper permissions and that your MCP client can reach the NPX package at runtime.

Related MCP Servers

Sponsor this space

Reach thousands of developers