Repository avatar
AI Tools
v0.3.0
active

kera

io.github.mcdavidobioha/kera

Local-first HTTP reverse proxy, webhook inspector, and replay engine for AI coding agents.

Documentation

Kera — Local Webhook & Network Antenna for AI Coding Agents

Your local webhook and network antenna for AI coding agents.

Capture, inspect, redact, and replay local HTTP traffic over MCP — without leaving your editor.

npm version CI status Node.js >= 20 MIT License


Why Kera?

When you build webhook handlers (Stripe, GitHub, Clerk, Shopify) with AI coding assistants like Claude Code, Cursor, or Windsurf, the debugging loop breaks down:

  1. An external webhook or test request hits your local server and fails with a 500.
  2. Your AI agent cannot see the incoming HTTP headers, raw payload, or exact response.
  3. You waste time manually re-triggering events or copy-pasting massive curl commands to test a fix.

Kera closes that loop locally. It sits transparently in front of your dev server, captures raw request/response bytes in SQLite, redacts secrets automatically, and gives your AI agent tools to inspect failures and replay requests after patching your code.

External Webhook / HTTP Client
              │
              ▼
   Kera Listener (127.0.0.1:4000) ──────▶ Your Local App (localhost:3000)
              │
              ▼
   Local SQLite Store (~/.kera/)
              │
              ▼
   AI Coding Agent (MCP Tools: list, inspect, replay, diff, clear)

Quickstart

Kera provides local capture, provider detection, redacted inspection, and bounded replay and JSON diffs over MCP stdio. With Node.js 20 or newer, start it without a global install:

npx -y kera-mcp --target http://127.0.0.1:3000

Or install the umbrella CLI once and use its MCP subcommand:

npm install -g kera-terminal
kera mcp --target http://127.0.0.1:3000

kera-mcp is the dedicated, lightweight MCP package; kera-terminal owns the shared kera command for MCP, proxy, CLI, and dashboard modes. kera mcp requires a version of kera-terminal that lists mcp in kera --help.

Choose your MCP client: Claude Code · Cursor · Windsurf · Claude Desktop.

Run npx -y kera-mcp --help to view standalone startup options.

Claude Code

Install the Kera plugin from inside Claude Code (v2.1.275 or later):

/plugin install kera --marketplace mcdavidobioha/kera

The plugin launches npx -y kera-mcp. It defaults to http://localhost:3000; set KERA_TARGET_URL before starting Claude Code to use a different target. Use /mcp to check the connection and /kera:webhook-debugging to load the debugging skill.

To configure the server manually, choose one:

claude mcp add --transport stdio kera -- npx -y kera-mcp --target http://127.0.0.1:3000
# Or, with kera-terminal installed globally:
claude mcp add --transport stdio kera -- kera mcp --target http://127.0.0.1:3000

To run the MCP server from a repository checkout, see local development.

Cursor (.cursor/mcp.json)

{
  "mcpServers": {
    "kera": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "kera-mcp", "--target", "http://127.0.0.1:3000"]
    }
  }
}

