Skip to content
View relaycraft's full-sized avatar
๐ŸŽฏ
Focusing
๐ŸŽฏ
Focusing

Highlights

  • Pro

Block or report relaycraft

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Maximum 250 characters. Please donโ€™t include any personal information such as legal names or email addresses. Markdown is supported. This note will only be visible to you.
Report abuse

Contact GitHub support about this userโ€™s behavior. Learn more about reporting abuse.

Report abuse
relaycraft/README.md

RelayCraft ๐Ÿ›ฐ๏ธ

AI-Native Web Traffic Debugging Tool

release stars downloads license

English | ็ฎ€ไฝ“ไธญๆ–‡


RelayCraft Overview

website download


๐Ÿ—๏ธ How it Works

RelayCraft uses a modular 3-layer architecture to provide reliable traffic debugging with a modern interface.

graph LR
    %% Style definitions
    classDef client fill:#f9f9f9,stroke:#333,stroke-width:2px,color:#333
    classDef engine fill:#e3f2fd,stroke:#1565c0,stroke-width:2px,color:#000
    classDef backend fill:#fff3e0,stroke:#e65100,stroke-width:2px,color:#000
    classDef frontend fill:#e8f5e9,stroke:#2e7d32,stroke-width:2px,color:#000
    classDef ai fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px,color:#000,stroke-dasharray: 5 5

    %% Node definitions
    Traffic(["๐ŸŒ Web Traffic<br/>(HTTP/HTTPS/WS)"]):::client
    
    subgraph Core ["RelayCraft Architecture"]
        direction LR
        Engine["<b>Engine Layer</b><br/>Python / mitmproxy"]:::engine
        Backend["<b>System Layer</b><br/>Tauri / Rust"]:::backend
        UI["<b>UI Layer</b><br/>React / Zustand"]:::frontend
    end
    
    MCP["<b>๐Ÿค– AI Agent</b><br/>Claude, Cursor, etc."]:::ai

    %% Connections
    Traffic <==>|Proxy/Intercept| Engine
    Engine <==>|IPC / HTTP API| Backend
    Backend <==>|Tauri Commands| UI
    
    MCP <.->|Model Context Protocol| Backend
Loading

RelayCraft is an AI-native network debugging tool for modern development. Built with Tauri, React, and Rust, it combines a proxy engine, AI-assisted workflows, and an extensible plugin system โ€” all running locally, with zero accounts required.

โœจ Why RelayCraft?

  • ๐Ÿค– AI-Native Workflows: Create rewrite rules in natural language, analyze failed requests, and search traffic with plain language in one interface.
  • ๐Ÿ”Œ MCP Server: Expose live traffic data and rule management to any external AI tool (Claude Desktop, Cursor, etc.) via the Model Context Protocol. Let your AI agent debug alongside you.
  • ๐Ÿ—๏ธ Modern Architecture: A lightweight core built with Tauri and Rust, powered by the mitmproxy engine.
  • ๐Ÿ›ก๏ธ Privacy First: Your data stays yours. Fully offline, zero accounts, local storage, local AI support, open source, and no telemetry.
  • ๐Ÿ Scriptable & Extensible: Build custom traffic logic with mitmproxy Python hooks and extend the workspace through plugins and theming.

๐Ÿš€ Key Features

๐Ÿ“Š Traffic Monitor

  • ๐Ÿ“ก Capture: Inspect HTTP, HTTPS, and WebSocket traffic in real-time.
  • ๐Ÿ” Filter: Filter by method, domain, status code, or content type using a powerful query syntax.
  • ๐Ÿ’Ž Detail Inspection: JSON highlighting, image previews, and structured header/body views.
  • ๐Ÿ“ฆ Export: One-click export to cURL, HAR, or Relay Session (.relay).

โš™๏ธ Rules Engine

Manage traffic behavior with a visual rule builder โ€” no config files needed. Supports 6 rule types:

Action Description
Map Local Return custom content or redirect to a local file.
Map Remote Forward traffic to a different URL or environment.
Rewrite Header Modify request or response headers dynamically.
Rewrite Body Change request/response content (JSON / Regex / Text).
Throttling Simulate network conditions with custom Latency, Packet Loss, and Bandwidth limits.
Block Request Intercept and block matching requests instantly.

