Kubernetes port forwarding for local development with automatic /etc/hosts entries.
Model Context Protocol (MCP) Server: io.github.txn2/kubefwd
This MCP server provides Kubernetes port forwarding for local development and supports automatic /etc/hosts entries. Its scope is centered on kubefwd-style networking workflows, with emphasis on forwarding to Kubernetes clusters and related development tools.
🛠️ Key Features
Kubernetes port forwarding for local development
Automatic /etc/hosts entries
🚀 Use Cases
Forward Kubernetes services to local environments
Improve local access to cluster endpoints using host entries
⚡ Developer Benefits
Developer tooling for Kubernetes networking and proxy-style workflows
Categorized for kubernetes-clusters, networking, and port-forwarding usage
⚠️ Limitations
The available description only specifies port forwarding and /etc/hosts behavior; other MCP capabilities are not included in the provided data.
kubefwd enables developers to work on their local machine while seamlessly accessing services running in a Kubernetes cluster. If you're building a new API that needs to connect to a database at db:5432, an auth service at auth:443, and a cache at redis:6379, all running in your development cluster, kubefwd makes them available locally by their service names, exactly as they would appear in-cluster. No environment-specific configuration, no local service setup, no Docker Compose files. Just run kubefwd and your application's existing connection strings work.
This is the essential use case: reduce or eliminate environment-specific connection setup and configurations during local development. Your code uses http://api-gateway:8080 in production? It works the same way on your laptop with kubefwd.
Bulk Kubernetes port forwarding with an interactive TUI, unique IPs per service, and automatic reconnection.
kubefwd is a command-line utility that bulk port forwards Kubernetes services to your local workstation. Each service gets its own unique loopback IP (127.x.x.x), eliminating port conflicts and enabling realistic local development with cluster services accessible by name.
Quick Start
bash
# Install (macOS)
brew install kubefwd
# Forward all services in a namespace with the interactive TUIsudo -E kubefwd svc -n my-namespace --tui
Press ? for help, q to quit. See Getting Started for detailed installation and setup.
How It Works
kubefwd - Kubernetes Port Forward Diagram
kubefwd discovers services in your namespace, assigns each a unique loopback IP, updates /etc/hosts with service names, and establishes port forwards through the Kubernetes API. Access services by name just like in-cluster: