A web-based chat application that provides a clean interface for interacting with Claude via AWS Bedrock. Each interaction runs Claude CLI in one-shot mode with context maintained in the browser's local storage.
- 🗨️ Clean chat interface with markdown and code syntax highlighting
- 🖼️ Automatic file rendering for Claude-generated diagrams (PNG/SVG)
- 💾 Local storage for conversation history with configurable rolling context window
- 🔐 AWS Bedrock authentication using temporary session tokens
- 📁 Automatic file detection and download links for generated content
- 🚀 Docker-ready for easy deployment
- Docker (for containerized deployment)
- AWS credentials with Bedrock access
- Access to Claude models in AWS Bedrock
- Clone the repository:
git clone <repository-url>
cd claude-web-go
- Build the Docker image:
./docker-build.sh
- Set your AWS credentials and run:
export AWS_ACCESS_KEY_ID="your-key"
export AWS_SECRET_ACCESS_KEY="your-secret"
export AWS_REGION="us-west-2" # or your preferred region
./docker-run.sh
- Open http://localhost:8080 in your browser
Variable | Description | Default |
---|---|---|
AWS_ACCESS_KEY_ID |
Your AWS access key | Required |
AWS_SECRET_ACCESS_KEY |
Your AWS secret key | Required |
AWS_REGION |
AWS region for Bedrock | us-west-2 |
CLAUDE_CODE_USE_BEDROCK |
Enable Bedrock mode | 1 |
ANTHROPIC_MODEL |
Claude model to use | us.anthropic.claude-sonnet-4-20250514-v1:0 |
CLAUDE_ALLOWED_TOOLS |
Tools Claude can use (e.g., "Task") | "" (empty - no tools) |
CLAUDE_DISALLOWED_TOOLS |
Tools Claude cannot use | See default list below |
CLAUDE_MCP_CONFIG |
MCP server configuration (JSON) | See MCP section below |
LOG_LEVEL |
Logging verbosity | info |
By default, the following tools are disallowed to prevent Claude from attempting filesystem operations:
- Bash, Glob, Grep, LS, Read, Edit, MultiEdit, Write
- NotebookRead, NotebookEdit
- WebFetch, TodoRead, TodoWrite, Task
To customize this list:
export CLAUDE_DISALLOWED_TOOLS="Bash,Write,Edit" # Only disallow specific tools
export CLAUDE_DISALLOWED_TOOLS="" # Allow all tools (not recommended)
- One-Shot Execution: Each message creates a new Claude CLI process with
-p
flag - Context Management: Previous messages are stored in browser localStorage and included in prompts
- Session Directories: Each interaction creates a
/tmp/<uuid>
directory for Claude's output files - File Detection: Any files created by Claude are automatically detected and made available for download
- AWS Authentication: The server automatically generates AWS session tokens from your credentials
- Messages are stored in browser localStorage
- Configurable context window size (default: 20 messages)
- Only the last N messages are sent to Claude to manage token usage
- Full history remains visible in the UI
When Claude generates files (diagrams, code, etc.):
- Files are created in a temporary session directory
- The web UI automatically detects and displays images
- Download links are provided for all file types
- Files are cleaned up after 30 minutes
# Install dependencies
go mod download
# Run with mock credentials (UI testing only)
./run-local.sh
# Build the Go binary
go build -o claude-web-server ./cmd/server
# Run directly
AWS_ACCESS_KEY_ID=xxx AWS_SECRET_ACCESS_KEY=xxx ./claude-web-server
- This often indicates AWS Bedrock quota issues rather than actual token limits
- Verify your AWS account has proper Bedrock model access
- Check your service quotas in the AWS console
- Ensure
CLAUDE_CODE_USE_BEDROCK=1
is set - Verify AWS credentials are valid
- Check that your region has access to the specified model
Run with LOG_LEVEL=debug
for detailed logging:
LOG_LEVEL=debug ./docker-run.sh
The Docker image includes gamecode-mcp2 for controlled tool access. By default, it's configured with:
{
"mcpServers": {
"gamecode": {
"command": "/usr/local/bin/gamecode-mcp2",
"args": ["--tools-file", "/app/tools.yaml"],
"type": "stdio"
}
}
}
To customize the available tools, edit tools.yaml
before building the Docker image.
- Backend: Go server that wraps Claude CLI
- Frontend: Vanilla JavaScript with local storage
- Authentication: AWS STS for temporary credentials
- File Storage: Temporary directories with automatic cleanup
- Context: Client-side storage with server-side prompt building
- MCP Integration: gamecode-mcp2 for tool control