Windsurf (Cascade's Open MCP config file)

This example uses the globally installed kera-terminal:

{
  "mcpServers": {
    "kera": {
      "command": "kera",
      "args": ["mcp", "--target", "http://127.0.0.1:3000"]
    }
  }
}

Claude Desktop (claude_desktop_config.json)

{
  "mcpServers": {
    "kera": {
      "command": "npx",
      "args": ["-y", "kera-mcp", "--target", "http://127.0.0.1:3000"]
    }
  }
}

The same command and args pairs work across these clients. Make sure the client can find npx or kera on its PATH.

Once connected, send webhooks or test HTTP requests to http://127.0.0.1:4000 instead of port 3000. Kera forwards requests to your app and records the exchange. For Cline and more client details, see MCP setup.

Receive external webhooks with --tunnel

Add --tunnel to the server's arguments. Kera includes the cloudflared npm wrapper and downloads and caches the native executable on first use if one is not already available. An explicit KERA_CLOUDFLARED_PATH takes precedence over a system executable on PATH. For example, to register a tunneled MCP server in Claude Code:

claude mcp add --transport stdio kera -- npx -y kera-mcp --target http://127.0.0.1:3000 --tunnel

With the plugin, set KERA_TUNNEL=true in the environment that starts Claude Code instead. Tunneling and get_tunnel_url ship in kera-mcp@0.3.0 and later on npm. Call get_tunnel_url and append your webhook path to the returned https://…trycloudflare.com URL. A Quick Tunnel needs no Cloudflare account, exposes every route served through Kera, and gets a new URL each time it starts. Keep application authentication or signature verification enabled and stop the MCP server when done. See Public tunnels.

Use Kera from the terminal

Set up the kera command using the CLI installation instructions. With your app running on port 3000, start Kera in a separate terminal:

kera listen 3000

Send a test request to your app through http://127.0.0.1:4000. Then list recent captures, copy an ID, and replace <capture-id> with it:

kera requests --limit 5
kera inspect '<capture-id>'
kera requests --status 5xx --json

The standalone kera-terminal package shares ~/.kera/traffic.db with MCP. The CLI starts a public tunnel only when you pass kera listen 3000 --tunnel. See the CLI guide for replay, cleanup, and terminal shortcuts.

Use kera status to see active instances and their proxy, dashboard, and tunnel URLs. If a Kera instance is already using a port, run kera stop --port 4000 (or use --pid) to stop it gracefully. kera stop --all stops all instances in the current KERA_DATA_DIR.

Check your installed version with kera --version or check npm for a newer release with kera update --check. Run kera update to upgrade a global npm install after confirmation, or add --yes to skip the prompt. Restart running proxy or dashboard processes afterward. See Update Kera for other installation methods.

Open the local dashboard

Install kera-terminal from npm, then start the dashboard with your app running on port 3000:

npm install -g kera-terminal
kera listen 3000 --dashboard
# Or, with an existing Kera proxy:
kera ui

Open http://127.0.0.1:4040 to watch incoming requests, inspect redacted exchanges, replay original or edited payloads, and compare their JSON keys. The dashboard includes provider icons and Light, Dark, and System themes. Press / or ⌘K to search, j/k or the arrow keys to select a capture, r to replay, c to copy a redacted curl command, and Esc to close a panel. kera ui --target 3000 enables replay when running the dashboard separately. Set --ui-port or KERA_UI_PORT to change the dashboard port. See the dashboard guide.

MCP directories & registries

Kera is listed in the public MCP directories:

  • Glama — hosted listing with tool schemas and an online inspector.
  • Official MCP Registry: io.github.mcdavidobioha/kera — installs the npm version pinned in the published registry entry.
  • npm: kera-mcp — current npm releases, which can be newer than the registry entry.

Example Agent Workflow

Ask your AI coding assistant:

"Check the last failed webhook in Kera, find out why it returned 500, fix my route handler, and replay the request to verify."

Your agent uses Kera's MCP tools in sequence:

  1. list_requests ({"status":500,"provider":"stripe"}) — Finds the failed POST /webhooks/stripe capture and its event type and ID.
  2. inspect_request — Uses that ID to review redacted headers, compressed request and response bodies, and any proxy error. Uses local app logs and code to diagnose the 500.
  3. Code fix — Patches the bug in the handler.
  4. replay_request — After approval if there may be external side effects, uses the original ID and omits body overrides. Checks the upstream responseStatus, then inspects the replay ID to verify the outcome.

Available MCP Tools

ToolParametersDescription
list_requestslimit?, status?, provider?, path_contains?Lists compact summaries. Filter by a provider name, such as stripe or paystack.
inspect_requestid, raw?Returns headers, payload, status, and timing for one exchange (redacted & compressed by default).
replay_requestid, override_body?, override_headers?Replays once to the configured target and warns if the signed body changes without re-signing.
diff_payloadsid_a, id_bCompares two captured JSON request bodies and masks sensitive fields.
clear_trafficolder_than_minutes?, confirm?Previews the scope and deletes captures only with confirm: true.
get_tunnel_url—Returns the active public HTTPS URL or tells you how to enable or troubleshoot the tunnel.
get_status—Lists active Kera instances and their proxy, dashboard, tunnel, and target URLs.
stop_serverport?, pid?, include_self?, confirm?Previews matching instances. Stops them with confirm: true; skips the current MCP process unless include_self: true.

override_body accepts UTF-8 text or null to remove the body; override_headers maps names to strings or arrays of strings. A truncated or interrupted upload requires an explicit body override. Omit older_than_minutes to preview all stored traffic. clear_traffic reports the requested scope even if a confirmed deletion fails. inspect_request with raw: true shows more detail within a byte limit. By default, it still redacts sensitive values and re-serializes JSON for display without changing the capture in SQLite. Replays never follow redirects. diff_payloads requires complete UTF-8 JSON bodies with no content encoding other than identity and masks recognized credential and signature fields.


Configuration & CLI Flags

FlagEnvironment VariableDefaultDescription
--target <url>KERA_TARGET_URL(Required)Upstream local application URL (e.g., http://localhost:3000).
--port <number>KERA_LISTEN_PORT4000Local port Kera listens on.
--host <addr>KERA_LISTEN_HOST127.0.0.1Local bind address (localhost-only by default).
--tunnelKERA_TUNNELfalseOpt in to a public Quick Tunnel with automatic cloudflared setup; loopback only.
—KERA_CLOUDFLARED_PATHAutoUse a specific executable instead of system PATH or the managed binary.
--ui-port <number>KERA_UI_PORT4040Dashboard port for kera ui or kera listen --dashboard; loopback only.
--data-dir <path>KERA_DATA_DIR~/.keraDirectory for local SQLite storage (traffic.db).
--max-requests <n>KERA_MAX_STORED_REQUESTS1000Maximum retained captures, including failures.
--max-body-bytes <n>KERA_MAX_BODY_BYTES1048576Per-body capture limit in bytes (1 MiB).
--log-level <lvl>KERA_LOG_LEVELinfoinfo and debug show readiness on stderr; warn and error suppress it.
—KERA_REDACTION_POLICYredactSet allow-unredacted-raw only if raw inspection may expose sensitive data.

Flags take precedence over environment variables. Proxy startup flags in this table apply to MCP (including kera mcp). The terminal commands have their own syntax; for example, kera listen takes a positional target and requires --tunnel to enable a tunnel. See Configuration and the CLI guide for command-specific settings.


Security & Privacy by Default

  • Local-First Storage: Captures are stored locally in ~/.kera/traffic.db by default (0600 permissions on POSIX). The proxy sends traffic to your configured target.
  • Automatic Secret Redaction: Default inspection masks credential headers, webhook signatures, and recognized sensitive query and body fields.
  • SSRF & Loop Guards: Replays are strictly restricted to your configured target URL. Kera rejects requests with x-kera-hop before accepting their bodies.
  • Protocol-Clean stdio: All diagnostic logs write exclusively to stderr so MCP JSON-RPC messages on stdout are never corrupted.
  • Opt-In Public Exposure: Quick Tunnels are off by default. Enabling one sends public HTTPS requests through Cloudflare to the loopback proxy.

Read the security model for the full threat model and responsible-use guidelines.

Privacy & Data Handling

  • 100% local-first execution: Kera runs on your machine without Kera cloud servers, user accounts, analytics, cloud sync, or telemetry. The Kera runtime sends 0 bytes to Kera infrastructure. The local dashboard serves its own assets and uses system fonts: no external asset CDN calls.
  • Storage and deletion: Kera keeps the newest 1,000 captures by default in ~/.kera/traffic.db (0600 on POSIX). The database can contain original headers and body bytes, including secrets. To delete captures, run kera clear and confirm, or call clear_traffic with confirm: true. To remove the store, stop Kera and delete ~/.kera/ (or your configured data directory). Clearing captures does not securely erase files or remove copies elsewhere.

What can leave your machine when you connect an AI client or enable a tunnel:

  1. LLM context: When you or your editor's MCP client invokes an inspection tool, Kera returns request and response excerpts over local stdio, redacted by default. The client may include them in the context it sends to your chosen model provider (such as Anthropic or OpenAI). Kera does not contact the model provider directly. Redaction is name-based; paths, free-form text, and unrecognized fields may still contain secrets.
  2. Public tunnels (--tunnel): Off by default. If enabled, public webhook requests and responses transit Cloudflare Quick Tunnels. cloudflared delivers requests to your local 127.0.0.1 listener.

Kera forwards and replays requests to your configured upstream, so a remote target receives that traffic even without a tunnel. See the security policy and the Privacy and Data Handling wiki page.


Ecosystem Roadmap

Kera is built around a single core engine (packages/core/) shared by its adapters:

  • Phase 1 — kera-mcp on npm (Complete): Local MCP stdio server for AI coding agents.
  • Phase 1.5 — Tunnels, Claude Code plugin, and MCP listings (Complete): Opt-in Cloudflare Quick Tunnels, a Claude Code marketplace plugin, and listings on Glama and the Official MCP Registry.
  • Phase 2 — kera-terminal (Complete): Standalone terminal commands, interactive live feed, and the umbrella kera command, including kera mcp.
  • Phase 3 — Kera Dashboard (Complete): Local browser UI (127.0.0.1:4040) for visual request inspection, JSON diffing, and one-click replay.

See the roadmap for detailed milestone tracking.


Documentation

GuideDescription
docs/DESIGN.mdEngineering design, product phases, and technical specifications
docs/ARCHITECTURE.mdModule boundaries, request lifecycle, and SQLite schema
docs/DASHBOARD.mdDashboard setup, debugging workflow, and REST/SSE API
docs/MCP_SETUP.mdDetailed setup instructions for supported MCP clients
docs/CONFIGURATION.mdFlags, environment variables, storage paths, and limits
docs/PROVIDERS.mdWebhook providers, replay warnings, and extension guide
docs/SECURITY.mdRedaction policy, SSRF protections, and local data handling
docs/DEVELOPMENT.mdLocal development setup, testing, and npm publishing workflow
docs/GITHUB_PUBLISHING.mdGitHub Actions and npm Trusted Publishing
assets/README.mdBrand logos, icons, and monorepo asset guidelines

Contributing & License

Contributions, bug reports, and new webhook provider integrations are welcome! Please read CONTRIBUTING.md and AGENTS.md before submitting a pull request.

main is protected. Submit changes from a feature branch for squash merge through a pull request.

Released under the MIT License.

NPM
kera-mcp
Install Command
npm install kera-mcp