Kubefwd

v1.25.14โ€ขDeveloper Toolsโ€ขstable

๐ŸŽ๏ธ ๐Ÿ  - Kubernetes bulk port forwarding with service discovery, /etc/hosts management, traffic monitoring, and pod log streaming

api-restdeveloper-toolsdevopsdevops-toolsdevtools
Share:
4,110
Stars
0
Downloads
0
Weekly
0/5

What is Kubefwd?

Kubefwd is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to ๐ŸŽ๏ธ ๐Ÿ  - kubernetes bulk port forwarding with service discovery, /etc/hosts management, traffic monitoring, and pod log streaming

๐ŸŽ๏ธ ๐Ÿ  - Kubernetes bulk port forwarding with service discovery, /etc/hosts management, traffic monitoring, and pod log streaming

This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • ๐ŸŽ๏ธ ๐Ÿ  - Kubernetes bulk port forwarding with service discover

Use Cases

Kubernetes bulk port forwarding and service discovery
Manage hosts and monitor pod traffic
txn2

Maintainer

LicenseApache-2.0
Languagego
Versionv1.25.14
UpdatedMay 22, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx kubefwd

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Kubefwd

kubefwd is a command-line tool and MCP server that bulk port-forwards all Kubernetes services in one or more namespaces to your local machine, assigning each service its own unique loopback IP so they are reachable by their in-cluster service names without any environment-specific configuration changes. Its MCP integration exposes 28 tools covering namespace discovery, service forwarding, pod log streaming, HTTP traffic monitoring, and health diagnostics, letting AI assistants manage your local-to-cluster connectivity through natural language. It is indispensable for developers who want to run a locally built service that calls other cluster services (databases, auth, cache) using the same hostnames it would use in production.

Prerequisites

  • kubectl installed and configured with a valid kubeconfig pointing at your cluster
  • kubefwd binary installed (Homebrew, winget, scoop, or GitHub Releases binary)
  • Root/sudo access โ€” kubefwd modifies /etc/hosts and creates loopback network interfaces
  • An MCP-compatible client such as Claude Desktop or Cursor
  • An active Kubernetes cluster (local or remote) accessible via kubectl
1

Install kubefwd

Install kubefwd using your platform's package manager. On macOS use Homebrew; on Windows use winget or scoop; on Linux download the appropriate binary from the GitHub releases page.

# macOS
brew install kubefwd

# Windows
winget install txn2.kubefwd

# Linux โ€” download .deb / .rpm / .tar.gz from releases
https://github.com/txn2/kubefwd/releases
2

Verify kubectl context

kubefwd uses your active kubectl context. Confirm you are pointing at the correct cluster before forwarding services.

kubectl config current-context
kubectl get nodes
3

Forward services in a namespace

Run kubefwd with sudo to forward all services in a namespace. The --tui flag launches an interactive terminal UI showing active forwards, traffic, and pod status.

sudo -E kubefwd svc -n default --tui
4

Install kubefwd MCP extension in Claude Desktop

Download the platform-specific .mcpb bundle from the kubefwd GitHub releases page and double-click it to install it as a Claude Desktop extension. Alternatively, use the JSON config for other MCP clients.

# Generic JSON config for other MCP clients
{
  "mcpServers": {
    "kubefwd": {
      "command": "kubefwd",
      "args": ["mcp"]
    }
  }
}
5

Enable the REST API for programmatic access

Start kubefwd with the --api flag to expose a local REST API alongside the TUI. The MCP server communicates with this API to manage forwards.

sudo -E kubefwd svc -n default --tui --api
6

Filter services by label

In large namespaces you may only want specific services. Use the -l flag with a label selector to limit which services are forwarded.

sudo -E kubefwd svc -n default -l app=api --tui

Kubefwd Examples

Client configuration

JSON configuration for MCP clients that support command-based servers. Requires kubefwd to be on PATH.

{
  "mcpServers": {
    "kubefwd": {
      "command": "kubefwd",
      "args": ["mcp"]
    }
  }
}

Prompts to try

Sample prompts to manage Kubernetes port-forwarding through the kubefwd MCP server.

- "List all Kubernetes namespaces available in my current context"
- "Forward all services in the staging namespace and show me their local hostnames"
- "Stream the logs from the api-gateway pod in the default namespace"
- "Show me the HTTP traffic going through the auth service"
- "What services are currently being forwarded and what IPs are they using?"

Troubleshooting Kubefwd

Permission denied error when running kubefwd

kubefwd requires root to modify /etc/hosts and create loopback interfaces. Always run it with `sudo -E` (the -E flag preserves your environment variables including KUBECONFIG).

Services are not reachable by name after forwarding

kubefwd writes entries to /etc/hosts. If names are not resolving, check that /etc/hosts contains the kubefwd entries with `cat /etc/hosts | grep kubefwd`. Flush your DNS cache if needed (`sudo dscacheutil -flushcache` on macOS).

MCP server cannot connect to kubefwd

Ensure kubefwd is running with the --api flag before starting the MCP server. The MCP tools communicate via kubefwd's local REST API, so kubefwd must be started first.

Frequently Asked Questions about Kubefwd

What is Kubefwd?

Kubefwd is a Model Context Protocol (MCP) server that ๐ŸŽ๏ธ ๐Ÿ  - kubernetes bulk port forwarding with service discovery, /etc/hosts management, traffic monitoring, and pod log streaming It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Kubefwd?

Follow the installation instructions on the Kubefwd GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with Kubefwd?

Kubefwd works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Kubefwd free to use?

Yes, Kubefwd is open source and available under the Apache-2.0 license. You can use it freely in both personal and commercial projects.

Browse More Developer Tools MCP Servers

Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "kubefwd": { "command": "npx", "args": ["-y", "kubefwd"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide โ†’

Ready to use Kubefwd?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides