Copilot Usage MCP Server

Local setup required. This server has to be cloned and prepared on your machine before you register it in Claude Code.
1

Set the server up locally

Run this once to clone and prepare the server before adding it to Claude Code.

Run in terminal
npm install
npm run build
2

Register it in Claude Code

After the local setup is done, run this command to point Claude Code at the built server.

Run in terminal
claude mcp add -e "GITHUB_TOKEN=${GITHUB_TOKEN}" copilot-usage -- node "<FULL_PATH_TO_COPILOT_USAGE_MCP>/dist/index.js"

Replace <FULL_PATH_TO_COPILOT_USAGE_MCP>/dist/index.js with the actual folder you prepared in step 1.

Required:GITHUB_TOKEN+ 3 optional
README.md

Retrieve GitHub Copilot usage metrics and seat assignment data.

copilot-usage-mcp

GitHub Copilot の利用状況メトリクスを取得する MCP (Model Context Protocol) サーバーです。

Enterprise、Organization、Team レベルでの Copilot 使用状況データを MCP ツールとして提供します。

提供ツール

ツール名 説明
get_copilot_metrics_for_enterprise Enterprise 全体の日次 Copilot 利用メトリクス
get_copilot_metrics_for_org Organization の日次 Copilot 利用メトリクス
get_copilot_metrics_for_team Team の日次 Copilot 利用メトリクス
get_copilot_seat_assignments Organization の Copilot シート割り当て情報
get_copilot_usage_summary Enterprise / Org / Seats の統合サマリー

各ツールは、コード補完数・Chat 利用状況・アクティブユーザー数・言語 / エディタ別の内訳などを取得できます。

セットアップ

前提条件

  • Node.js 18+
  • GitHub Personal Access Token(Copilot メトリクス API へのアクセス権限が必要)

インストール

npm install
npm run build

環境変数

.env ファイルまたは環境変数で以下を設定してください。

変数名 必須 説明
GITHUB_TOKEN Yes GitHub Personal Access Token
GITHUB_ENTERPRISE No Enterprise slug
GITHUB_ORG No Organization 名
CACHE_DIR No キャッシュディレクトリ(デフォルト: ./cache

MCP クライアントへの設定

Claude Desktop の場合、claude_desktop_config.json に以下を追加します。

{
  "mcpServers": {
    "copilot-usage": {
      "command": "node",
      "args": ["path/to/copilot-usage-mcp/dist/index.js"],
      "env": {
        "GITHUB_TOKEN": "ghp_xxxxxxxxxxxx",
        "GITHUB_ENTERPRISE": "your-enterprise",
        "GITHUB_ORG": "your-org"
      }
    }
  }
}

開発

# TypeScript のウォッチモードで開発
npm run dev

# テスト実行
npm test

# テストのウォッチモード
npm run test:watch

ライセンス

MIT

Tools (5)

get_copilot_metrics_for_enterpriseRetrieves daily Copilot usage metrics for the entire Enterprise.
get_copilot_metrics_for_orgRetrieves daily Copilot usage metrics for a specific Organization.
get_copilot_metrics_for_teamRetrieves daily Copilot usage metrics for a specific Team.
get_copilot_seat_assignmentsRetrieves Copilot seat assignment information for an Organization.
get_copilot_usage_summaryRetrieves an integrated summary of Enterprise, Organization, and seat usage.

Environment Variables

GITHUB_TOKENrequiredGitHub Personal Access Token with Copilot metrics API access
GITHUB_ENTERPRISEEnterprise slug
GITHUB_ORGOrganization name
CACHE_DIRDirectory for caching data

Configuration

claude_desktop_config.json
{"mcpServers": {"copilot-usage": {"command": "node", "args": ["path/to/copilot-usage-mcp/dist/index.js"], "env": {"GITHUB_TOKEN": "ghp_xxxxxxxxxxxx", "GITHUB_ENTERPRISE": "your-enterprise", "GITHUB_ORG": "your-org"}}}}

Try it

What are the daily Copilot usage metrics for my organization?
Show me the current Copilot seat assignments for my organization.
Can you provide a summary of our enterprise Copilot usage and active user counts?
Get the Copilot usage metrics for the engineering team.

Frequently Asked Questions

What are the key features of Copilot Usage?

Retrieves daily Copilot usage metrics at Enterprise, Organization, and Team levels. Provides seat assignment data for organizations. Supports breakdown of usage by language and editor. Includes active user counts and chat activity metrics. Offers an integrated summary of usage across the organization.

What can I use Copilot Usage for?

Monitoring Copilot adoption rates across different engineering teams. Auditing seat assignments to optimize GitHub Copilot license costs. Analyzing developer engagement with Copilot chat and code completion features. Reporting on Copilot usage trends for enterprise management.

How do I install Copilot Usage?

Install Copilot Usage by running: npm install && npm run build

What MCP clients work with Copilot Usage?

Copilot Usage works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Copilot Usage docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare