--- id: claude-tap version: "0.1.144" license: MIT license_treatment: permissive maintenance: active --- # claude-tap — Trace AI CLI API requests via local reverse and forward proxies. Inspect system prompts, messages, tools, and token usage. License: permissive · Maintenance: active · Downloads: 118.4K/mo ## What it is and what it does claude-tap is a local reverse and forward proxy that intercepts HTTP traffic from AI coding agents and displays it in a web-based trace viewer. It works with a wide range of agent CLIs—Claude Code, Codex, Gemini, Grok, Kimi, Cursor, and others—capturing the raw API requests and responses without requiring a hosted dashboard. You run your agent through claude-tap instead of directly, and it records system prompts, conversation history, tool schemas, tool calls, streaming responses, and token counts. The tool is designed for developers who want to understand or debug agent behavior by seeing exactly what context and instructions the agent is working with, and how that context changes between turns. Traces stay on your machine by default, with sensitive auth headers redacted. Each run can be exported as a self-contained HTML file for review or archiving, and the same workflow works across multiple different agent clients. Use it for: - Debug why a Claude Code agent made a particular tool call by comparing the system prompt and messages sent in that request versus the previous one. - Inspect token usage and streaming response reconstruction for a Cursor or Codex session to understand cost and latency. - Export and archive a trace of an agent run as a portable HTML file for code review or incident analysis. - Verify that a custom Claude Code upstream (DeepSeek, local proxy, etc.) is receiving the correct prompts and tool definitions. - Compare how different agent CLIs (Kimi, Gemini, Grok) structure their API calls and context for the same task. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. claude-tap is a local proxy and trace viewer that captures and displays API traffic from AI coding agents, letting you inspect system prompts, messages, tool calls, and token usage without sending traces to a hosted service. Yes. claude-tap fills a real need for developers working with AI agents: it provides local, privacy-preserving visibility into agent-API traffic without requiring hosted infrastructure or code changes to the agent itself. Low install friction, active maintenance, no known vulnerabilities, and broad client support make it a practical debugging tool. Install it if you regularly work with Claude Code, Cursor, or other traced agents and want to understand their behavior. ## Install pip install claude-tap uv add claude-tap poetry add claude-tap ## Installing claude-tap Before you install: Low friction: pure Python wheel with three common async/crypto dependencies (aiohttp, backports-zstd, cryptography). Active maintenance as of 2026-08-14 with recent release. Requires Python 3.11+. License in practice: MIT license permits commercial and private use with minimal restrictions; suitable for most development workflows. Quickstart: pip install claude-tap # Trace Claude Code with live viewer claude-tap # Or trace another client claude-tap --tap-client codex # Pass flags to the client after -- claude-tap -- --model claude-opus-4-6 Requires Python 3.11 or later and the target AI CLI tool (Claude Code, Codex, Gemini CLI, etc.) installed and configured. Verify before relying: - Whether the live viewer server runs by default in all deployment contexts or only in interactive terminal mode. - Performance overhead of the proxy on large or streaming responses from the traced agent. - Whether trace export to HTML viewer works with all supported clients or has known limitations. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 118.4K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags ai agent api trace viewer, local proxy for llm debugging, inspect claude code requests, ai coding agent traffic capture, llm api call inspector, agent context and prompt viewer, local ai agent debugger, ai-agent-debugging, api-tracing, llm-observability [View on SkillFed](https://skillfed.io/packages/claude-tap) · [View on PyPI](https://pypi.org/project/claude-tap/)