copilot-status-mcp
MCP server to check GitHub Copilot quota, rate-limit status, and reset times from any MCP client.
README
copilot-status-mcp
Check your GitHub Copilot quota and rate-limit status from Claude Code, Copilot, or any MCP client.
copilot-status-mcp solves a visibility problem: when Copilot blocks your request with "You've hit
your rate limit", you know you're blocked — but not for how long, how close you were before it
happened, or what your monthly quota looks like. This package exposes all of that as a CLI command
and MCP tool.
claude mcp add --scope user copilot-status-mcp -- npx -y copilot-status-mcp --mcp
Features
- Detects active rate limits and shows the exact reset time (5-hour session and weekly windows).
- Shows window usage percentage when available (server sends it above 50% used).
- Reports monthly quota for chat, completions, and premium model interactions.
- Works for free and paid Copilot plans.
--prettyflag for a readable terminal summary.- Exposes a single MCP tool:
get_copilot_status. - Does not read, store, log, or print your Copilot access token.
Quick Start
Print your current Copilot status in the terminal:
npx copilot-status-mcp
Pretty-print for humans:
npx copilot-status-mcp --pretty
Add to Claude Code:
claude mcp add --scope user copilot-status-mcp -- npx -y copilot-status-mcp --mcp
Then ask:
What is my current Copilot quota?
Am I rate limited on Copilot right now?
Requirements
- Node.js 18 or newer.
- One of the following for full support (session + weekly rate limits):
- JetBrains Copilot plugin installed and authenticated
- GitHub Copilot CLI:
npm install -g @github/copilot && copilot auth login GITHUB_COPILOT_TOKENenv var set to a Copilot-issued OAuth token
- For monthly quota only:
ghCLI authenticated, orGITHUB_TOKENenv var set.
CLI Usage
Default — JSON output
npx copilot-status-mcp
Example output:
{
"source": "copilot-status-mcp",
"tokenSource": "apps.json",
"account": {
"plan": "individual",
"sku": "yearly_subscriber_quota"
},
"shortTermRateLimit": {
"rateLimited": false,
"session": {
"percentUsed": 64.7,
"percentRemaining": 35.3,
"entitlement": 0,
"resetsAt": "2026-06-01T16:29:39.000Z"
},
"weekly": {
"percentUsed": 55.1,
"percentRemaining": 44.9,
"entitlement": 0,
"resetsAt": "2026-06-08T00:00:00.000Z"
},
"probeAvailable": true
},
"monthlyQuota": {
"resetsAt": "2026-07-01T00:00:00.000Z",
"chat": { "unlimited": true, "percentRemaining": 100 },
"completions": { "unlimited": true, "percentRemaining": 100 },
"premiumInteractions": { "remaining": 299, "entitlement": 300, "percentRemaining": 99.6 }
}
}
When rate limited:
{
"shortTermRateLimit": {
"rateLimited": true,
"sessionResetsAt": "2026-06-08T00:00:00.000Z",
"sessionRetryAfterSecs": 310852,
"limitKey": "global-usage-weekly-key",
"probeAvailable": true
}
}
Pretty output
npx copilot-status-mcp --pretty
━━━ Account ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Plan: individual
SKU: yearly_subscriber_quota
Token source: apps.json
━━━ Short-Term Rate Limit ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✅ Not rate limited
5h session: 64.7% used [█████████████░░░░░░░] 35.3% remaining
Session resets at: 2026-06-01T16:29:39.000Z (in 2h 40m)
Weekly: 55.1% used [███████████░░░░░░░░░] 44.9% remaining
Weekly resets at: 2026-06-08T00:00:00.000Z (in 154h 11m)
━━━ Monthly Quota ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Chat: unlimited (100.0% remaining)
Completions: unlimited (100.0% remaining)
Premium models: 299 / 300 (99.6% remaining)
Monthly resets at: 2026-07-01T00:00:00.000Z
Monthly resets in: 706h 11m
All flags
npx copilot-status-mcp [options]
Options:
--pretty Human-readable summary instead of JSON.
--include-login Include GitHub login in output.
--timeout-ms <ms> Timeout for API requests (default: 15000).
--mcp Run as an MCP stdio server.
--help, -h Show help.
MCP Setup
The MCP server exposes one tool: get_copilot_status.
It returns the same JSON as the CLI. Optional arguments:
{
"timeoutMs": 15000,
"includeLogin": false
}
Claude Code
claude mcp add --scope user copilot-status-mcp -- npx -y copilot-status-mcp --mcp
Verify:
claude mcp list
claude mcp get copilot-status-mcp
Equivalent MCP JSON:
{
"mcpServers": {
"copilot-status-mcp": {
"command": "npx",
"args": ["-y", "copilot-status-mcp", "--mcp"]
}
}
}
Other MCP Clients
{
"mcpServers": {
"copilot-status-mcp": {
"command": "npx",
"args": ["-y", "copilot-status-mcp", "--mcp"]
}
}
}
How It Works
Token resolution
Short-term rate limit probe requires a Copilot-specific OAuth token:
GITHUB_COPILOT_TOKEN env var
└─ ~/.config/github-copilot/apps.json (written by JetBrains / Copilot CLI)
Monthly quota works with any GitHub token:
GITHUB_COPILOT_TOKEN env var
└─ ~/.config/github-copilot/apps.json
└─ GITHUB_TOKEN env var
└─ `gh auth token`
What gets called
GET https://api.github.com/copilot_internal/v2/token
→ exchange OAuth token for a short-lived CAPI session token
POST https://api.individual.githubcopilot.com/chat/completions
max_tokens=1, model=gpt-5-mini
→ 200: not rate limited; response headers carry window usage %
→ 429: rate limited; retry-after header carries seconds until reset
GET https://api.github.com/copilot_internal/user
→ monthly quota snapshots and reset date
Rate limit windows
GitHub Copilot enforces two rolling windows on top of the monthly quota:
| Window | Key | Resets |
|---|---|---|
| Session | global-usage-5-hour-key |
Rolling 5 hours |
| Weekly | global-usage-weekly-key |
Every Monday 00:00 UTC |
Window usage percentage is only returned by the server above the 50% threshold. Below 50%, the response only confirms you are not rate limited.
Local Checkout Setup
npm install
npm run build
node dist/cli.js
node dist/cli.js --pretty
node dist/cli.js --mcp
From TypeScript directly:
npx tsx src/cli.ts
npx tsx src/cli.ts --pretty
Claude Code from local checkout
claude mcp add --scope user copilot-status-mcp -- node /absolute/path/to/copilot-status-mcp/dist/cli.js --mcp
Development
npm install # install dependencies
npm run status # print status from TypeScript
npm run status:pretty # pretty output from TypeScript
npm run dev # run MCP server from TypeScript
npm run build # compile to dist/
npm run typecheck # type-check without emitting
npm pack --dry-run # preview npm package contents
Troubleshooting
No short-term rate limit data
The tool falls back to monthly-quota-only mode when no Copilot OAuth token is found. Install one of:
- JetBrains Copilot plugin (authenticates automatically)
- Copilot CLI:
npm install -g @github/copilot && copilot auth login - Set
GITHUB_COPILOT_TOKENmanually
probeAvailable: false in output
Same as above — no Copilot session token was available for the CAPI probe.
MCP tool does not show up
Restart Claude Code or your MCP client after adding the server.
Timeout errors
Increase the timeout:
{ "timeoutMs": 30000 }
Security Notes
- OAuth tokens are read from environment variables or local config files and are never printed, logged, or stored beyond the lifetime of the request.
- The CAPI probe uses a single minimal chat request (
max_tokens: 1) solely to read response headers. The response content is discarded. - GitHub login is omitted from output by default; use
--include-loginonly when needed.
License
MIT
Made with ❤️ by Dmytro Vakulenko, 2026
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。