Get the FREE Ultimate OpenClaw Setup Guide →

integrate -with-copilot

Learn how to use MCP Servers with GitHub Copilot

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio skills-integrate-mcp-with-copilot node server.js \
  --env COPILOT_TOKEN="your-copilot-token-placeholder" \
  --env GITHUB_ORG_OR_USER="your-github-organization-or-username" \
  --env MCP_WEBSOCKET_PORT="3000"

How to use

This MCP server is designed to extend GitHub Copilot by adding a dedicated MCP endpoint that Copilot can interact with as part of an enhanced development workflow. The server exposes capabilities for researching similar projects, opening and managing issues, and proposing or implementing pull requests within a workspace that uses Copilot Agent Mode. With proper wiring, Copilot can delegate tasks to the MCP server, fetch context about issues, and simulate an end-to-end workflow from idea to PR.

To use it, start the MCP server using your preferred runtime (Node in this setup) and ensure Copilot is configured to communicate with the MCP endpoint. Once running, Copilot can invoke the server’s commands to:

  • Discover related projects or issues and pull relevant context into the Copilot session.
  • Create, comment on, or close issues based on Copilot’s suggestions.
  • Propose changes and initiate a pull request workflow by coordinating between Copilot’s generated code and the MCP server’s issue/PR actions.

Note: This integration relies on the Copilot Agent Mode workflow and assumes you have appropriate permissions on the target GitHub repository. You may need to adapt the interaction prompts to ensure Copilot’s outputs map cleanly to actions on issues and PRs.

How to install

Prerequisites:

  • Node.js (LTS) installed on your system
  • npm or pnpm as a package manager
  • Access to a GitHub repository where Copilot is enabled
  • Basic familiarity with the Copilot Agent Mode workflow
  1. Clone the MCP integration repository (or create a new project folder for the MCP server): git clone https://github.com/skills/integrate-mcp-with-copilot.git cd integrate-mcp-with-copilot

  2. Install dependencies: npm install

    or if you prefer yarn

    yarn install

  3. Configure environment variables and endpoints:

    • Create a .env file (or set environment variables in your runtime): COPILOT_TOKEN=your-copilot-token-placeholder GITHUB_ORG_OR_USER=your-github-organization-or-username MCP_WEBSOCKET_PORT=3000
  4. Run the MCP server: node server.js

  5. Connect Copilot to the MCP endpoint:

    • Ensure Copilot is set to communicate with the MCP server’s address/port (e.g., ws://localhost:3000 or http://localhost:3000 depending on your setup).
    • Enable Copilot Agent Mode in your project and point it to the MCP server for enhanced tooling.
  6. Verify:

    • Check the server logs for a successful startup message.
    • In Copilot, attempt a test task that requires research or issue/PR actions and confirm the MCP server responds with appropriate results.

Additional notes

Tips and common issues:

  • If Copilot cannot reach the MCP endpoint, verify network access and that the MCP server is listening on the configured port.
  • Ensure you have the necessary permissions on the GitHub repository for creating or commenting on issues and opening PRs.
  • Use descriptive prompts in Copilot to guide the MCP server in performing research or issue/PR workflows.
  • Secure your COPILOT_TOKEN and other sensitive values; avoid hard-coding them in public repositories.
  • You can scale the MCP server by running multiple instances behind a load balancer if you expect concurrent Copilot interactions.
  • If you encounter protocol mismatch, confirm whether the MCP endpoint uses WebSocket or HTTP polling and adjust client configuration accordingly.

Related MCP Servers

Sponsor this space

Reach thousands of developers