kubernetes_port_forward
MCP tools › Containers and Kubernetes
Kubernetes port forwards owned by this Ferris IDEA process, shared with the Containers window: list; start runs kubectl port-forward <kind>/<name> <local>:<remote> --address 127.0.0.1 for a Pod, Service, Deployment, StatefulSet or DaemonSet (remote_port defaults to the object's first TCP port, local_port to the same number when free and >= 1024, else a free one) and waits for kubectl's forwarding line; stop ends forward id. start defaults to dry_run=true and returns the command; starting and stopping for real need the user-granted run right and are logged in .ferris-idea/agent-log.jsonl. Forwards listen on 127.0.0.1 only and end with the process.
| Capability | containers.kubernetes_port_forward |
|---|---|
| Area | Containers and Kubernetes |
| Access | changes ide, processes |
| Reaches | process, network |
| Rights | run |
| Dry run | dry_run, on unless the call turns it off |
Arguments
| Argument | Type | Description |
|---|---|---|
actionrequired | string | list, start or stop. |
context | string | Context for start (default: the current one). |
namespace | string | Namespace for start (default: the context's). |
kind | string | Pod, Service, Deployment, StatefulSet or DaemonSet for start. |
name | string | Object name for start. |
remote_port | integer | Port of the object (default: its first TCP port).minimum 0 · maximum 65535 |
local_port | integer | Port on 127.0.0.1 (default: the remote port when free and >= 1024, else a free one).minimum 0 · maximum 65535 |
id | integer | Forward to stop.minimum 0 |
dry_run | boolean | For start: only report the command (default true). |
Call it from a shell
ferris-idea call runs one tool with the rights and safe mode of ferris-idea mcp. Replace the folder and the placeholder values.
ferris-idea call ~/my-project kubernetes_port_forward '{"action":"<string>"}'Input schema as JSON
{ "type": "object", "required": [ "action" ], "properties": { "action": { "description": "`list`, `start` or `stop`.", "type": "string" }, "context": { "description": "Context for `start` (default: the current one).", "type": [ "string", "null" ] }, "namespace": { "description": "Namespace for `start` (default: the context's).", "type": [ "string", "null" ] }, "kind": { "description": "`Pod`, `Service`, `Deployment`, `StatefulSet` or `DaemonSet` for `start`.", "type": [ "string", "null" ] }, "name": { "description": "Object name for `start`.", "type": [ "string", "null" ] }, "remote_port": { "description": "Port of the object (default: its first TCP port).", "type": [ "integer", "null" ], "maximum": 65535, "minimum": 0 }, "local_port": { "description": "Port on 127.0.0.1 (default: the remote port when free and >= 1024, else a free one).", "type": [ "integer", "null" ], "maximum": 65535, "minimum": 0 }, "id": { "description": "Forward to stop.", "type": [ "integer", "null" ], "minimum": 0 }, "dry_run": { "description": "For `start`: only report the command (default true).", "type": [ "boolean", "null" ] } }}