Claude Agent Server — Development skill for Claude Code
Run Claude Agent (Claude Code) in a sandbox, control it via websocket.
How to install Claude Agent Server
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open dzhng/claude-agent-server and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Claude Agent Server does
Run Claude Agent (Claude Code) in a sandbox, control it via websocket.
Alternatives in Development
- Happy Coder — by GrocerPublishAgent - Spawn and control multiple Claude Codes in parallel from your phone or desktop 15.7k ★
- GenericAgent — Self-evolving agent: grows skill tree from 3.3K-line seed, achieving full system control with 6x less token co 6.1k ★
- Vibekit — A simple SDK for safely running Codex, Gemini CLI, and Claude Code in a secure sandbox 1.7k ★
README

Claude Agent SDK WebSocket Server
A WebSocket server that wraps the Claude Agent SDK, allowing real-time bidirectional communication with Claude through WebSockets. Deploy it as an E2B sandbox and connect via the TypeScript client library.
[Launch tweet / discussion](https://x.com/dzhng/status/1991154972558581889?s=20)
Overview
**Typical Workflow:**
- Build Your E2B Image - Deploy the server as an E2B sandbox template using
bun run build:e2b - Use the Client Library - Install
@dzhng/claude-agentin your project and connect to your E2B sandbox - Modify the Server (Optional) - If you need custom behavior, edit the server code in
packages/server/ - Test Locally - Use
bun run start:serverandbun run test:localto test your changes before rebuilding
Quick Start
1. Setup Environment
Create a `.env` file in the root directory:
cp .env.example .env
Add your API keys:
ANTHROPIC_API_KEY=sk-ant-your-api-key-here
E2B_API_KEY=e2b_your-api-key-here
Install dependencies:
bun install
2. Build Your E2B Image
Build and deploy the server as an E2B template:
bun run build:e2b
This creates a sandbox template named `claude-agent-server` on E2B. The build process:
- Creates a sandbox based on Bun 1.3
- Installs git and clones this repository
- Installs dependencies
- Configures the server to start automatically on port 3000
The build may take a few minutes. Once complete, your template is ready to use.
3. Use the Client Library
Install the client library in your project:
npm install @dzhng/claude-agent
# or
bun add @dzhng/claude-agent
Connect to your E2B sandbox:
import { ClaudeAgentClient } from '@dzhng/claude-agent'
const client = new ClaudeAgentClient({
e2bApiKey: process.env.E2B_API_KEY,
anthropicApiKey:
Related Skills
Cc2server
Claude Code bridge for the A2S protocol with resilient WebSocket/HTTP transport, session events, reconnect rec
Clawrelay Wecom Server
Claude Code 企业微信中转服务 — 通过 WebSocket 让企业微信机器人接入 Claude Code,无需公网IP,流式回复,开箱即用。A WeCom bot relay for Claude Code.
Agent Room Server
AgentRoom backend and macOS operator app: run Codex, Claude Code, and other coding agents on a Mac behind a RE
Clawrelay Feishu Server
飞书(Lark) chatbot powered by Claude Code via ClawRelay. WebSocket long connection, streaming reply, multimodal
Tool Sandbox MCP
📦 MCP server that runs agent code in a sandbox with access to upstream MCP tools
Signal Bridge Remote
A remote MCP server that lets Claude control Bluetooth intimate hardware over the internet via Buttplug.io / I
Related Agents
Live
Runs live production — OBS control over obs-websocket, multi-bitrate streaming (RTMP/SRT/RIST/WHIP), NDI routi
Websocket Expert
Tier 2 — Implementation. Owns realtime transport, reconnection, and backpressure. Use for WebSocket/realtime f
Server Engineer
Specialist for the Node.js server, REST API, WebSocket, and file watcher. Invoke when building or modifying Ex