Kubefwd
๐๏ธ ๐ - Kubernetes bulk port forwarding with service discovery, /etc/hosts management, traffic monitoring, and pod log streaming
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
Maintainer
Works with
Installation
Manual Installation
npx kubefwdConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
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
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/releasesVerify 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 nodesForward 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 --tuiInstall 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"]
}
}
}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 --apiFilter 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 --tuiKubefwd 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.
Kubefwd Alternatives โ Similar Developer Tools Servers
Looking for alternatives to Kubefwd? Here are other popular developer tools servers you can use with Claude, Cursor, and VS Code.
Ecc
โ 188.2kThe agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Javaguide
โ 155.8kJava ้ข่ฏ & ๅ็ซฏ้็จ้ข่ฏๆๅ๏ผ่ฆ็่ฎก็ฎๆบๅบ็กใๆฐๆฎๅบใๅๅธๅผใ้ซๅนถๅใ็ณป็ป่ฎพ่ฎกไธ AI ๅบ็จๅผๅ
Gemini CLI
โ 104.5kA secure MCP server that wraps the Google Gemini CLI, allowing clients to query Gemini models using local OAuth sessions without requiring an API key. It provides tools for model interaction and diagnostics with built-in protection against command in
Awesome MCP Servers
โ 87.3kโญ Curated list of Model Context Protocol (MCP) servers - tools that extend Claude Desktop, Cursor, Windsurf, and other MCP clients with custom capabilities.
MCP Servers
โ 86.0kModel Context Protocol Servers
CC Switch
โ 77.5kA cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Gemini CLI & Hermes Agent. Only official website: ccswitch.io
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.
Set Up Kubefwd in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
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.