npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@kud/mcp-github-copilot

v1.0.2

Published

MCP server for GitHub Copilot — query any Copilot model programmatically via the official SDK.

Downloads

173

Readme

 ██████╗ ██╗████████╗██╗  ██╗██╗   ██╗██████╗      ██████╗ ██████╗ ██████╗ ██╗██╗      ██████╗ ████████╗
██╔════╝ ██║╚══██╔══╝██║  ██║██║   ██║██╔══██╗    ██╔════╝██╔═══██╗██╔══██╗██║██║     ██╔═══██╗╚══██╔══╝
██║  ███╗██║   ██║   ███████║██║   ██║██████╔╝    ██║     ██║   ██║██████╔╝██║██║     ██║   ██║   ██║
██║   ██║██║   ██║   ██╔══██║██║   ██║██╔══██╗    ██║     ██║   ██║██╔═══╝ ██║██║     ██║   ██║   ██║
╚██████╔╝██║   ██║   ██║  ██║╚██████╔╝██████╔╝    ╚██████╗╚██████╔╝██║     ██║███████╗╚██████╔╝   ██║
 ╚═════╝ ╚═╝   ╚═╝   ╚═╝  ╚═╝ ╚═════╝ ╚═════╝      ╚═════╝ ╚═════╝╚═╝     ╚═╝╚══════╝ ╚═════╝    ╚═╝

TypeScript Node.js MCP npm License

Query any GitHub Copilot model from your AI assistant — no extra API key required.

FeaturesQuick StartInstallationToolsDevelopment


Features

  • 🤖 Query any Copilot model — Claude, GPT-5, Codex, and more via the official @github/copilot-sdk
  • 🔍 Discover models — list all available models with capabilities, context limits, and billing multipliers
  • 🚀 Zero extra config — uses your existing GitHub Copilot CLI credentials automatically
  • 🖼️ Image attachments — attach files or base64 images for vision-capable models
  • Modern Stack — TypeScript 5+, ESM, Zod schemas, MCP 1.27
  • 📦 MCP Protocol — native integration with Claude Desktop, Claude Code CLI, Cursor, and more

Quick Start

Prerequisites

  • Node.js 20+
  • GitHub Copilot subscription

The @github/copilot CLI is bundled as a dependency — nothing extra to install. On first run it will open a browser to authenticate automatically, or you can pass a GITHUB_TOKEN env var to skip the prompt.

Install

npm install -g @kud/mcp-github-copilot

Minimal Claude Code config

github-copilot:
  transport: stdio
  command: npx
  args:
    - -y
    - "@kud/mcp-github-copilot"

Installation

claude mcp add --transport stdio --scope user github-copilot \
  -- npx --yes @kud/mcp-github-copilot@latest

Verify: claude mcp list should show github-copilot

Edit ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "github-copilot": {
      "command": "npx",
      "args": ["--yes", "@kud/mcp-github-copilot@latest"]
    }
  }
}

Restart Claude Desktop.

Edit %APPDATA%\Claude\claude_desktop_config.json:

{
  "mcpServers": {
    "github-copilot": {
      "command": "npx",
      "args": ["--yes", "@kud/mcp-github-copilot@latest"]
    }
  }
}

Restart Claude Desktop.

In Cursor settings → MCP → Add server:

{
  "github-copilot": {
    "command": "npx",
    "args": ["--yes", "@kud/mcp-github-copilot@latest"]
  }
}

Edit ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "github-copilot": {
      "command": "npx",
      "args": ["--yes", "@kud/mcp-github-copilot@latest"]
    }
  }
}

Edit .vscode/mcp.json in your workspace:

{
  "servers": {
    "github-copilot": {
      "type": "stdio",
      "command": "npx",
      "args": ["--yes", "@kud/mcp-github-copilot@latest"]
    }
  }
}

Available Tools

Querying

| Tool | Description | | ------- | ----------------------------------------------------------------------------------------------------------------------- | | query | Send a prompt to a Copilot model and return the response. Supports optional model selection and file/image attachments. |

Discovery

| Tool | Description | | ------------- | ---------------------------------------------------------------------------------------------------- | | list_models | List all available Copilot models with capabilities, context window limits, and billing multipliers. |

Total: 2 Tools


Image Attachments

The query tool accepts an optional attachments array for vision-capable models (Claude, GPT-5+):

File attachment — reads from disk:

{
  "type": "file",
  "path": "/absolute/path/to/screenshot.png"
}

Blob attachment — inline base64 data:

{
  "type": "blob",
  "data": "<base64-encoded-content>",
  "mimeType": "image/png"
}

Both support an optional displayName field.


Example Conversations

"What Copilot models do I have access to?" → Calls list_models, returns all models with context limits and pricing.

"Ask GPT-5 to explain the difference between TCP and UDP." → Calls query with model: "gpt-5".

"Use Claude Sonnet to review this code and suggest improvements." → Calls query with model: "claude-sonnet-4.6" and the code as the prompt.

"What's in this screenshot?" → Calls query with a blob attachment containing the image.

"Get a second opinion from Codex on this algorithm." → Calls query with model: "gpt-5.3-codex".


Development

Project structure

mcp-github-copilot/
├── src/
│   └── index.ts        # MCP server — all tools in one file
├── dist/               # Compiled output (generated)
├── package.json
├── tsconfig.json
└── README.md

Scripts

| Script | Description | | --------------------- | --------------------------------------- | | npm run build | Compile TypeScript to dist/ | | npm run build:watch | Watch mode | | npm run dev | Run directly via tsx (no build needed) | | npm test | Run tests | | npm run test:watch | Watch mode tests | | npm run coverage | Test coverage report | | npm run inspect | Open MCP Inspector against built server | | npm run inspect:dev | Open MCP Inspector via tsx | | npm run typecheck | Type-check without emitting | | npm run clean | Remove dist/ |

Dev workflow

git clone https://github.com/kud/mcp-github-copilot.git
cd mcp-github-copilot
npm install
npm run build
npm test

Use the MCP Inspector to test tools interactively:

npm run inspect
# Opens http://localhost:5173

How it works

This MCP server bridges your AI assistant and GitHub Copilot via the official @github/copilot-sdk:

  1. On startup, it spawns the Copilot CLI server and connects via JSON-RPC over stdio
  2. Each query call creates a fresh Copilot session, sends the prompt (with optional attachments), collects the response, then disconnects
  3. list_models queries the CLI for available models — results are cached automatically to avoid rate limiting
  4. Authentication is handled entirely by the Copilot CLI — log in once with gh auth login and this MCP inherits it

Troubleshooting

Server not showing in the MCP list

  • Ensure the Copilot CLI extension is installed: gh extension list
  • Check Node.js version: node --version (must be ≥ 20)
  • Try running manually: npx @kud/mcp-github-copilot

Authentication errors

  • Delete any cached auth state and let the CLI re-authenticate via browser on next run
  • Or set GITHUB_TOKEN in your MCP server config to authenticate without a browser prompt

"Model not found" errors

  • Use list_models to see your available models — only models enabled on your subscription will appear

MCP Inspector logs

npm run inspect

Security best practices

  • ✅ No extra API keys — the bundled CLI handles auth via browser OAuth or GITHUB_TOKEN
  • ✅ Never commit .mcp.json (gitignored by default)
  • ✅ Use GITHUB_TOKEN in the MCP server env to avoid interactive browser prompts

Tech Stack

| | | | ----------------- | --------------------------------- | | Runtime | Node.js ≥ 20 | | Language | TypeScript 5+ (ESM) | | Protocol | Model Context Protocol (MCP) 1.27 | | Copilot SDK | @github/copilot-sdk | | Schema | Zod | | Tests | Vitest | | Module System | ESM ("type": "module") |


Contributing

  1. Fork the repo
  2. Create a branch: git checkout -b feat/my-change
  3. Make your changes and add tests
  4. Run npm run build && npm test
  5. Open a pull request

License

MIT — see LICENSE.


Acknowledgments

Built on top of the official GitHub Copilot SDK and the Model Context Protocol by Anthropic.


Resources


Support


Made with ❤️ for GitHub Copilot users

⭐ Star this repo if it's useful to you · ↑ Back to top