Copilot Leecher
An MCP server that enables users to review and refine AI outputs through a local web UI, returning feedback as free tool call results to save on GitHub Copilot premium requests. It allows for multiple rounds of iterative improvements within a single request session.
README
๐ง Copilot Leecher
English | ไธญๆ
Squeeze every drop out of your GitHub Copilot premium requests โ turn follow-up prompts into free MCP tool calls.
Why This Exists
GitHub Copilot charges by premium requests (300/month on Pro; each Claude Opus 4.6 call costs 3 requests), not by tokens. Through experimentation, we discovered:
| Action | Costs a Premium Request? |
|---|---|
| New user prompt | โ Yes |
| Follow-up in the same session | โ Yes |
| Tool call / MCP call | โ No |
So the most cost-effective way to use Copilot is: pack as much work as possible into a single premium request.
The problem? Humans rarely express everything perfectly in one shot. Follow-up questions ("wait, also do Xโฆ") are inevitable โ and each one burns another request.
Copilot Leecher solves this by providing a request_review MCP tool. When the agent finishes a task, it calls this tool and blocks โ waiting for your feedback via a local web UI. Your feedback is returned as a tool call result (free!), not a new user prompt. The agent then acts on your feedback within the same request.
One prompt โ review โ refine โ review โ approve. All for the price of a single premium request.
How It Works
You (1 prompt) Copilot Agent
โ โ
โโโโ "Implement feature X" โโโโโโโโโบ (works on itโฆ)
โ โ
โ request_review() โ โ MCP tool call (FREE)
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ Web UI (localhost:3456) โ
โ โ "Also handle edge case Y" โ โ your feedback
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ (improves workโฆ) โ
โ โ
โ request_review() โ โ still FREE
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ "ok" โ โ approved
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ โ
Done โโโโโโโโโโโโโโโโค
โ โ
Total premium requests used: 1
Quick Start
1. Install & Build
git clone https://github.com/user/copilot-leecher.git
cd copilot-leecher
npm install
npm run build
2. Configure VS Code
Add to your VS Code settings.json:
{
"github.copilot.chat.mcp.servers": {
"copilot-leecher": {
"command": "node",
"args": ["/absolute/path/to/copilot-leecher/dist/index.js"]
}
}
}
Replace the path with your actual absolute path.
3. Restart VS Code & Open Dashboard
Restart VS Code. The MCP server auto-starts an HTTP dashboard at http://127.0.0.1:3456.
4. Use It
In your Copilot Chat prompt or Agent Contract, instruct the agent:
After completing your work, call the request_review tool with a taskId and summary.
Wait for feedback. If approved, finish. Otherwise, improve and request review again.
Then open http://127.0.0.1:3456 to review and provide feedback.
Architecture
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ VS Code #1 โ โ VS Code #2 โ โ Browser โ
โ Copilot Agent โ โ Copilot Agent โ โ 127.0.0.1:3456 โ
โโโโโโโโโโฌโโโโโโโโโ โโโโโโโโโโฌโโโโโโโโโ โโโโโโโโโโฌโโโโโโโโโ
โ MCP โ MCP โ HTTP
โโโโโโผโโโโโ โโโโโโผโโโโโ โ
โMCP+HTTP โ โMCP only โ โ
โServer #1โ โServer #2โ โ
โ(:3456) โ โ(skipped)โ โ
โโโโโโฌโโโโโ โโโโโโฌโโโโโ โ
โโโโโโโโโโฌโโโโโโโโโโโโโ โ
โผ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ /tmp/copilot-reviewer-sessions/ โโโโโโโโโโโโโโโโ
โ (file-system persistence) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- The first MCP process binds port 3456 for the web dashboard.
- Subsequent instances skip the HTTP server but share session data via the filesystem.
MCP Tool: request_review
| Parameter | Type | Required | Description |
|---|---|---|---|
taskId |
string | โ | Unique task identifier (e.g. task-20260217-001) |
summary |
string | โ | Brief summary of work done (2-3 sentences) |
Returns: { status, feedback, sessionId, reviewerUrl }
status:"approved"or"needs_revision"feedback: The reviewer's text
HTTP API
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/sessions |
List all sessions |
| GET | /api/sessions/pending |
List pending sessions |
| GET | /api/sessions/:id |
Get session details |
| POST | /api/sessions/:id/feedback |
Submit feedback { "feedback": "..." } |
| GET | /api/health |
Health check |
Agent Contract Template
Add this to your prompt / system instructions:
After completing all tasks, you MUST call the `request_review` tool.
- taskId: a unique identifier for the task
- summary: 2-3 sentences describing what you did
Then wait for expert feedback:
- "ok" / "approved" / "lgtm" โ task complete, stop working
- anything else โ improve your work based on the feedback, then call request_review again
NEVER finish without an approved review.
<details> <summary><strong>Full Agent Contract Example (click to expand)</strong></summary>
# Agent Contract
## Review Requirements
### When to Request Review
After completing all task steps, you MUST call `request_review`.
### How to Call
- **taskId**: Use format `[type]-[date]-[seq]` (e.g. `feature-20260217-001`)
- **summary**: 2-3 sentences summarizing your work
### Handling Feedback
1. **Approved** ("ok" / "approved" / "lgtm"): Stop working, confirm completion
2. **Needs revision**: Read feedback, improve, call request_review again
3. **Timeout**: Inform user, offer to retry
### Rules
- โ NEVER finish without approved review
- โ NEVER skip the review step
- โ
Always request review after completing work
- โ
Keep improving until approved
</details>
Project Structure
src/
โโโ index.ts # MCP server entry (auto-starts HTTP server)
โโโ reviewer-server.ts # Express HTTP server + Web UI
โโโ types.ts # TypeScript type definitions
โโโ shared-state.ts # File-system-based session persistence
Development
npm run watch # watch mode
npm run dev # build + run MCP server
Troubleshooting
MCP Server won't connect?
Ensure an absolute path in settings.json and that dist/index.js exists. Check VS Code Output panel โ "MCP Server" logs.
Port 3456 in use?
A second MCP instance auto-skips HTTP startup. Sessions are shared via /tmp/copilot-reviewer-sessions/ โ one dashboard shows all.
Agent doesn't call request_review?
Make sure your Agent Contract / prompt explicitly requires it.
License
MIT
ไธญๆ่ฏดๆ
่ GitHub Copilot Premium Request ็พๆฏ็ๅคไฟญ็ฉๆณ โโ ๆ่ฟฝ้ฎๅๆๅ ่ดน็ MCP tool callใ
ไธบไปไนๅ่ฟไธช
GitHub Copilot ๆ premium request ๆฌกๆฐ่ฎก่ดน๏ผPro ๅฅ้คๆฏๆ 300 ๆฌก๏ผไธๆฌก Claude Opus 4.6 ่ฐ็จ็ฎ 3 ๆฌก๏ผ๏ผ่ไธๆฏๆ token ่ฎก่ดนใ็ป่ฟๅฎ้ช๏ผๆไปฌๅ็ฐ๏ผ
| ๆไฝ | ๆถ่ Premium Request๏ผ |
|---|---|
| ๆฐ็ user prompt | โ ๆฏ |
| ๅ session ไธญ็่ฟฝ้ฎ/ๅ็ปญๆ้ฎ | โ ๆฏ |
| Tool call / MCP ่ฐ็จ | โ ๅฆ |
ๆไปฅๆๅ็ฎ็็จๆณๆฏ๏ผ่ฎฉไธๆฌก premium request ๅๅฐฝๅฏ่ฝๅค็ไบๆ ใ
้ฎ้ขๆฏ๏ผไบบๅพ้พไธๆฌกๆงๆ้ๆฑ่กจ่พพๆธ ๆฅ๏ผ่ฟฝ้ฎๅจๆ้พๅ โโไฝๆฏๆฌก่ฟฝ้ฎ้ฝไผ้ขๅคๆถ่ไธไธช requestใ
Copilot Leecher ๆไพไบไธไธช request_review MCP toolใAgent ๅฎๆไปปๅกๅ่ฐ็จๆญคๅทฅๅ
ท๏ผ่ฟๅ
ฅ้ปๅก็ญๅพ
็ถๆ๏ผไฝ ๅจๆฌๅฐ Web UI ไธ็ปๅบๅ้ฆใๅ้ฆไปฅ tool call result๏ผๅ
่ดน๏ผ๏ผ็ๅฝขๅผ่ฟๅ็ป Agent๏ผ่ไธๆฏๆฐ็ user promptใAgent ๅจๅไธไธช request ๅ
็ปง็ปญๅทฅไฝใ
ไธๆฌก prompt โ ๅฎกๆฅ โ ๆน่ฟ โ ๅฎกๆฅ โ ้่ฟใๅ จ็จๅชๆถ่ไธไธช premium requestใ
็ฎๅๆฅ่ฏด๏ผ่ฟไธช MCP ๆๅก"้ช"ๅคงๆจกๅๆไฝ ไบๅฎไธ็่ฟฝ้ฎๅฝๆ tool call result ๆฅๅค็ใ
ๅทฅไฝๅ็
ไฝ (1 ๆก prompt) Copilot Agent
โ โ
โโโโ "ๅฎ็ฐๅ่ฝ X" โโโโโโโโโโโโโโโโโโบ ๏ผๅผๅงๅนฒๆดปโฆ๏ผ
โ โ
โ request_review() โ โ MCP tool call๏ผๅ
่ดน๏ผ
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ Web UI (localhost:3456) โ
โ โ "่พน็ๆ
ๅต Y ไนๅค็ไธไธ" โ โ ไฝ ็ๅ้ฆ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ ๏ผ็ปง็ปญๆน่ฟโฆ๏ผ โ
โ โ
โ request_review() โ โ ไป็ถๅ
่ดน
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ "ok" โ โ ้่ฟ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ โ
ๅฎๆ โโโโโโโโโโโโโโโโค
โ โ
ๆถ่็ premium request ๆปๆฐ: 1
ๅฟซ้ๅผๅง
1. ๅฎ่ฃ & ๆๅปบ
git clone https://github.com/user/copilot-leecher.git
cd copilot-leecher
npm install
npm run build
2. ้ ็ฝฎ VS Code
ๅจ settings.json ไธญๆทปๅ ๏ผ
{
"github.copilot.chat.mcp.servers": {
"copilot-leecher": {
"command": "node",
"args": ["/ไฝ ็็ปๅฏน่ทฏๅพ/copilot-leecher/dist/index.js"]
}
}
}
3. ้ๅฏ VS Code & ๆๅผ Dashboard
้ๅฏ VS Code ๅ๏ผMCP Server ไผ่ชๅจๅจ http://127.0.0.1:3456 ๅฏๅจ Web ๅฎกๆฅ็้ขใ
4. ไฝฟ็จ
ๅจ Copilot Chat ๆ็คบ่ฏๆ Agent Contract ไธญ๏ผๆ็คบ Agent๏ผ
ๅฎๆๆๆๅทฅไฝๅ๏ผ่ฐ็จ request_review ๅทฅๅ
ท๏ผ้ไธ taskId ๅๅทฅไฝๆ่ฆใ
็ญๅพ
ๅฎกๆฅๅ้ฆ๏ผ่ฅๅ้ฆไธบ "ok" / "approved"๏ผ็ปๆไปปๅก๏ผๅฆๅๆ นๆฎๅ้ฆๆน่ฟๅ้ๆฐ่ฏทๆฑๅฎกๆฅใ
ๆช้่ฟๅฎกๆฅไธๅพ็ปๆๅทฅไฝใ
็ถๅๆๅผ http://127.0.0.1:3456 ่ฟ่กๅฎกๆฅๅนถๆไบคๅ้ฆใ
Agent Contract ๆจกๆฟ
ๅฎๆๆๆไปปๅกๅ๏ผไฝ **ๅฟ
้กป**่ฐ็จ `request_review` tool๏ผ
- taskId: ไปปๅกๅฏไธๆ ่ฏ๏ผๅฆ feature-20260217-001๏ผ
- summary: 2-3 ๅฅ็ฎ่ฆๆ่ฟฐๅฎๆไบไปไน
็ถๅ็ญๅพ
ไธๅฎถๅ้ฆ๏ผ
- "ok" / "approved" / "lgtm" / "้่ฟ" โ ็ปๆๅทฅไฝ
- ๅ
ถไปๅ
ๅฎน โ ๆ นๆฎๅ้ฆๆน่ฟ๏ผ็ถๅๅๆฌก่ฐ็จ request_review
**้่ฆ๏ผๆช้่ฟๅฎกๆฅไธๅพ็ปๆๅทฅไฝ๏ผ**
<details> <summary><strong>ๅฎๆด Agent Contract ็คบไพ๏ผ็นๅปๅฑๅผ๏ผ</strong></summary>
# Agent Contract
## ๅฎกๆฅ่ฆๆฑ
### ไฝๆถ่ฏทๆฑๅฎกๆฅ
ๅฎๆๆๆไปปๅกๆญฅ้ชคๅ๏ผ**ๅฟ
้กป**่ฐ็จ `request_review`ใ
### ่ฐ็จๆนๅผ
- **taskId**: ๆ ผๅผ `[็ฑปๅ]-[ๆฅๆ]-[ๅบๅท]`๏ผๅฆ `feature-20260217-001`๏ผ
- **summary**: 2-3 ๅฅๆ่ฟฐไฝ ๅฎๆ็ๅทฅไฝ
### ๅ้ฆๅค็
1. **้่ฟ**๏ผ"ok" / "approved" / "lgtm" / "้่ฟ"๏ผ๏ผๅๆญขๅทฅไฝ๏ผ็กฎ่ฎคๅฎๆ
2. **้่ฆๆน่ฟ**๏ผ้
่ฏปๅ้ฆ๏ผๆน่ฟๅทฅไฝ๏ผๅๆฌก่ฐ็จ request_review
3. **่ถ
ๆถ**๏ผๅ็ฅ็จๆท๏ผ่ฏข้ฎๆฏๅฆ้ๆฐ่ฏทๆฑ
### ่งๅ
- โ ๆช็ปๅฎกๆฅ้่ฟไธๅพ็ปๆไปปๅก
- โ ไธๅพ่ทณ่ฟๅฎกๆฅๆญฅ้ชค
- โ
ๅฎๆๅทฅไฝๅ็ซๅณ่ฏทๆฑๅฎกๆฅ
- โ
ๆ็ปญๆน่ฟ็ดๅฐ่ทๆน
</details>
ๅธธ่ง้ฎ้ข
Q: MCP Server ๆ ๆณ่ฟๆฅ๏ผ
็กฎไฟ settings.json ไธญไฝฟ็จ็ปๅฏน่ทฏๅพ๏ผไธ dist/index.js ๅญๅจใๆฅ็ VS Code ่พๅบ้ขๆฟ โ "MCP Server" ๆฅๅฟใ
Q: ็ซฏๅฃ 3456 ่ขซๅ ็จ๏ผ
็ฌฌไบไธช MCP ๅฎไพไผ่ชๅจ่ทณ่ฟ HTTP ๅฏๅจใSession ้่ฟ /tmp/copilot-reviewer-sessions/ ๆไปถๅ
ฑไบซ๏ผๅไธไธช Dashboard ๅฏ่งๆๆๅฎไพ็ไผ่ฏใ
Q: Agent ไธ่ฐ็จ request_review๏ผ
ๆฃๆฅ Agent Contract ๆ็คบ่ฏไธญๆฏๅฆๆ็กฎ่ฆๆฑไบใ
่ฎธๅฏ่ฏ
MIT
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.