Sandbox
@usestring/powhttp-mcp

MCP server for powhttp HTTP traffic analysis

powhttp-mcp plugs an agent into powhttp so it can read captured HTTP traffic, compare browser and program requests, and trace related flows. It includes prompts and tools for endpoint mapping, schema checks, fingerprinting, and scraper generation.

81 stars6 forksGoUpdated 1mo ago
Who it's for

Builders who work in Cursor or Claude Code and want their agent to debug HTTP traffic from powhttp.

What it delivers

You can turn captured HTTP traffic into concrete debugging, endpoint mapping, and scraper-building work inside your agent.

What it does

Traffic search and inspection

List sessions, search entries, fetch full request and response details, and inspect TLS or HTTP/2 events.

Browser versus program comparison

Compare two entries or use the `compare_browser_program` prompt to spot anti-bot differences.

Fingerprinting and flow tracing

Generate HTTP, TLS, and HTTP/2 fingerprints and trace related requests from a seed entry.

API and GraphQL mapping

Cluster endpoints, describe them, inspect GraphQL operations, and extract GraphQL errors.

Schema work

Infer merged schemas, query bodies with JQ, and validate bodies against Go structs, Zod, or JSON Schema.

Scraper generation

Use the `generate_scraper` prompt to create PoC Go scrapers from captured traffic.

How to get it

  1. 1Install via go install
    go install github.com/usestring/powhttp-mcp/cmd/powhttp-mcp@latest
  2. 2Or install a specific version
    go install github.com/usestring/powhttp-mcp/cmd/powhttp-mcp@v1.0.0
  3. 3Find your Go bin directory
    go env GOPATH
  4. 4For bash (~/.bashrc or ~/.bash_profile)
    export PATH="$PATH:$(go env GOPATH)/bin"
  5. 5For zsh (~/.zshrc)
    export PATH="$PATH:$(go env GOPATH)/bin"
  6. 6Then reload your shell
    source ~/.zshrc  # or ~/.bashrc, etc.

README

powhttp-mcp

powhttp-mcp

Go Reference GitHub Release License: AGPL v3

An MCP server that gives AI assistants X-ray vision into HTTP traffic captured by powhttp.


See it in action

Using /generate_scraper to build a BMW car listing monitor:

https://github.com/user-attachments/assets/be098e9d-d700-491c-ae7f-5afb12732728


Features

  • HTTP Traffic Analysis - Search, inspect, and analyze captured HTTP requests/responses
  • Anti-Bot Detection - Compare browser vs program traffic to identify detection vectors
  • Fingerprinting - Generate TLS (JA3/JA4) and HTTP/2 fingerprints
  • API Mapping - Cluster and catalog API endpoints from captured traffic
  • GraphQL Analysis - Cluster operations, inspect schemas, and extract errors from GraphQL APIs
  • Schema Inference - Infer merged schemas from multiple response bodies with field statistics
  • Flow Tracing - Trace related requests (redirects, dependent calls)
  • Schema Validation - Validate response bodies against Go structs, Zod, or JSON Schema
  • Scraper Generation - Generate PoC Go scrapers from captured traffic

Schema validation in action - correcting data structures for edge cases:

https://github.com/user-attachments/assets/1156c537-70ab-4179-ad4a-c148988ac503


Installation

Install via go install:

go install github.com/usestring/powhttp-mcp/cmd/powhttp-mcp@latest

Or install a specific version:

go install github.com/usestring/powhttp-mcp/cmd/powhttp-mcp@v1.0.0
Don't have Go installed?

Download and install Go from the official website: https://go.dev/doc/install

Adding Go binaries to your PATH

If you get command not found: powhttp-mcp after installation, you need to add Go's bin directory to your PATH.

Find your Go bin directory:

go env GOPATH

This returns your Go workspace directory, typically ~/go (macOS/Linux) or C:\Users\yourname\go (Windows). The binaries are installed in the bin subdirectory.

macOS / Linux

For bash (~/.bashrc or ~/.bash_profile):

export PATH="$PATH:$(go env GOPATH)/bin"

For zsh (~/.zshrc):

export PATH="$PATH:$(go env GOPATH)/bin"

For fish (~/.config/fish/config.fish):

fish_add_path (go env GOPATH)/bin

Then reload your shell:

source ~/.zshrc  # or ~/.bashrc, etc.

Windows

PowerShell (current session):

$env:PATH += ";$(go env GOPATH)\bin"

Permanently via PowerShell:

[Environment]::SetEnvironmentVariable("PATH", $env:PATH + ";$(go env GOPATH)\bin", "User")

