httap

httap is a powerful HTTP proxy for your terminal. Intercept, inspect & rewrite HTTP traffic — from your shell or your AI agent.

Feature Highlights
- Project-scoped — each project gets its own
.httap/ directory with isolated daemon, database, CA cert and interceptors. No cross-project bleed.
- Multiple surfaces — powerful CLI for scripting, a lazygit-style TUI for browsing traffic, an MCP server for AI agents, and a Node.js API for programmatic access.
- Interceptors — mock, modify or observe traffic by writing TypeScript. Your AI agent can write these for you, so you can express complex scenarios in natural language.
Quick Start
npm install -g @mtford/httap
# Configure environment e.g. HTTP_PROXY
eval "$(httap on)"
# Send a request
curl https://api.example.com/users
# Open UI
httap tui
# Add MCP server to your AI tool
claude mcp add httap -- httap mcp
Browser Interception
Launch any browser pre-configured to route through httap — no manual proxy setup, no certificate warnings:
# Auto-detect and launch your default browser
httap browser
# Open a specific URL
httap browser https://example.com
# Choose a specific browser
httap browser --browser firefox
httap browser --browser brave
Each browser session gets its own isolated profile and is automatically attributed in the TUI (e.g. source: chrome). Close the browser or press Ctrl+C to stop — the temp profile is cleaned up automatically.
Supported browsers:
| Engine | Browsers |
|---|
| Chromium | Chrome, Brave, Edge, Vivaldi, Arc, Chromium |
| Firefox | Firefox, Zen Browser, LibreWolf |
Project Scoping
httap doesn't use a global system proxy. Each project gets its own .httap/ directory in the project root (detected by .git or an existing .httap/):
your-project/
├── .httap/
│ ├── interceptors/ # TypeScript interceptor files
│ ├── config.json # Optional project config
│ ├── proxy.port # Proxy TCP port
│ ├── control.sock # IPC socket
│ ├── requests.db # Captured traffic
│ ├── ca.pem # CA certificate
│ └── daemon.pid # Process ID
└── src/...
Separate daemon, database, certificates etc. You can run httap in multiple projects at the same time without them interfering with each other.
For non-project contexts or custom setups, use --config to point directly at a data directory (no .httap appended):
httap --config /tmp/my-httap-data on
See CLI Reference for the full resolution order (--config > --dir > auto-detect).
MCP Integration
httap has a built-in MCP server that gives AI agents full access to your captured traffic and interceptor system.
Setup
Claude Code:
claude mcp add httap -- httap mcp
Codex:
codex mcp add httap -- httap mcp
Cursor — add to .cursor/mcp.json:
{
"mcpServers": {
"httap": {
"command": "httap",
"args": ["mcp"]
}
}
}
Other MCP clients (Windsurf, etc.) — add to your client's MCP config:
{
"mcpServers": {
"httap": {
"command": "httap",
"args": ["mcp"]
}
}
}
The proxy must be running (eval "$(httap on)") — the MCP server connects to the same daemon as the TUI.
Available Tools
| Tool | Description |
|---|
httap_get_status | Daemon status, proxy port, request count |
httap_list_requests | Search and filter captured requests |
httap_get_request | Full request details by ID (headers, bodies, timing) |
httap_search_bodies | Full-text search through body content |
httap_query_json | Extract values from JSON bodies via JSONPath |
httap_count_requests | Count matching requests |
httap_clear_requests | Delete all captured requests |
httap_list_sessions | List active proxy sessions |
httap_list_interceptors | List loaded interceptors with status and errors |
httap_reload_interceptors | Reload interceptors from disk |
See full MCP documentation for filtering, output formats, and examples.
Interceptors