Skip to main content

A local proxy for Claude Code that archives every request and response to a SQLite database, with a web UI for browsing sessions, searching transcripts, and inspecting raw API traffic.

Project description

cctape

PyPI version CI

A local proxy for Claude Code that archives every request and response, with a web UI for browsing sessions, searching transcripts, inspecting raw API traffic, tracking token usage and cost, and an MCP server for Claude to inspect past sessions.

Features

  • Find any past conversation. Full-text search across every session you've ever run, with ranked results and highlighted snippets.
  • See what Claude costs you. Token and dollar spend broken down by session, account, and model, plus a live chart of how close you are to your 5-hour and weekly rate limits.
  • Let Claude search its own history. A built-in MCP server so the agent can look up what you discussed last week instead of re-deriving context you already paid for.

Quick start

Run cctape with uv:

uvx cctape

On first run, your browser opens to a setup page at http://127.0.0.1:5555/setup with the one env var you need to copy. After that, run claude as usual — sessions appear in the UI as they happen.

Pass --no-browser to skip the auto-open.

Configuration

Shell

Add to ~/.zshrc (or ~/.bashrc):

export ANTHROPIC_BASE_URL=http://127.0.0.1:5555/proxy

Claude Code VS Code extension

Add to user settings:

"claudeCode.environmentVariables": [
    {"name": "ANTHROPIC_BASE_URL", "value": "http://127.0.0.1:5555/proxy"}
]

MCP server

Register the MCP server with the claude CLI so Claude Code can search its own archive:

claude mcp add --transport http cctape http://127.0.0.1:5555/mcp

This exposes search_transcripts and get_session_window to the agent.

Flags and environment variables

  • --host / --port — bind address (defaults: 127.0.0.1, 5555)
  • --no-browser — don't auto-open the browser on first run
  • CCTAPE_DB — database path (default: ~/.cctape/cctape.db)

Running it as a service

cctape is a regular HTTP server; run it under whatever supervisor you like (launchd, systemd, tmux, etc.). Once it's up on 127.0.0.1:5555 and your ANTHROPIC_BASE_URL points at /proxy, it just stays out of the way.

Development

Clone the repo and run the frontend + backend separately during development.

Build the frontend once (output is served by the backend from backend/src/cctape/static/):

cd frontend && npm install && npm run build

Start the backend with reload:

cd backend && uv run uvicorn --reload --factory --port=5555 cctape:create_app

Open http://127.0.0.1:5555.

The frontend can also run on its own dev server with HMR:

cd frontend && npm run dev

Pre-commit hooks run ruff, pyright, pytest, eslint, and tsc.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cctape-0.3.3.tar.gz (1.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cctape-0.3.3-py3-none-any.whl (1.3 MB view details)

Uploaded Python 3

File details

Details for the file cctape-0.3.3.tar.gz.

File metadata

  • Download URL: cctape-0.3.3.tar.gz
  • Upload date:
  • Size: 1.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for cctape-0.3.3.tar.gz
Algorithm Hash digest
SHA256 a05fa845d4d4e2c168da77ae3556e0f149c567320f8f1c8c1c084522f5405ea6
MD5 809c6e523a09bbb95cfb9da3fe2a4b7e
BLAKE2b-256 3c829b9837acef1fcd2fef98aebbaefa8b583269ec54e2dfb8a08156636dd3cf

See more details on using hashes here.

Provenance

The following attestation bundles were made for cctape-0.3.3.tar.gz:

Publisher: main.yaml on tillahoffmann/cctape

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cctape-0.3.3-py3-none-any.whl.

File metadata

  • Download URL: cctape-0.3.3-py3-none-any.whl
  • Upload date:
  • Size: 1.3 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for cctape-0.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 bc8a2fba27e1a23bb095e6e7007aeab4477335083ef3504b4a13f40ad3b53e89
MD5 4b2701e5e8922de85224011906d16ba5
BLAKE2b-256 73ac74ded0f31ecfdc4b07fc784cfa74581928a551eed5c5536b8ae9f25e0b5b

See more details on using hashes here.

Provenance

The following attestation bundles were made for cctape-0.3.3-py3-none-any.whl:

Publisher: main.yaml on tillahoffmann/cctape

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page