Or via System Settings:

  1. Press Win + R, type sysdm.cpl, press Enter
  2. Go to AdvancedEnvironment Variables
  3. Under "User variables", select Path and click Edit
  4. Click New and add %USERPROFILE%\go\bin
  5. Click OK to save, then restart your terminal

Enabling the Data API

Before using powhttp-mcp, you need to enable the Data API in powhttp:

  1. Open Powhttp Settings > Data API
  2. Make sure the Data API is running
  3. (Recommended) Enable Auto start on app launch for convenience
  4. Note the port number — you'll need this for POWHTTP_BASE_URL in your MCP configuration

Powhttp Data API Settings


Usage

Connecting to Cursor

Add to your .cursor/mcp.json:

{
  "mcpServers": {
    "powhttp": {
      "command": "powhttp-mcp",
      "env": {
        "POWHTTP_BASE_URL": "http://localhost:7777",
        "POWHTTP_PROXY_URL": "http://localhost:8888"
      }
    }
  }
}

Connecting to Claude Desktop

Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

{
  "mcpServers": {
    "powhttp": {
      "command": "powhttp-mcp",
      "env": {
        "POWHTTP_BASE_URL": "http://localhost:7777",
        "POWHTTP_PROXY_URL": "http://localhost:8888"
      }
    }
  }
}

Connecting to Claude Code

Add using the CLI:

claude mcp add powhttp -e POWHTTP_BASE_URL=http://localhost:7777 -e POWHTTP_PROXY_URL=http://localhost:8888 -- powhttp-mcp

The generated scraper running successfully:

https://github.com/user-attachments/assets/52b30cbf-7c66-40b1-a3fe-9c12d37ece11


MCP Prompts

powhttp-mcp provides 4 prompts for guided workflows:

PromptDescription
base_promptSTART HERE: Essential guide for efficient tool usage and token optimization
compare_browser_programCompare browser vs program traffic to find anti-bot detection differences
build_api_mapBuild an API endpoint catalog from captured traffic
generate_scraperGenerate PoC Go scrapers from captured traffic

MCP Tools

powhttp-mcp provides 17 tools for HTTP traffic analysis:

ToolDescription
powhttp_sessions_listList all sessions with entry counts
powhttp_session_activeGet the currently active session
powhttp_search_entriesSearch entries with filters and free text
powhttp_get_entryGet full details of a specific entry
powhttp_get_tlsGet TLS handshake events for a connection
powhttp_get_http2_streamGet HTTP/2 frame details for a stream
powhttp_fingerprintGenerate HTTP, TLS, and HTTP/2 fingerprints
powhttp_diff_entriesCompare two entries to find detection differences
powhttp_extract_endpointsCluster entries into endpoint groups
powhttp_describe_endpointGenerate detailed endpoint description
powhttp_trace_flowTrace related requests around a seed entry
powhttp_validate_schemaValidate entry bodies against a schema
powhttp_query_bodyExtract specific fields from bodies using JQ expressions
powhttp_infer_schemaInfer merged schema from multiple entry bodies with field statistics
powhttp_graphql_operationsCluster GraphQL traffic by operation name and type
powhttp_graphql_inspectParse and inspect individual GraphQL operations
powhttp_graphql_errorsExtract and categorize GraphQL errors from responses

See internal/mcp/README.md for detailed tool documentation.


Environment Variables

