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
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。