Copilot MCP Tool is an open‑source Model Context Protocol (MCP) server that connects your IDE or AI assistant (Claude, Cursor, etc.) to GitHub Copilot CLI. It enables non‑interactive automation, safe tool execution with permissions, and large‑scale code analysis via @ file references. Built for reliability and speed, it streams progress updates, and integrates cleanly with standard MCP clients for
Add this skill
npx mdskills install x51xxx/copilot-mcp-serverWell-documented MCP server with comprehensive tooling for GitHub Copilot CLI integration and code analysis
Copilot MCP Tool is an open‑source Model Context Protocol (MCP) server that connects your IDE or AI assistant (Claude, Cursor, etc.) to GitHub Copilot CLI. It enables non‑interactive automation, safe tool execution with permissions, and large‑scale code analysis via @ file references. Built for reliability and speed, it streams progress updates, and integrates cleanly with standard MCP clients for code review, refactoring, documentation, and CI automation.
Primary: Ask GitHub Copilot CLI questions from your MCP client, with comprehensive tool management
Advanced: Batch processing, code review, and brainstorming capabilities
Goal: Use GitHub Copilot CLI directly from your MCP-enabled editor to analyze and edit code efficiently.
Before using this tool, ensure you have:
claude mcp add copilot-cli -- npx -y @trishchuk/copilot-mcp-server
Type /mcp inside Claude Code to verify the Copilot MCP is active.
If you already have it configured in Claude Desktop:
"copilot-cli": {
"command": "npx",
"args": ["-y", "@trishchuk/copilot-mcp-server"]
}
claude mcp add-from-claude-desktop
Register the MCP server with your MCP client:
Add this configuration to your Claude Desktop config file:
{
"mcpServers": {
"copilot-cli": {
"command": "npx",
"args": ["-y", "@trishchuk/copilot-mcp-server"],
"env": {
"COPILOT_MODEL": "claude-sonnet-4.5"
}
}
}
}
If you installed globally, use this configuration instead:
{
"mcpServers": {
"copilot-cli": {
"command": "copilot-mcp",
"env": {
"COPILOT_MODEL": "claude-sonnet-4.5"
}
}
}
}
Configuration File Locations:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.json~/.config/claude/claude_desktop_config.jsonAfter updating the configuration, restart your terminal session.
Configure default behavior with environment variables:
COPILOT_MODEL - Default AI ModelMethod 1: In MCP Configuration (Recommended)
Add the env field to your MCP server configuration:
{
"mcpServers": {
"copilot-cli": {
"command": "npx",
"args": ["-y", "@trishchuk/copilot-mcp-server"],
"env": {
"COPILOT_MODEL": "claude-sonnet-4.5"
}
}
}
}
Method 2: System Environment Variable
# Set for current session
export COPILOT_MODEL=claude-sonnet-4.5
# Permanently (add to ~/.bashrc or ~/.zshrc)
echo 'export COPILOT_MODEL=claude-sonnet-4.5' >> ~/.zshrc
Available models:
claude-sonnet-4.5 - Default, best for code generationclaude-sonnet-4 - Faster versiongpt-5 - OpenAI GPT-5Priority: model parameter > COPILOT_MODEL env > Copilot CLI default (claude-sonnet-4.5)
Override in requests:
# Uses COPILOT_MODEL
Use ask tool to analyze @src/
# Overrides with gpt-5
Use ask tool with model gpt-5 to analyze @src/
COPILOT_MCP_CWD - Working DirectoryPurpose: Sets the working directory for Copilot CLI command execution. This is especially important when the MCP server starts from a different directory than your project (e.g., from home directory in IDE integrations).
Method 1: In MCP Configuration (Recommended for IDE)
{
"mcpServers": {
"copilot-cli": {
"command": "npx",
"args": ["-y", "@trishchuk/copilot-mcp-server"],
"env": {
"COPILOT_MCP_CWD": "/absolute/path/to/your/project"
}
}
}
}
Method 2: System Environment Variable
# Set for current session
export COPILOT_MCP_CWD=/path/to/your/project
# Permanently (add to ~/.bashrc or ~/.zshrc)
echo 'export COPILOT_MCP_CWD=/path/to/your/project' >> ~/.zshrc
Resolution Priority:
workingDir parameter in request (highest)COPILOT_MCP_CWD env variablePWD or INIT_CWD env variables@path in promptprocess.cwd() (lowest)Override in requests:
# Use explicit workingDir parameter
Use ask tool with workingDir "/path/to/project" to analyze the codebase
For IntelliJ IDEA / IDE Users: If Copilot CLI cannot find your project files, set COPILOT_MCP_CWD in your MCP server configuration to point to your project directory.
See Getting Started Guide for full configuration details.
/copilot to access the MCP server tools.// Use GitHub Copilot CLI for analysis
'explain the architecture of @src/';
// Code review with specific focus
'use copilot to review @src/main.ts for security vulnerabilities';
// Batch processing multiple files
'use batch to refactor all JavaScript files in @src/ for ES6 syntax';
// Comprehensive code review
'use review to perform security review of @api/ with high severity filter';
ask copilot to analyze @src/main.ts and explain what it doesuse copilot to summarize @. the current directoryanalyze @package.json and list dependencies using copilotask copilot to explain div centeringask copilot about best practices for React developmentuse copilot for TypeScript debugging help// GitHub Copilot CLI batch processing
'use batch to update all React components in @src/components/ for React 18 patterns';
// Comprehensive code review
'use review for security review of @api/ with critical severity filter and fix suggestions';
// Multiple task processing
'use batch to: 1) add JSDoc comments to @utils.js, 2) fix ESLint issues in @main.ts, 3) update imports in @index.js';
brainstorm ways to optimize our CI/CD pipeline using SCAMPER methoduse copilot to brainstorm 10 innovative features for our appask copilot to generate product ideas for the healthcare domain with design-thinking approachGitHub Copilot CLI supports tool permissions and directory access controls. This server defaults to allowing all tools for non-interactive mode.
use copilot to create and run a Python script that processes dataask copilot to safely test @script.py and explain what it doesThese tools are designed to be used by the AI assistant.
ask: Executes GitHub Copilot CLI with comprehensive tool and directory management.
@ file references for including file contentallowAllTools, allowTool, denyTooladdDir for granting file system accesslogLevel, resume (session management), screenReader supportbatch: Processes multiple atomic tasks with GitHub Copilot CLI in batch mode.
review: Comprehensive code review using GitHub Copilot CLI.
security, performance, code-quality, best-practices, architecture, testing, documentation, accessibility, comprehensivelow, medium, high, criticalmarkdown, json, textbrainstorm: Generate novel ideas with structured methodologies.
brainstorm prompt:"ways to improve code review process" domain:"software" methodology:"scamper"ping: A simple test tool that echoes back a message.
/copilot:ping (MCP) "Hello from Copilot MCP!"Help: Shows CLI help text for GitHub Copilot.
version: Shows version information for all CLI tools and MCP server.
timeout-test: Test tool for timeout prevention.
You can use these commands directly in Claude Code's interface (compatibility with other clients has not been tested).
prompt (required): The analysis prompt. Use @ syntax to include files (e.g., /analyze prompt:@src/ summarize this directory) or ask general questions (e.g., /analyze prompt:Please use a web search to find the latest news stories).target (required): Files/directories to review (e.g., /review target:@src/ or /review target:@main.js).reviewType (optional): Type of review - security, performance, code-quality, etc.tasks (required): Array of tasks to process.message (optional): A message to echo back.This project was inspired by the excellent work from jamubc/gemini-mcp-tool. Special thanks to @jamubc for the original MCP server architecture and implementation patterns.
Contributions are welcome! Please submit pull requests or report issues through GitHub.
This project is licensed under the MIT License. See the LICENSE file for details.
Disclaimer: This is an unofficial, third-party tool and is not affiliated with, endorsed, or sponsored by GitHub or Microsoft.
Install via CLI
npx mdskills install x51xxx/copilot-mcp-serverCopilot MCP Tool is a free, open-source AI agent skill. Copilot MCP Tool is an open‑source Model Context Protocol (MCP) server that connects your IDE or AI assistant (Claude, Cursor, etc.) to GitHub Copilot CLI. It enables non‑interactive automation, safe tool execution with permissions, and large‑scale code analysis via @ file references. Built for reliability and speed, it streams progress updates, and integrates cleanly with standard MCP clients for
Install Copilot MCP Tool with a single command:
npx mdskills install x51xxx/copilot-mcp-serverThis downloads the skill files into your project and your AI agent picks them up automatically.
Copilot MCP Tool works with Claude Code, Claude Desktop, Cursor, Vscode Copilot, Windsurf, Continue Dev, Gemini Cli, Amp, Roo Code, Goose. Skills use the open SKILL.md format which is compatible with any AI coding agent that reads markdown instructions.