kiro-claude-proxy
v1.3.0
Published
Proxy server to use Kiro's Claude models with Claude Code CLI
Maintainers
Readme
Kiro Claude Proxy
A proxy server that exposes an Anthropic-compatible API backed by Kiro's AWS CodeWhisperer, letting you use Claude models with Claude Code CLI or any Anthropic-compatible client.
How It Works
┌──────────────────┐ ┌─────────────────────┐ ┌────────────────────────────┐
│ Claude Code │────▶│ This Proxy Server │────▶│ AWS CodeWhisperer │
│ (Anthropic │ │ (Anthropic → AWS │ │ (codewhisperer. │
│ API format) │ │ CodeWhisperer) │ │ us-east-1.amazonaws.com) │
└──────────────────┘ └─────────────────────┘ └────────────────────────────┘- Receives requests in Anthropic Messages API format
- Uses OAuth tokens from Kiro CLI database
- Transforms to AWS CodeWhisperer format
- Sends to AWS CodeWhisperer API
- Converts responses back to Anthropic format with full streaming support
Prerequisites
- Node.js 18 or later
- Kiro CLI installed and authenticated (
kiro auth)
Installation
Option 1: npm (Recommended)
# Run directly with npx (no install needed)
npx kiro-claude-proxy start
# Or install globally
npm install -g kiro-claude-proxy
kiro-claude-proxy startOption 2: Clone Repository
git clone <repository-url>
cd kiro-claude-proxy
npm install
npm startQuick Start
1. Authenticate Kiro CLI
Make sure Kiro CLI is installed and authenticated:
kiro auth2. Start the Proxy Server
# If installed via npm
kiro-claude-proxy start
# If using npx
npx kiro-claude-proxy start
# If cloned locally
npm startThe server runs on http://localhost:8080 by default.
3. Verify It's Working
# Health check
curl http://localhost:8080/health
# List available models
curl http://localhost:8080/v1/modelsUsing with Claude Code CLI
Configure Claude Code
Create or edit the Claude Code settings file:
macOS: ~/.claude/settings.json
Linux: ~/.claude/settings.json
Windows: %USERPROFILE%\.claude\settings.json
Add this configuration:
{
"env": {
"ANTHROPIC_AUTH_TOKEN": "dummy",
"ANTHROPIC_BASE_URL": "http://localhost:8080",
"ANTHROPIC_MODEL": "claude-opus-4-5",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "claude-opus-4-5",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "claude-sonnet-4-5",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "claude-haiku-4-5",
"CLAUDE_CODE_SUBAGENT_MODEL": "claude-sonnet-4-5"
}
}Load Environment Variables
Add the proxy settings to your shell profile:
macOS / Linux:
echo 'export ANTHROPIC_BASE_URL="http://localhost:8080"' >> ~/.zshrc
echo 'export ANTHROPIC_API_KEY="dummy"' >> ~/.zshrc
source ~/.zshrcFor Bash users, replace
~/.zshrcwith~/.bashrc
Windows (PowerShell):
Add-Content $PROFILE "`n`$env:ANTHROPIC_BASE_URL = 'http://localhost:8080'"
Add-Content $PROFILE "`$env:ANTHROPIC_API_KEY = 'dummy'"
. $PROFILEWindows (Command Prompt):
setx ANTHROPIC_BASE_URL "http://localhost:8080"
setx ANTHROPIC_API_KEY "dummy"Restart your terminal for changes to take effect.
Run Claude Code
# Make sure the proxy is running first
kiro-claude-proxy start
# In another terminal, run Claude Code
claudeAvailable Models
| Model ID | Description |
|----------|-------------|
| claude-opus-4-5 | Claude Opus 4.5 |
| claude-sonnet-4-5 | Claude Sonnet 4.5 |
| claude-sonnet-4 | Claude Sonnet 4 |
| claude-haiku-4-5 | Claude Haiku 4.5 |
| auto | Let Kiro choose the best model |
API Endpoints
| Endpoint | Method | Description |
|----------|--------|-------------|
| /health | GET | Health check |
| /v1/messages | POST | Anthropic Messages API |
| /v1/models | GET | List available models |
Troubleshooting
"Kiro CLI not authenticated"
Make sure Kiro CLI is installed and authenticated:
kiro auth"Kiro CLI database not accessible"
Ensure Kiro CLI is properly installed and has created its database. Try running any Kiro command first:
kiro --help401 Authentication Errors
Your Kiro authentication may have expired. Re-authenticate:
kiro authDevelopment
Running in Debug Mode
kiro-claude-proxy start --debugEnvironment Variables
PORT- Server port (default: 8080)DEBUG- Enable debug logging (set to 'true')
License
MIT
Credits
This project uses Kiro CLI's authentication system to access AWS CodeWhisperer models through an Anthropic-compatible API interface.
