HTTP API wrapper for Claude Code CLI in a Docker container.
- 🐳 Fully containerized Claude Code CLI
- 🔐 OAuth (subscription) authentication via Claude CLI
- 💾 Authentication persists permanently using Docker volumes
- 📁 Optional workspace mounting for code access
- 🛡️ Simple HTTP API interface
- 📊 Human-friendly logging with clear sections
- 🔍 Shows full prompts, verbose Claude output, and responses
- ⏱️ Performance metrics and duration tracking
docker compose up -dFirst-time auth (follow OAuth URL in logs):
# Access the container shell interactively
docker compose exec -it claude-code-server /bin/bash
# Inside the container, run:
claude login
# Follow the authentication prompts (it will provide a URL to authenticate in your browser)
# Exit the container when done
exitTest request:
curl -X POST http://localhost:8888/claude \
-H 'Content-Type: application/json' \
-d '{"prompt":"hello world"}'POST /claude
{"prompt": "Your prompt", "args": ["--optional"], "cwd": "/workspace"}GET /healthz - Health check
Mount workspace in docker-compose.yml:
volumes:
- ./your-project:/workspaceReset auth: docker volume rm claude-code-server_claude-auth