
Proxy Doctor
io.github.Jiansen由 GitHub 账号 Jiansen 发布v0.2.1更新于 Oct 24, 2026
Diagnose proxy misconfigurations that break AI coding tools (Cursor, VS Code, Windsurf)
概览
本地 MCP 服务器,用于诊断导致 Cursor、VS Code、Windsurf 等 AI 编程编辑器无法联网的 macOS 代理配置错误。
- 可以做什么
- 针对指定编辑器执行五层代理诊断,涵盖系统代理设置、残留值、端口健康、编辑器配置和 GUI 环境变量,并给出证据与根本原因。列出建议的修复项及其命令和风险等级,并列出支持的编辑器。默认只读,仅展示修复而不执行。
- 适用场景
- 当浏览器能正常上网,但 Cursor、VS Code 或 Windsurf 的 AI 功能失败、超时或卡住,且怀疑是失效或缓冲的代理、已关闭的 VPN 应用或残留的代理环境变量时使用。
- 运行要求
- 以本地 Python 进程运行;需安装带 MCP 附加组件的包,并在 MCP 配置中指向安装该包的 Python 解释器。完整检查需要 macOS;Linux 仅部分支持,Windows 不支持。未声明需要账号、API 密钥或环境变量。
安装
在 SourceWeft 中
- 打开 控制台中的 Proxy Doctor,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
proxy-doctor
[PyPI] [License] [Platform] [Python] [GitHub Stars]
Diagnose proxy misconfigurations that break AI coding tools.
When your browser works fine but Cursor / VS Code / Windsurf AI features don't — proxy-doctor tells you exactly why and how to fix it.
The Problem
AI coding tools (Cursor, VS Code with Copilot, Windsurf) rely on long-lived streaming connections (SSE/HTTP2) that break when:
- Your system proxy points to a localhost port where nothing is listening
- A VPN/proxy app was closed but its settings linger in macOS system preferences
- Your editor inherited stale proxy environment variables from
launchctl - The proxy is running but buffers streaming responses, breaking AI completions
The result: "browser works, AI editor doesn't" — the most common and frustrating developer experience.
What It Checks
proxy-doctor inspects 5 layers of your macOS proxy configuration:
Quick Start
CLI
As an MCP Tool (for AI agents)
proxy-doctor ships as an MCP server that AI agents can call directly:
Add to your MCP configuration (e.g., Cursor ~/.cursor/mcp.json):
Note:
"command"must point to the Python whereproxy-doctor[mcp]is installed. Ifpython3doesn't work, use the full path (runwhich python3orpython3 -c "import sys; print(sys.executable)"to find it).
Your AI agent can then call:
diagnose_proxy(editor="cursor")— full 5-layer diagnosis with evidencelist_fixes(editor="cursor")— recommended fixes with executable commandssupported_editors()— list available editors
For AI Agents: Quick Install
One-liner (paste this to your AI agent):
Install proxy-doctor (
pip install proxy-doctor[mcp]) and add it to your MCP config with commandpython -m proxy_doctor.mcp_server. Then use thediagnose_proxytool to check proxy health.
If you are an AI agent setting up proxy-doctor for your user:
Daemon Mode (v0.2+)
Run proxy-doctor as a persistent background service with automatic health monitoring:
The daemon runs every 5 minutes, compares results with the previous check, and sends a macOS notification when status changes (e.g. healthy → unhealthy).
Menu Bar (SwiftBar)
Shows a green/red/orange indicator in your menu bar with one-click diagnosis.
Example Output
Unhealthy (Case A: dead proxy port)
Healthy
Supported Editors
How It Works
proxy-doctor identifies three failure patterns:
Case A — Dead proxy port (high confidence): Your system or editor points to 127.0.0.1:port but nothing is listening. This happens when a VPN/proxy app is closed but its settings remain.
Case B — Streaming broken (medium confidence): A proxy is running, but it buffers SSE/streaming connections that AI editors depend on. Common with browser-only proxy modes.
Case C — Path mismatch (medium confidence): Browser and editor use different proxy paths. Browser works via a dedicated proxy route; editor inherits a stale or incompatible one.
Platform Support
- macOS: Full support (system proxy, launchctl, networksetup)
- Linux: Partial (editor config + environment variables; no networksetup)
- Windows: Not yet supported
Trust & Permissions
proxy-doctor follows a read-only by default design. No system changes are made unless you explicitly opt in.
Default Behavior (read-only)
Opt-in Fix Application
proxy-doctor fix shows the recommended commands but does not execute them.
To apply fixes, use proxy-doctor fix --apply:
- Each fix is shown with its command and risk level
- You are prompted individually for each fix (
[y/N]) - Default is No — nothing runs unless you type
y - You can abort at any time with Ctrl+C
This two-step model lets AI agents safely call list_fixes() via MCP to see what needs fixing, then present the commands to users for approval.
Feedback
Found a bug? Have a suggestion? Diagnosis didn't help?
- GitHub Issues: https://github.com/Jiansen/proxy-doctor/issues/new
- For AI agents: The JSON output includes a
feedback.report_issueURL — include the full JSON when filing issues.
For AI agents providing feedback programmatically (zero dependencies):
Development
If proxy-doctor helped you fix a proxy issue, consider giving it a star on GitHub — it helps others discover the tool.
License
MIT
来源:README.md,提交 0b3d386
工具
0版本历史
1- v0.2.1最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分