kubefwd — Claude Code MCP server: what it does, how to install
Forwards Kubernetes cluster services to your local machine using unique loopback IPs and hosts entries. Useful for local development without changing service URLs.
Open on GitHubWhat kubefwd does
kubefwd bulk forwards Kubernetes cluster services directly to your development workstation. It detects services in target namespaces, assigns each one a dedicated 127.x.x.x loopback IP address, and updates /etc/hosts. Your local code can use the exact same hostname and port configurations as running in-cluster.
The tool includes a terminal user interface that tracks live traffic metrics and streams pod logs. Connections reconnect automatically whenever pods restart. It also exposes a REST API and an MCP interface for AI assistants like Claude Code and Cursor.
Root privileges are mandatory. Without sudo, kubefwd cannot create loopback IP aliases or write to /etc/hosts. A functioning kubectl configuration with cluster access is also required.
What it helps with
- Forward all Kubernetes services across namespaces in a single command
- Prevent local port collisions by assigning unique 127.x.x.x loopback IPs
- Access remote cluster services by their in-cluster hostnames locally
- Reconnect dropped port-forward tunnels automatically after pod restarts
- Inspect live traffic volume and stream container logs inside a TUI
Example prompts for the agent
- Forward all Kubernetes services in the default namespace using kubefwd with TUI
- Run kubefwd across both default and staging namespaces
- Forward services matching label app=api and enable the REST API flag
How to install kubefwd
Install
The MCP registry has no launch command for it: see the repository README
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about kubefwd
How to install kubefwd?
Install the binary on macOS via brew install kubefwd or on Windows using winget install txn2.kubefwd. Linux packages are available in GitHub releases, and execution requires root permissions.
What does kubefwd do?
It forwards multiple Kubernetes services to local unique loopback IPs simultaneously. The tool writes service names to /etc/hosts, allowing local programs to reach cluster resources via their original DNS names.
What prerequisites are needed to run kubefwd?
You need kubectl configured with cluster access and root or sudo permissions. Administrative access is necessary because the tool creates loopback IP aliases and edits /etc/hosts.