httptoolkit-mcp
Provides ADB-based automation for Android emulators (Nox, MEmu, BlueStacks, LDPlayer) to install system CA certificates and configure proxy settings without UI, including support for transparent iptables interception.
Allows interception and deep protobuf reverse-engineering of Spotify's binary protobuf API, including decoding compressed subfields and diffing messages to identify changing fields like cursors and tokens.
Identifies that WhatsApp traffic uses end-to-end encryption (Noise Protocol and Signal E2E) and thus cannot be decrypted via passive MITM; provides classification to mark such traffic as encrypted.
Supports decoding of base64url-encoded protobuf tokens (e.g., continuation, params, clickTrackingParams) within YouTube's InnerTube JSON API, with automatic unwrapping and comparison via protobuf_diff.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@httptoolkit-mcp Start proxy and setup transparent interception for Nox emulator"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
httptoolkit-mcp
MCP-сервер для перехвата и мокинга HTTP(S)-трафика. Построен на Mockttp - том же движке, что и HTTP Toolkit, - поэтому самому десктоп-приложению он не нужен: MCP сам поднимает перехватывающий proxy. Заточен под Android-эмуляторы (Nox, MEmu, BlueStacks, LDPlayer) и настройку только через adb.
Что умеет
Перехват HTTP(S) через свой Mockttp-proxy (стабильный CA между перезапусками).
Разбор обмена: request/response заголовки, request/response cookies, тело в форматах text / json / hex / protobuf / base64.
Глубокий protobuf-реверс (для «грязных» API типа Spotify/YouTube): schema-less декод, который держит все трактовки поля сразу (вложенное сообщение / строка / байты), авто-распаковка вложенных gzip/zlib/zstd-блобов с рекурсивным декодом, снятие gRPC-framing, JSON-дерево для автоматизаций и diff двух сообщений по путям полей (чтобы видеть, что меняется: курсоры, токены, id).
Spotify - бинарный protobuf в теле (часто со сжатыми под-полями).
YouTube/InnerTube - JSON по HTTPS, где токены (
continuation,params,clickTrackingParams) - это base64url-protobuf внутри строк. Декодер принимает base64url на входе и сам разворачивает такие токены, в т.ч. многослойные;protobuf_diffсравнивает их внутренности по путям.
Правила: мок-ответы, инъекция ошибок (reset/timeout/close), задержки, редиректы, модификация заголовков/тела запроса.
Анализ/экспорт: фильтр, полнотекстовый поиск, экспорт HAR и импорт HAR (например, из самого HTTP Toolkit) для анализа в Claude.
adb-автоматизация: установка CA в системное хранилище и проброс прокси без UI, с автодетектом root-режима и пресетами портов эмуляторов. Поддержка Android 7/9 (прямая запись), 10-13 (tmpfs-overlay), 14 (APEX
conscrypt+ namespace-наложение).Прозрачный перехват через
iptablesDNAT - весь TCP :80/:443 уходит на прокси без компаньон-приложения и без VPN-диалога. Mockttp определяет цель по Host/SNI. Зависит от ядра эмулятора: loopback-DNAT (через reverse-туннель) доставляет не на всех ядрах - на части эмуляторных образов (напр. MEmu Android 9) локальный пакет, завёрнутый на127.0.0.1, не маршрутизируется обратно (reply-path), и перехват не идёт. На таких образах работает толькоhttp_proxy-режим. См. раздел про ограничения.WebSocket: перехват ws/wss, сообщения обоих направлений (sent/received) с телом в любом формате (включая protobuf) + код/причина закрытия.
Related MCP server: httptoolkit-mcp
Установка
npm install
npm run buildТребуется openssl в PATH (для вычисления subject_hash_old имени системного серта).
Подключение к Claude Desktop
В claude_desktop_config.json:
{
"mcpServers": {
"httptoolkit": {
"command": "node",
"args": ["/absolute/path/to/httptoolkit_mcp/dist/index.js"],
"env": {
"HTMCP_ADB_PATH": "/path/to/adb"
}
}
}
}Переменные окружения:
HTMCP_ADB_PATH- путь к adb. Можно не задавать: сервер сам ищет adb от Nox/MEmu/BlueStacks/LDPlayer/Genymotion/Android SDK, затемadbиз PATH.HTMCP_CERT_DIR- где хранить CA (по умолчанию./certs).
Типовой сценарий (эмулятор)
proxy_start- поднять proxy (по умолчанию порт 8000). В ответе будут локальные IP машины.adb_connectс пресетом (nox/memu/bluestacks/ldplayer) илиhost:port. Список -list_emulator_presets.adb_setup(безhostIp) - рекомендуется: ставит CA и прокидывает прокси через adb reverse tunnel (127.0.0.1). Работает на эмуляторах за NAT (например MEmu, где gateway - виртуальный роутер эмулятора, а не хост), без доступного LAN-IP и в обход firewall. Если хост виден в LAN - передайhostIp.Альтернатива:
adb_setup_transparent(hostIp) - прозрачный iptables-перехват (ловит всё, без диалогов; нужен доступный с устройства хост).http_proxyслетает при перезагрузке Android - перезапустиadb_setup.Перезагрузи приложение, если серт не подхватился.
Гоняй трафик в эмуляторе ->
list_traffic,search_traffic,get_exchange(сbodyFormat: protobufдля protobuf-API),export_har.Мокинг:
add_mock_rule,add_error_rule,add_delay_rule,add_redirect_rule,add_modify_request_rule.
Про «без root» - честно
Запись системного сертификата в принципе требует root-привилегий на уровне
ОС: писать в /system/etc/security/cacerts/ (или накладывать туда tmpfs)
нельзя без root-доступа. Фокус в том, что на эмуляторах этот доступ даётся
через adb без установки Magisk:
Nox / MEmu -
adbdуже работает как root,adb rootпроходит из коробки.BlueStacks / LDPlayer - включи тумблер Root в настройках эмулятора, дальше работает
su(Magisk не нужен).AOSP/Genymotion -
google_apis-образы пускаютadb root;Google Play-образы - нет.
То есть «чисто на adb, без Magisk» - да; но adb должен иметь root-доступ,
который эмулятор предоставляет сам. Установщик автоматически выбирает режим
(adb root -> прямая запись на Android 7/9; su + tmpfs-overlay на 10/11/12).
Системный серт лучше user-серта не только тем, что ему доверяют все приложения, но и тем, что анти-MITM проверки user-store его не видят.
Классификатор блобов
classify_blob по неизвестным байтам (тело обмена или вставленный hex/base64)
говорит, что это: энтропия + magic-байты + пробы JSON/protobuf/base64/gRPC.
Главное - он сразу отсекает то, что декодировать бессмысленно: высокоэнтропийный
шифротекст. Подсказывает следующий шаг (decode_protobuf, распаковка, base64).
Шифрованные транспорты (WhatsApp и т.п.) - не декодируются
Если приложение шифрует трафик на своём уровне (WhatsApp: Noise Protocol +
Signal E2E), пассивный MITM-перехват - даже с нашим системным CA - даёт только
шифротекст. Это не «непонятный формат», а данные на ключах, которых у прокси
нет. classify_blob помечает такой трафик прямо.
Декодировать его перехватом нельзя в принципе. Рабочий путь - стать клиентом (реализация протокола: Baileys/whatsmeow - pairing по QR, свои Noise/Signal ключи), что является отдельным классом задач и в этот MITM-инструмент не входит. Frida/root-хук на расшифрованные функции отпадает: integrity-аттестация на регистрации палит и root, и эмулятор, и сам системный CA.
Ограничение: pinning
Если приложение жёстко пинит сертификат (хардкод в коде), системный CA не поможет - нужен Frida/патч APK, что вне adb-only сценария. Но приложения, полагающиеся на системный trust-store (Яндекс.Музыка, YouTube и большинство обычных), перехватываются полностью.
Ограничение: proxy-aware vs proxy-ignoring приложения
http_proxy-режим ловит только приложения, которые уважают системный proxy
(на OkHttp и т.п. - например Spotify). Часть приложений шлёт API мимо системного
proxy своим сетевым стеком (например клиент VK) - такие через http_proxy не
перехватываются, а при выставленном proxy могут вообще терять сеть.
Полностью прозрачный перехват таких приложений (как делает VPN-режим HTTP
Toolkit) надёжно решается только через VpnService (tun-интерфейс + обработка
пакетов в userspace), который обходит маршрутные ограничения ядра. iptables-
DNAT - более лёгкая альтернатива, но, как описано выше, доставляет не на всех
эмуляторных ядрах. VPN-режим в этот инструмент пока не входит.
Реверс protobuf-API (например, Spotify)
Сценарий «дать Claude глаза», чтобы он собрал понимание API для автоматизации:
Перехвати мобильный трафик (
adb_setup_transparent) - у мобильного API чистый protobuf/JSON и меньше анти-фрод триггеров, чем у web/desktop.list_traffic/search_traffic-> найди нужный запрос.decode_protobuf{ id, side: "response", output: "json" }- получишь дерево, где у каждого поля видны все трактовки (message/string/bytes) и распакованные gzip/zstd-вложения. Для gRPC добавьgrpc: true.Сделай два похожих запроса (например, разные страницы/треки) и
protobuf_diff{ a, b, side: "response" }- увидишь, какие поля меняются (курсоры, токены, id), а какие постоянны. Это и есть карта для автоматизации.Проверяй гипотезы запросов через
add_modify_request_rule/add_mock_rule.
Тесты
npm run build && node test/smoke.mjs # ядро: перехват, правила, HAR, cookies
node test/ws-smoke.mjs # WebSocket-перехват сквозь прокси
node test/protobuf-smoke.mjs # protobuf: gzip-вложения, gRPC, diff, base64url-токены
node test/classify-smoke.mjs # классификатор: JSON/protobuf/gzip/шифротекст
node test/mcp-handshake.mjs # MCP stdio handshake + tools/listИнструменты (35)
Прокси: proxy_start, proxy_stop, proxy_status, get_ca_certificate.
Трафик: list_traffic, search_traffic, get_exchange, get_ws_messages,
get_body, clear_traffic, export_har, import_har.
Protobuf: decode_protobuf, protobuf_diff, classify_blob.
Правила: add_mock_rule, add_error_rule, add_delay_rule,
add_redirect_rule, add_modify_request_rule, list_rules, remove_rule,
clear_rules.
ADB/устройство: adb_devices, adb_connect, list_emulator_presets,
adb_reverse, adb_install_cert, adb_set_proxy, adb_clear_proxy, adb_setup,
adb_enable_transparent, adb_disable_transparent, adb_transparent_status,
adb_setup_transparent.
Available Tools
35 toolsadb_clear_proxyClear device proxyC
Remove the device global proxy via adb.
Inputs: serial.
adb_connectadb connectA
Connect to an emulator over TCP. Accepts a host:port or a preset name (nox, memu, bluestacks, ldplayer). See list_emulator_presets.
Inputs: target (required).
adb_devicesList adb devicesB
List connected adb devices/emulators.
Inputs: no named parameters.
adb_disable_transparentDisable transparent captureA
Remove the iptables DNAT rules (and reverse tunnel if loopback). Flushes nat OUTPUT.
Inputs: port, serial, hostPort.
adb_enable_transparentEnable transparent captureA
Redirect ALL device TCP :80/:443 to the proxy via iptables DNAT - captures every app's traffic on L3, including apps that ignore the system proxy (e.g. VK). No companion app, no VPN dialog. Requires root (Nox/MEmu out of the box). Defaults to a loopback target via adb reverse tunnel (works behind emulator NAT); pass hostPort to DNAT to a reachable LAN host.
Inputs: port, serial, hostPort.
adb_install_certInstall CA (system store)A
Push the proxy CA into the device's SYSTEM trust store via adb (no Magisk needed on Nox/MEmu). Trusted by all apps and invisible to user-store anti-MITM checks. Fails on hard-pinned apps.
Inputs: serial.
adb_reverseadb reverse tunnelA
Tunnel the proxy port back to the device over the adb channel (device 127.0.0.1: -> host). Use this for emulators behind their own NAT (e.g. MEmu, where the gateway is the emulator's virtual router, not the host) - then set the device proxy to 127.0.0.1:. Bypasses host firewall/NAT.
Inputs: port, serial.
adb_set_proxySet device proxyC
Route device traffic through host:port via adb (no WiFi UI needed).
Inputs: hostPort (required), serial.
adb_setupOne-shot device setupA
Convenience: start proxy (if needed), install the system CA, and set the device proxy in one step. By default uses an adb reverse tunnel (127.0.0.1), which works on NAT'd emulators like MEmu without needing a reachable host IP. Set hostIp to use a LAN IP instead.
Inputs: port, hostIp, serial.
adb_setup_transparentOne-shot transparent setupA
Start proxy (if needed), install the system CA, and enable transparent iptables capture - the closest adb-only equivalent of HTTP Toolkit's VPN mode, with zero on-device dialogs. Catches apps that ignore the system proxy (e.g. VK). Defaults to loopback + reverse tunnel (works behind emulator NAT); pass hostIp for a directly reachable host.
Inputs: port, hostIp, serial.
adb_transparent_statusTransparent statusC
Show the device's nat OUTPUT chain (active DNAT redirects).
Inputs: serial.
add_delay_ruleAdd latencyA
Delay matching requests by N ms, then pass them through normally.
Inputs: ms (required), method, urlPattern.
add_error_ruleInject errorA
Break matching requests: reset/close the connection or hang (timeout).
Inputs: kind (required), method, urlPattern.
add_mock_ruleMock responseB
Reply to matching requests with a fixed response (passes through everything else).
Inputs: status (required), body, json, method, +2 more.
add_modify_request_ruleModify requestB
Rewrite headers/body on matching requests, then pass through.
Inputs: method, setHeaders, urlPattern, replaceBody, +1 more.
add_redirect_ruleRedirect requestB
Transparently forward matching requests to a different absolute URL.
Inputs: toUrl (required), method, urlPattern.
classify_blobClassify unknown bytesA
Tell what an unknown blob most likely is (entropy + magic bytes + JSON/protobuf/base64/gRPC probes) so you don't try to decode ciphertext. Flags encrypted transports (e.g. WhatsApp Noise/E2E) that passive MITM can't decode. Input an exchange body or raw hex/base64.
Inputs: id, hex, side, base64.
clear_rulesClear rulesB
Remove all rules.
Inputs: no named parameters.
clear_trafficClear trafficA
Drop all captured exchanges.
Inputs: no named parameters.
decode_protobufDecode protobuf (deep)A
Schema-less protobuf decode that keeps ALL interpretations per field (message/string/bytes) and transparently decompresses embedded gzip/zlib/zstd and unwraps gRPC frames. Input a captured exchange body, or paste raw hex/base64. Use output=json to get a structured tree for building automations.
Inputs: id, hex, grpc, side, +2 more.
export_harExport HARC
Export captured traffic (optionally filtered) to a .har file.
Inputs: host, limit, outPath, urlPattern.
get_bodyGet one bodyB
Return just the request or response body of an exchange in a chosen format.
Inputs: id (required), side (required), format.
get_ca_certificateGet CA certificateA
Return the proxy CA certificate (PEM) and its file path for device installation.
Inputs: no named parameters.
get_exchangeGet exchange detailA
Full detail for one exchange: request line, request/response headers, request & response cookies, and both bodies. Bodies render per bodyFormat (auto/text/json/hex/protobuf/base64).
Inputs: id (required), bodyFormat.
get_ws_messagesGet WebSocket messagesC
List a WebSocket exchange's messages, rendered in the chosen format.
Inputs: id (required), format, direction.
import_harImport HARA
Load a .har file (e.g. exported from HTTP Toolkit or a browser) into the store so it can be listed, searched and inspected like live traffic.
Inputs: path (required), clearFirst.
list_emulator_presetsList emulator presetsA
Known emulators with their default adb connect host:port.
Inputs: no named parameters.
list_rulesList rulesB
List active interception rules.
Inputs: no named parameters.
list_trafficList captured trafficC
List captured exchanges (newest first) with optional filters.
Inputs: host, limit, method, status, +2 more.
protobuf_diffDiff two protobuf messagesA
Decode two exchanges' bodies as protobuf and diff them by field path - surfaces which fields change between requests (cursors, tokens, ids) vs stay constant. Ideal for reverse-engineering an API for automation.
Inputs: a (required), b (required), side (required).
proxy_startStart interception proxyA
Start the Mockttp HTTPS interception proxy. Generates/loads a stable CA. Point your emulator's proxy at : and install the CA to capture traffic.
Inputs: port.
proxy_statusProxy statusB
Report proxy state, captured count and local IPs.
Inputs: no named parameters.
proxy_stopStop proxyA
Stop the interception proxy.
Inputs: no named parameters.
remove_ruleRemove ruleC
Remove a rule by id.
Inputs: id (required).
search_trafficSearch trafficB
Full-text search across URLs, headers and bodies of captured exchanges.
Inputs: query (required), limit.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 35 tools
Every tool has a clearly distinct purpose, with no ambiguity between them. For example, adb tools are separate from proxy control tools, and rule tools are distinct in their effects (delay, error, mock, redirect, modify). Even similar tools like add_mock_rule vs add_modify_request_rule are clearly differentiated in descriptions.
Most tools follow a consistent verb_noun pattern (e.g., proxy_start, add_delay_rule), and adb tools are grouped with a prefix. Minor deviations like classify_blob and decode_protobuf are still understandable, and overall the naming is predictable.
35 tools is on the higher side but justifiable for a comprehensive HTTP interception toolkit. The tools cover many subdomains (emulator setup, proxy control, rules, traffic inspection, utilities), and each tool serves a specific function without redundancy. The count is slightly above the typical ideal range but still reasonable.
The tool set is highly complete for its domain, covering proxy lifecycle, rule manipulation, traffic capture, search, export, import, and emulator-specific setup including transparent interception and certificate installation. Only minor gaps like VPN mode control are missing, but these are OS-level features not expected in a proxy tool.
Maintenance
Related MCP Connectors
Capture, inspect & debug HTTPS traffic across iOS, Android, browsers & backends — 304 MCP tools.
Experimental MCP server for current empirical verification of explicit public HTTPS endpoint claims.
MCP compatibility and transport verification server.
MCP compatibility and transport verification server.
Related MCP Servers
- AlicenseAqualityDmaintenanceAn MCP server that enables AI assistants to capture and analyze HTTP/HTTPS traffic from Android devices. It supports smart searching of network requests and provides tools for detailed traffic analysis via natural language.11245MIT
- AlicenseAqualityFmaintenanceAn MCP server that enables AI assistants to control HTTP Toolkit for intercepting, inspecting, and debugging HTTP(S) traffic from browsers, mobile devices, and Docker containers. It provides tools for server management, interceptor activation, and sending HTTP requests through natural language commands.2318 npm1MIT
- FlicenseBqualityDmaintenanceA lightweight MCP server built on mitmproxy that lets LLMs capture, inspect, replay, and modify HTTP traffic through a set of focused tools.138-
- AlicenseNot gradedqualityDmaintenanceMCP server for mitmproxy that lets any MCP client analyze, intercept, and replay HTTP/HTTPS traffic.9MIT