Basic Configuration
VariableDescriptionDefault
POWHTTP_BASE_URLWhere to find the powhttp API serverhttp://localhost:7777
POWHTTP_PROXY_URLProxy URL used by prompts when generating scrapers and debugginghttp://127.0.0.1:8890
LOG_LEVELHow verbose the logs are: debug, info, warn, errorinfo
LOG_FILEFile to write logs to (empty = print to console)"" (console)
Performance Tuning
VariableDescriptionDefault
HTTP_CLIENT_TIMEOUT_MSHow long to wait for API responses (milliseconds)10000 (10s)
FETCH_WORKERSHow many entries to fetch in parallel16
ENTRY_CACHE_MAX_ITEMSHow many entries to keep in memory cache512
REFRESH_INTERVAL_MSHow often to check for new entries (milliseconds)2000 (2s)
REFRESH_TIMEOUT_MSMax time for index refresh operation (milliseconds)15000 (15s)
FRESHNESS_THRESHOLD_MSConsider data stale after this many milliseconds500 (0.5s)
Data Limits
VariableDescriptionDefault
TOOL_MAX_BYTES_DEFAULTMax response body size tools return (bytes)2000000 (2MB)
RESOURCE_MAX_BODY_BYTESMax body size for MCP resources (bytes)65536 (64KB)
TLS_MAX_EVENTS_DEFAULTMax TLS handshake events to return200
H2_MAX_EVENTS_DEFAULTMax HTTP/2 frames to return200
BOOTSTRAP_TAIL_LIMITMax entries to load when starting up20000
AI Token Optimization
VariableDescriptionDefault
COMPACT_MAX_ARRAY_ITEMSIn compact mode, trim arrays to this many items3
COMPACT_MAX_STRING_LENTruncate strings longer than this (chars)500
COMPACT_MAX_DEPTHMax nesting depth for compaction (0 = unlimited)0
DEFAULT_SEARCH_LIMITDefault max results for search_entries10
DEFAULT_QUERY_LIMITDefault max entries for query_body20
DEFAULT_CLUSTER_LIMITDefault max clusters for extract_endpoints15
DEFAULT_EXAMPLES_PER_ITEMDefault examples shown per cluster3
Log Rotation
VariableDescriptionDefault
LOG_MAX_SIZE_MBRotate log when it reaches this size (MB)10
LOG_MAX_BACKUPSKeep this many old log files5
LOG_MAX_AGE_DAYSDelete log files older than this (days)28
LOG_COMPRESSCompress old log files (true/false)true

Development

Prerequisites

  • Go 1.24.5 or later
  • Running powhttp instance

Building

go build ./cmd/powhttp-mcp

Testing

go test ./...

Feature Requests & Bug Reports

Have a feature suggestion or found a bug? We'd love to hear from you!

  • Feature Requests: Open an issue with the enhancement label
  • Bug Reports: Please include steps to reproduce, your environment details, and relevant logs

Contributing

We use squash merges for all pull requests. When creating a PR, ensure the PR title follows Conventional Commits format, as it will become the commit message:

Triggers release:

  • feat: - minor version bump
  • fix: - patch version bump
  • perf: - patch version bump
  • revert: - patch version bump
  • feat!: or BREAKING CHANGE: - major version bump

No release:

  • docs:, chore:, refactor:, test:, style:, build:, ci:

Versioning is automated via release-please.


License

This project is licensed under the GNU Affero General Public License v3.0 - see the LICENSE file for details.


Acknowledgments

About StringString ( better website coming soon :) ) extracts structured data from any website at scale. We handle all the code and maintenance.

This project was built during an internal hackathon focused on developer experience tooling. Special thanks to:

  • Kashif Ghafoor — For his contributions during the hackathon
  • Florian — Creator of powhttp for implementing the API from a suggestion and being responsive to feedback

Related Projects

Files in the repo

Repository payload17 top-level entries
  • .github
  • assets
  • cmd
  • examples
  • internal
  • pkg
  • .gitignore
  • .gitleaks.toml
  • .release-please-manifest.json
  • AGENTS.md
  • CHANGELOG.md
  • CLAUDE.md
  • go.mod
  • go.sum
  • LICENSE
  • README.md
  • release-please-config.json

Discussion (0)

Ask about usage, or say what you built with it

Sign in to join the discussion.

No comments yet. Be the first to say what this is good for.

More connectors

Real-time global intelligence dashboard. AI-powered news aggregation, geopolitical monitoring, and infrastructure tracking in a unified situational awareness interface

86k

High-performance code intelligence MCP server. Indexes codebases into a persistent knowledge graph — average repo in milliseconds. 158 languages, sub-ms queries, 99% fewer tokens. Single static binary, zero dependencies.

43k

Universal provider proxy for OpenAI Codex & Claude Code — use any LLM (Claude, Gemini, Grok, DeepSeek, Ollama…) with Codex CLI, App, SDK, and Claude Code

14k
okf-memory/
okf-agent-memory

Git-native persistent memory for AI coding agents. Implements Google OKF v0.2 with sub-300µs in-memory BM25 search, embedded MCP server, and progressive disclosure. Slashes token bloat by 80% with zero external databases or dependencies. Built in pure Go.

547
tirth8205/
code-review-graph

Local-first code intelligence graph for MCP and CLI. Builds a persistent map of your codebase so AI coding tools read only what matters, with benchmarked context reductions on reviews and large-repo workflows.

31k
2akouwu/
reverify

Stop your AI from making things up — it proposes, deterministic tools decide, every claim checked against ground truth with evidence. Grounded facts and context survive resets. Reverse engineering is the proving ground. MCP server + CLI.

1.1k