# 0xyg3n/claude-c2 architecture

> Architecture diagram of the GitHub repository 0xyg3n/claude-c2, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-15). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/0xyg3n/claude-c2
- Repository: https://github.com/0xyg3n/claude-c2

## Overview

Claude C2 is a remote-system control framework: an operator asks Claude for an action, the MCP server selects and routes work to connected agents, and agent results return through the server for presentation. The server is the central control and client-management layer; agents provide cross-platform command execution and system information. The README documents Windows, Linux, macOS, and Android deployment, while the sampled agent excerpts show command handling and reconnection behavior. The server implementation was not sampled, so internal routing details are represented only at the documented level.

Main entry points: [`src/server.js`](https://github.com/0xyg3n/claude-c2/blob/main/src/server.js) (MCP and WS server), [`agents/agent.py`](https://github.com/0xyg3n/claude-c2/blob/main/agents/agent.py) (Platform agent), [`clients/agent.py`](https://github.com/0xyg3n/claude-c2/blob/main/clients/agent.py) (Python client), [`clients/agent.js`](https://github.com/0xyg3n/claude-c2/blob/main/clients/agent.js) (Node.js client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Operator interface"]
  node_claude["Claude AI"]
end

subgraph group_control["Control server"]
  node_mcp_server["MCP and WS server<br/>[server.js]"]
end

subgraph group_agents["Remote agents"]
  node_python_client["Python client<br/>[agent.py]"]
  node_js_client["Node.js client<br/>[agent.js]"]
  node_platform_agent["Platform agent<br/>[agent.py]"]
end

subgraph group_deployment["Agent deployment"]
  node_platform_bootstrap["Platform bootstrap<br/>[linux.sh]"]
  node_termux_guide["Android operations<br/>[ANDROID-TERMUX.md]"]
end

node_operator(("Operator"))

node_operator -->|"requests actions"| node_claude
node_claude -->|"uses MCP"| node_mcp_server
node_mcp_server -->|"routes commands"| node_python_client
node_mcp_server -->|"routes commands"| node_js_client
node_mcp_server -->|"routes commands"| node_platform_agent
node_python_client -.->|"returns results"| node_mcp_server
node_js_client -.->|"returns results"| node_mcp_server
node_platform_agent -->|"returns results"| node_mcp_server
node_platform_bootstrap -.->|"deploys agent"| node_platform_agent
node_termux_guide -.->|"documents Android"| node_platform_agent
node_mcp_server -->|"provides results"| node_claude

click node_mcp_server "https://github.com/0xyg3n/claude-c2/blob/main/src/server.js"
click node_python_client "https://github.com/0xyg3n/claude-c2/blob/main/clients/agent.py"
click node_js_client "https://github.com/0xyg3n/claude-c2/blob/main/clients/agent.js"
click node_platform_agent "https://github.com/0xyg3n/claude-c2/blob/main/agents/agent.py"
click node_platform_bootstrap "https://github.com/0xyg3n/claude-c2/blob/main/agents/linux.sh"
click node_termux_guide "https://github.com/0xyg3n/claude-c2/blob/main/docs/ANDROID-TERMUX.md"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_claude toneBlue
class node_mcp_server toneAmber
class node_python_client,node_js_client,node_platform_agent toneMint
class node_platform_bootstrap,node_termux_guide toneRose
class node_operator toneIndigo
```

## Components

### Operator interface

- **Claude AI**

### Control server

- [MCP and WS server](https://github.com/0xyg3n/claude-c2/blob/main/src/server.js): `src/server.js`

### Remote agents

- [Python client](https://github.com/0xyg3n/claude-c2/blob/main/clients/agent.py): `clients/agent.py`
- [Node.js client](https://github.com/0xyg3n/claude-c2/blob/main/clients/agent.js): `clients/agent.js`
- [Platform agent](https://github.com/0xyg3n/claude-c2/blob/main/agents/agent.py): `agents/agent.py`

### Agent deployment

- [Platform bootstrap](https://github.com/0xyg3n/claude-c2/blob/main/agents/linux.sh): `agents/linux.sh`
- [Android operations](https://github.com/0xyg3n/claude-c2/blob/main/docs/ANDROID-TERMUX.md): `docs/ANDROID-TERMUX.md`

### Other components

- **Operator**

## Connections

- Operator → Claude AI: requests actions (evidence: `README.md`)
- Claude AI → MCP and WS server: uses MCP (evidence: `README.md`)
- MCP and WS server → Python client: routes commands (evidence: `README.md`)
- MCP and WS server → Node.js client: routes commands (evidence: `README.md`)
- MCP and WS server → Platform agent: routes commands (evidence: `README.md`)
- Python client → MCP and WS server: returns results
- Node.js client → MCP and WS server: returns results
- Platform agent → MCP and WS server: returns results (evidence: `agents/agent.py`)
- Platform bootstrap → Platform agent: deploys agent
- Android operations → Platform agent: documents Android
- MCP and WS server → Claude AI: provides results (evidence: `README.md`)
