Home / Servers / DigitalOcean API / harness_get_session_port_forward

PortForwardSession opens a WebSocket tunnel to a guest TCP port.

An MCP tool from the DigitalOcean API server, hosted on mcp.hjlabs.in.

PortForwardSession opens a WebSocket tunnel to a guest TCP port. Upgrades the request to a WebSocket and bridges it to one TCP connection on the session sandbox's guest port. Binary frames carry the opaque byte stream in both directions; the server closes with a… [GET /v2/agents/sessions/{session_id}/port-forward/{port}]

Name on the gateway: digitalocean_api__harness_get_session_port_forward · read-only.

Parameters

NameTypeDescription
session_id requiredstringThe session UUID.
port requiredintegerThe guest TCP port to connect to. Must be between 1024 and…

How to call it

Through the Smart Gateway, any client can run it by name with call_tool, or let the gateway find it with search_tools:

call_tool arguments
{
  "name": "digitalocean_api__harness_get_session_port_forward",
  "arguments": {
    "session_id": "…",
    "port": 0
  }
}

Or connect the DigitalOcean API server directly, which lists 874 tools including this one:

Run in your terminal
claude mcp add --transport http hj-digitalocean-api https://mcp.hjlabs.in/mcp/digitalocean-api \
  --header "Authorization: Bearer YOUR_API_KEY"

Try asking

Use the portforwardsession opens a websocket tunnel to a guest tcp port. tool with session_id set to ….

More from DigitalOcean API