๐Ÿ›‘ Breakpoints

Real-time control to pause, edit, and resume flows in both Request and Response phases.

  • Smart Matching: Support for wildcard path matching and RegEx for precise interception.
  • On-the-fly Editing: Modify headers and body content before they reach the server or client.
  • Edge Case Simulation: Useful for testing error handling, mock responses, and race-condition debugging.

๐Ÿš€ Request Composer

A built-in API client designed for debugging, deeply integrated with your traffic history.

  • Direct Replay: Swiftly replay any captured flow with a dedicated visual editor.
  • Format Support: Full management of headers and body content (Raw, Form-Data, JSON).
  • cURL Integration: Import requests from cURL strings with a single click.
  • Instant Preview: View formatted responses (JSON, HTML, Assets) directly in the composer panel.

๐Ÿ Python Scripting

Use the mitmproxy Python ecosystem for scenarios beyond visual rules.

  • Native Hooks: Write custom logic using standard mitmproxy event hooks.
  • Modern Editor: Powered by CodeMirror 6 with syntax highlighting and auto-formatting.
  • Dedicated Logging: Script outputs are centralized in a dedicated tab within the system logs for easy troubleshooting.

๐Ÿง  AI Assistant

Global Ctrl(โŒ˜) + K command center with context-aware AI across every workflow:

  • Natural Language Rules: Describe what you want intercepted or rewritten; AI builds the rule.
  • Request Analysis: Generate request summaries and diagnostics, including rule hits, potential security issues, and optimization hints.
  • Smart Search: Find specific traffic using natural language queries.
  • Script Generation: Generate Python mitmproxy scripts from plain descriptions.

๐Ÿ”Œ MCP Server

RelayCraft runs a built-in MCP (Model Context Protocol) server, letting any compatible AI client connect and work with your live traffic data.

Tip

This allows you to say to Claude or Cursor: "Find the failed requests from my local dev server and create a rule to mock a 500 error for all /api/v1/auth calls."

Read tools (no auth required โ€” zero config):

  • list_sessions / list_flows / get_flow / search_flows / get_session_stats / list_rules

Write tools (Bearer token, shown in Settings โ†’ Integrations):

  • create_rule โ€” create any of the 6 rule types using natural language parameters
  • delete_rule / toggle_rule โ€” manage rules in the session
  • replay_request โ€” replay captured traffic through the proxy

Compatible with Claude Desktop, Cursor, Windsurf, and any tool supporting the MCP HTTP transport.

๐Ÿ› ๏ธ Getting Started

Prerequisites

  • Node.js 20.19+ or 22.12+ (Vite compatibility; Node 21 is not supported)
  • pnpm 9+ (install; this repo uses lockfile v9)
  • Rust (stable toolchain)
  • Python (3.10+)

Setup & Run

# 1. Clone the repository
git clone https://github.com/relaycraft/relaycraft.git
cd relaycraft

# 2. Set up the Python Engine
# Follow the instructions in engine-core/README.md
# to build and place the engine binary in the required directory.

# 3. Install frontend dependencies
pnpm install

# 4. Start development mode
pnpm tauri dev

๐Ÿ“ฆ Downloads

Pre-built binaries for macOS, Windows, and Linux are available on the Releases Page.

๐Ÿ“– Community & Support

  • Contributing Guide โ€” Learn how to contribute to the project.
  • Roadmap โ€” Product direction and upcoming milestones (GitHub Discussion).
  • Commercial Use โ€” Sponsorship and enterprise licensing information.
  • Plugin Registry โ€” Explore community-built plugins.

๐Ÿ“„ License

RelayCraft is open-sourced under the GNU GPL v3 or later. See the LICENSE file for details.

๐Ÿ™Œ Contributors


Crafted with โค๏ธ by the RelayCraft Team.

Pinned Loading

  1. relaycraft relaycraft Public

    AI-native network debugging tool designed for modern development.

    TypeScript 58 5