PluginBench
MCP Server
Active
Apache-2.0

io.github.txn2/kubefwd MCP Server

io.github.txn2/kubefwd

Kubernetes port forwarding for local development with automatic /etc/hosts entries and unique IPs per service.

What is the io.github.txn2/kubefwd MCP server?

The kubefwd MCP server integrates Kubernetes port forwarding into AI assistants like Claude and Cursor, enabling developers to access cluster services locally by name. It bulk-forwards services from a Kubernetes namespace to unique loopback IPs on your workstation, automatically updating /etc/hosts and eliminating port conflicts.

kubefwd enables seamless local development against Kubernetes services by forwarding all services in a namespace to your machine with unique loopback IPs and automatic service name resolution. Instead of managing individual port forwards or environment-specific configs, your code connects to services exactly as it would in-cluster—no setup required.

How to install io.github.txn2/kubefwd

Copy-paste configuration for popular MCP clients.

transport: stdio
Config generated by PluginBench — verify against the source before use.
~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "kubefwd": {
      "command": "https://github.com/txn2/kubefwd/releases/download/v1.25.16/kubefwd-1.25.16-darwin-arm64.mcpb",
      "args": []
    }
  }
}

Tools & capabilities

Tools this server exposes to the agent.

  • Service Discovery and Port Forwarding — Discovers and bulk port-forwards all Kubernetes services in a namespace to unique loopback IPs with automatic /etc/hosts updates
  • Interactive TUI — Real-time service monitoring with traffic metrics, pod log streaming, and live HTTP activity display
  • Auto-Reconnect — Automatically reconnects when pods restart or connections drop
  • REST API — Programmatic control via HTTP endpoints for managing port forwards
  • Multi-Namespace Support — Forward services across multiple namespaces simultaneously
  • Label-Based Filtering — Filter services by Kubernetes labels for selective forwarding

Use cases

  • Connect a local API development server to a database, cache, and auth service running in your Kubernetes cluster by their service names
  • Monitor real-time traffic and pod logs for services being accessed during local testing
  • Forward services from staging or development namespaces to test integration without Docker Compose or environment-specific configs
  • Programmatically manage port forwards via REST API for automated development environment setup
  • Access multiple Kubernetes services simultaneously without port conflict management

io.github.txn2/kubefwd MCP server FAQ

What is kubefwd?

kubefwd is a command-line tool that bulk port-forwards Kubernetes services to your local machine, assigning each service a unique loopback IP and automatically updating /etc/hosts so services are accessible by name.

Is kubefwd free?

Yes, kubefwd is open source under the Apache License 2.0.

How do I install kubefwd for use with Claude or Cursor?

Download the appropriate .mcpb binary for your platform from the releases page, then configure it in your Claude or Cursor settings. See the MCP Integration documentation at kubefwd.com/mcp-integration/ for detailed setup.

What are the system requirements?

You need kubectl configured with cluster access and root/sudo access to modify /etc/hosts and create network interfaces.

Can I forward services from multiple namespaces?

Yes, kubefwd supports forwarding from multiple namespaces in a single command using the -n flag with comma-separated namespace names.

Does kubefwd require any special Kubernetes permissions?

kubefwd uses standard kubectl access; it requires the same permissions as kubectl port-forward to access services in your cluster.

README (reference)

Source of truth, from the repository.

kubefwd (Kube Forward)

kubefwd - kubernetes bulk port forwarding

CNCF Landscape GitHub license codecov Go Report Card GitHub release GitHub Downloads OpenSSF Scorecard OpenSSF Best Practices SLSA 3

Documentation | Getting Started | User Guide | API Reference | MCP (AI Integration)

Develop Locally, Connect to Kubernetes

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.

kubefwd TUI - Main View

Quick Start

# Install (macOS)
brew install kubefwd

# Forward all services in a namespace with the interactive TUI
sudo -E kubefwd svc -n my-namespace --tui

Press ? for help, q to quit. See Getting Started for detailed installation and setup.

How It Works

<div align="center"> <img width="654" alt="kubefwd - Kubernetes Port Forward Diagram" src="https://mk.imti.co/images/content/kubefwd-net.png"> </div>

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:

curl http://api-service:8080
mysql -h database -P 3306
redis-cli -h cache -p 6379

Features

  • Interactive TUI: Real-time service monitoring with traffic metrics
  • Unique IP per Service: Each service gets its own 127.x.x.x address
  • Auto-Reconnect: Reconnects when pods restart or connections drop
  • Bulk Forwarding: Forward all services in a namespace with one command
  • Live Traffic Monitoring: See bytes in/out and HTTP activity
  • Pod Log Streaming: View container logs in the TUI
  • REST API: Programmatic control via HTTP endpoints
  • MCP Support: Integration with AI assistants (Claude Code, Cursor)

Installation

macOS:

brew install kubefwd

Linux: Download .deb, .rpm, or .tar.gz from releases

Windows:

winget install txn2.kubefwd
# or
scoop install kubefwd

Docker:

docker run -it --rm --privileged \
  -v "$HOME/.kube:/root/.kube:ro" \
  txn2/kubefwd services -n my-namespace --tui

Usage

# Interactive mode (recommended)
sudo -E kubefwd svc -n default --tui

# Multiple namespaces
sudo -E kubefwd svc -n default,staging --tui

# Filter by label
sudo -E kubefwd svc -n default -l app=api --tui

# With REST API enabled
sudo -E kubefwd svc -n default --tui --api

Why kubefwd?

Unlike kubectl port-forward, kubefwd:

Featurekubectl port-forwardkubefwd
Services per commandOneAll in namespace
IP allocationlocalhost onlyUnique IP per service
Port conflictsManual managementNone (unique IPs)
Service name resolutionNot supportedAutomatic (/etc/hosts)
Auto-reconnectNoYes
Real-time monitoringNoTUI with metrics

See Comparison for detailed comparisons with Telepresence, mirrord, and other tools.

Documentation

Full documentation at kubefwd.com:

Requirements

  • kubectl configured with cluster access
  • Root/sudo access (for /etc/hosts and network interfaces)

Contributing

We welcome contributions for bug fixes, tests, and documentation. Feature development is limited to maintainers. See CONTRIBUTING.md.

License

Apache License 2.0


Open source by Craig Johnston, sponsored by Deasil Works, Inc.

Related MCP servers

MCP server for DataHub data catalogs. Discover datasets, explore lineage, and access metadata.

3
Go
Apache-2.0
View repository →

MCP server for Trino data warehouses. Query, analyze plans, and explore schemas.

2
Go
Apache-2.0
View repository →

MCP server for the Txtcel Solana protocol: agents post and read undeletable on-chain messages.

1
TypeScript
MIT
View repository →

Gives your AI assistant persistent memory and intelligence about your work patterns.

PRproofcut logo

proofcut

Active

Local-first AI video editor: recordings to a finished film, cut by transcript, then verified

4
Python
View repository →
WEWebsupport logo

Manage a Websupport account: DNS, FTP, hosting, databases, mailboxes, VPS and invoices.

0
TypeScript
MIT
View repository →