cyberrescue
A locally-hosted MCP (Model Context Protocol) server that gives Claude real tools to debug Docker containers — fetch logs, inspect memory/CPU, and run diagnostic commands inside a container, all from a chat with Claude Desktop.
README
🐋 CyberRescue
<p align="center"> <img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="License MIT"> <img src="https://img.shields.io/badge/Python-3.12%2B-brightgreen.svg" alt="Python 3.12+"> <img src="https://img.shields.io/badge/Built%20with-MCP-orange.svg" alt="Built with Model Context Protocol"> </p>
Give Claude eyes and hands inside your broken Docker containers.
📺 Live Triage Demonstration (33s)
<p align="center"> <img src="./assets/cyberrescue-demo.gif" width="100%" alt="CyberRescue Autonomous Debugging Loop Demo"> </p>
https://github.com/user-attachments/assets/0ee0f583-b8c1-4abe-9dd4-4b59ec25fd49
CyberRescue
A locally-hosted MCP (Model Context Protocol) server that gives Claude real tools to debug Docker containers — fetch logs, inspect memory/CPU, and run diagnostic commands inside a container, all from a chat with Claude Desktop.
What it does
CyberRescue exposes three tools to Claude:
stream_container_logs— fetch stdout/stderr logs from a container by ID or name (tail, since-timestamp, keyword filter; 50KB hard cap with truncation flag).inspect_memory_dump— live CPU/memory snapshot viadocker stats, plus top processes viaps aux --sort=-%mem.execute_isolated_script— run a shell command inside a container viadocker exec, with input validation, a command blocklist, and a hard asyncio timeout.
Everything runs locally over stdio — no network ports, no cloud service, no API keys beyond what you already use for Claude Desktop.
Requirements
- macOS (Apple Silicon) or Windows 10/11 with WSL2
- Docker Desktop (running)
- uv (Python package/project manager)
- Claude Desktop
Setup — macOS
1. System tools
xcode-select --install
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
brew install git
curl -LsSf https://astral.sh/uv/install.sh | sh
brew install --cask docker
Open Docker Desktop from Applications and let it finish starting (steady whale icon in the menu bar). Then install Claude Desktop from claude.ai → Download for Mac.
2. Clone and install
git clone https://github.com/vivekpatil200320/cyberrescue.git
cd cyberrescue
uv sync
3. Verify
uv run python -c "from cyberrescue.server import mcp; print('OK:', mcp.name)"
uv run pytest tests/ -v
4. Register with Claude Desktop
Find your uv path:
which uv
Edit (or create) ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"cyberrescue": {
"command": "/Users/YOUR_USERNAME/.local/bin/uv",
"args": [
"run",
"--project",
"/Users/YOUR_USERNAME/path/to/cyberrescue",
"python",
"-m",
"cyberrescue.server"
]
}
}
}
If the file already has other mcpServers entries, merge "cyberrescue" in as an additional key rather than overwriting the file.
Fully quit Claude Desktop (Cmd+Q) and reopen it. Check the tools/slider icon near the message box — cyberrescue should appear with all three tools listed.
Setup — Windows (via WSL2)
WSL2 is the recommended path because Docker Desktop for Windows runs its Linux containers through it, and python-on-whales/docker exec behave most predictably there.
1. Install WSL2 and Ubuntu
In an Administrator PowerShell:
wsl --install
Restart if prompted, then open the new "Ubuntu" app from the Start menu and finish the Linux user setup.
2. Install Docker Desktop for Windows
Download from docker.com, install, and during setup enable "Use WSL 2 based engine". In Docker Desktop settings, under Resources → WSL Integration, enable integration with your Ubuntu distro.
3. Inside the WSL Ubuntu terminal — install tooling
sudo apt update
sudo apt install -y git python3 build-essential
curl -LsSf https://astral.sh/uv/install.sh | sh
source ~/.bashrc
4. Clone and install
git clone https://github.com/vivekpatil200320/cyberrescue.git
cd cyberrescue
uv sync
5. Verify
uv run python -c "from cyberrescue.server import mcp; print('OK:', mcp.name)"
uv run pytest tests/ -v
docker ps -a
(docker ps should work inside WSL once Docker Desktop's WSL integration is enabled.)
6. Install Claude Desktop (native Windows)
Download from claude.ai → Download for Windows, install normally (not inside WSL).
7. Register with Claude Desktop
Find your uv path inside WSL:
which uv
Edit %APPDATA%\Claude\claude_desktop_config.json (open via File Explorer: paste %APPDATA%\Claude into the address bar) and add an entry that runs the server through WSL:
{
"mcpServers": {
"cyberrescue": {
"command": "wsl.exe",
"args": [
"bash",
"-c",
"cd /home/YOUR_LINUX_USERNAME/cyberrescue && /home/YOUR_LINUX_USERNAME/.local/bin/uv run python -m cyberrescue.server"
]
}
}
}
Replace YOUR_LINUX_USERNAME and the path with your actual WSL username and clone location. Fully quit Claude Desktop and reopen it. Check the tools/slider icon — cyberrescue should appear with all three tools.
Usage
Ask Claude Desktop something like:
Debug the container named
my-app: read the last 150 log lines, check its memory and CPU usage, and runprintenv DATABASE_URLinside it.
Claude will call the three tools as needed and report back root cause and fix.
Demo containers
demo/ contains three intentionally broken images for testing:
broken_flask— crashes on startup with a missing-env-varKeyErrorleaking_node— leaks ~10MB/sec until OOM-killedcrashed_nginx— fails to start due to invalid config syntax
docker build -t demo-broken-flask demo/broken_flask
docker build -t demo-leaking-node demo/leaking_node
docker build -t demo-crashed-nginx demo/crashed_nginx
Security
See SECURITY.md for the input validation, command blocklist, and concurrency/sanitization policy.
Future Enhancements
- Standalone binary packaging (PyInstaller/Nuitka) for zero-Python-install distribution
- Streaming log reads for very large logs (currently buffers full log before truncating)
- Optional SQLite audit log for compliance use cases
- Native (non-WSL) Windows support
License
MIT License
Copyright (c) 2026 Vivek Patil
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。