A simple local proxy for inspecting Anthropic API requests and responses. Sits between your client and the Anthropic API, logging all traffic as JSON files with a web UI for browsing.
# Terminal 1 - Start the API proxy
uv run simple_proxy.py
# Terminal 2 - Start the web viewer
uv run viewer.pyThen point your Anthropic client's base URL to http://localhost:5001.
The proxy forwards all requests to https://api.anthropic.com, passing through headers (including your API key) unchanged. Both requests and responses are saved as JSON files in ./logs/.
The web viewer at http://localhost:5002 lets you browse and inspect logged API calls — messages, tool use, token counts, etc.
| Service | URL | Description |
|---|---|---|
| Proxy | http://localhost:5001 | Point your client here |
| Viewer | http://localhost:5002 | Web UI for browsing logs |
| Health | http://localhost:5001/health | Health check |
Any client that lets you set a custom base URL will work:
# Python SDK
client = anthropic.Anthropic(base_url="http://localhost:5001")# Claude Code
ANTHROPIC_BASE_URL=http://localhost:5001 claudeLogs are saved to ./logs/ as pairs of JSON files:
{timestamp}_request.json— full request body{timestamp}_response.json— full response (streaming responses are reconstructed)