SuperAPIAI Directory

copilot-mcp-server

github.com · AI agents

Connect an IDE or AI assistant to GitHub Copilot CLI for code analysis, review and batch processing.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)
PlatformsmacOS · Linux

About this tool

Copilot MCP Tool is an open-source Model Context Protocol (MCP) server used to connect your IDE or AI assistant (Claude, Cursor, etc.) to the GitHub Copilot CLI.

Purpose: Its goal is to use the GitHub Copilot CLI directly from MCP-enabled editors in order to efficiently analyze and edit code.

Main capabilities:

  • Main function: Ask questions to the GitHub Copilot CLI from an MCP client, with full tool management.
  • Advanced features: Batch processing, code review, and brainstorming.
  • Supports non-interactive automation and secure tool execution with permissions.
  • Supports large-scale code analysis through @ file references.
  • Built for reliability and speed, and can stream progress updates.
  • Integrates cleanly with standard MCP clients for code review, refactoring, documentation writing, and CI automation.

Usage:

  • Prerequisites: Node.js (v18.0.0 or later), GitHub Copilot CLI (required).
  • Enter /mcp in Claude Code to verify whether Copilot MCP is activated.
  • Installation and configuration: The configuration can be added to the Claude Desktop configuration file; the NPX method is recommended, or use a global installation configuration.
  • Claude Desktop configuration file locations: macOS: ~/Library/Application Support/Claude/claude_desktop_config.json; Windows: %APPDATA%\Claude\claude_desktop_config.json; Linux: ~/.config/claude/claude_desktop_config.json. After updating the configuration, restart the terminal session.
  • Environment variables are used to configure default behavior. Available models include: claude-sonnet-4.5 (default, best for code generation), claude-sonnet-4 (faster version), gpt-5 (OpenAI GPT-5). Priority: model parameter > COPILOT_MODEL environment variable > Copilot CLI default (claude-sonnet-4.5).
  • The COPILOT_MCP_CWD environment variable is used to set the working directory for Copilot CLI command execution. Resolution priority: the workingDir parameter in the request (highest) > COPILOT_MCP_CWD environment variable > PWD or INIT_CWD environment variable > automatically inferred from @path in the prompt > process.cwd() (lowest). IntelliJ IDEA / IDE users, if Copilot CLI cannot find project files, can set COPILOT_MCP_CWD in the MCP server configuration to point to the project directory.
  • Example workflows: Natural language instructions such as "use copilot to explain index.html", "understand this repo with @src", "look for vulnerabilities and suggest fixes"; enter /copilot in Claude Code to access MCP server tools.
  • File references (using @ syntax): for example ask copilot to analyze @src/main.ts and explain what it does; use copilot to summarize @. the current directory; analyze @package.json and list dependencies using copilot.
  • General questions (without files): for example ask copilot to explain div centering; ask copilot about best practices for React development; use copilot for TypeScript debugging help.
  • Advanced examples: Brainstorming and ideation, for example brainstorm ways to optimize our CI/CD pipeline using SCAMPER method; use copilot to brainstorm 10 innovative features for our app;ask copilot to generate product ideas for the healthcare domain with design-thinking approach.

Tool permissions and security: GitHub Copilot CLI supports tool permissions and directory access control. This server allows all tools by default for non-interactive mode.

Tools provided to the AI:

  • ask: Executes GitHub Copilot CLI, supporting comprehensive tool and directory management. Supports @ file references to include file contents. Tool permissions: allowAllTools, allowTool, denyTool. Directory access: addDir to grant file system access. Advanced options: logLevel, resume (session management), screenReader support. Session management and log control.
  • batch: Uses GitHub Copilot CLI in batch mode to process multiple atomic tasks. Supports parallel or sequential execution. Priority-based task ordering (high, normal, low). Comprehensive error handling and progress reporting. stop-on-error or continue-on-error modes. Detailed execution reports including timing and status.
  • review: Performs comprehensive code review using GitHub Copilot CLI. Multiple review types: security, performance, code-quality, best-practices, architecture, testing, documentation, accessibility, comprehensive. Severity filtering: low, medium, high, critical. Output formats: markdown, json, text. Fix suggestions and priority ordering. File pattern exclusion and issue count limits.
  • brainstorm: Generates novel ideas using structured methods. Multiple frameworks: divergent, convergent, SCAMPER, design-thinking, lateral. Domain-specific context (software, business, creative, research, product, marketing). Configurable idea count and analysis depth. Packageincluding feasibility, impact, and innovation scores. Example: brainstorm prompt:"ways to improve code review process" domain:"software" methodology:"scamper".
  • ping: A simple test tool that echoes a message, used to verify whether the MCP connection is working. Example: /copilot:ping (MCP) "Hello from Copilot MCP!".
  • Help: Displays the CLI help text for GitHub Copilot. Automatically detects available CLI tools. Displays installation instructions if tools are missing.
  • version: Displays version information for all CLI tools and the MCP server. Reports GitHub Copilot CLI, Node.js, and MCP server versions. Includes installation commands for missing tools.
  • timeout-test: A test tool used to prevent timeouts. Runs for the specified duration (in milliseconds). Used to test long-running operations.

User slash commands (can be used directly in the Claude Code interface; compatibility with other clients has not been tested):

  • /analyze: Uses Copilot to analyze a file or directory, or to ask general questions. 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).
  • /review: Uses Copilot to perform a comprehensive code review. target (required): the file/directory to review (e.g., /review target:@src/ or /review target:@main.js). reviewType (optional): review type - security, performance, code-quality, etc.
  • /batch: Processes multiple tasks in batch mode. tasks (required): the array of tasks to process.
  • /help: Displays CLI help information for available tools.
  • /ping: Tests the connection with the serserver connection. message (optional): the message to echo.

Use cases: code review, refactoring, documentation writing, CI automation, batch processing, brainstorming, etc.

Limitations and notes: This is an unofficial third-party tool, not affiliated with, endorsed by, or sponsored by GitHub or Microsoft. Before use, ensure that Node.js (v18.0.0 or later) and GitHub Copilot CLI are installed. This server allows all tools in non-interactive mode by default. Compatibility of slash commands with other clients has not been tested. License: MIT License.

Up/Down to navigate · Enter to open · ESC to closeBrowse all tools