KiroStudio: An Anthropic Protocol Gateway Written in Rust
KiroStudio is an Anthropic protocol gateway. It takes standard Anthropic Messages API requests, converts them, forwards them to a Kiro / AWS Q upstream, then translates the responses back into Anthropic format. Any Anthropic-compatible client, Claude Code, the SDK, or your own app, works with it by just pointing base_url here. It’s forked from hank9999/kiro.rs (MIT), with the protocol-conversion core built on top of it and heavily extended.
The backend is Rust + Axum (2024 edition). The frontend React + Vite admin panel is embedded into the binary at compile time via rust-embed, storage runs on local SQLite, and the end result is a self-contained single-file executable with no external static-asset dependencies. Installing the binary build takes just one install-binary.sh, Linux x86_64 plus systemd, no Docker, Rust, or Node.
The core interface is POST /v1/messages, supporting streaming and non-streaming, tool calls, thinking blocks, and image input. The credential layer does multi-credential scheduling and load balancing (priority or balanced), automatic failover, failure cooldown, session affinity, and RPM soft throttling. Entry-point security is comprehensive too: API key authentication, CORS allowlist, IP allowlist (CIDR), per-IP rate limiting, request body size limits, credential log redaction, plus SSRF protection that blocks outbound requests to internal and loopback addresses.
The most practical part: the gateway fixes that annoying Invalid tool parameters error in Claude Code. Illegal escapes, bare control characters, and broken JSON from truncation all get repaired before they reach the client.
src/ is split by responsibility: anthropic/ handles the inbound protocol, kiro/ handles upstream conversion and credential scheduling, admin/ plus admin_ui/ is the admin panel, usage/ tracks usage, and common/ holds CORS, IP, rate limiting, and SSRF. Configuration is two files: config.json for service and security, credentials.json for upstream credentials, which should be chmod 600. apiKey is required, leaving it empty refuses startup outright.
Built for personal use, MIT. If you’re going to deploy it, check the upstream provider’s terms yourself on whether this kind of credential-pool usage is allowed, the operator is responsible.