> ## Documentation Index
> Fetch the complete documentation index at: https://docs.murmur.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# port_url

> MCP tool that returns a public tunnel URL for a port on an agent's VM so coding agents can share dev servers and previews with humans.

Returns a public URL that tunnels to a TCP port on the agent's VM, accessible from the internet. Use this to share links to services running locally on the VM (e.g. embed a preview URL in a PR description).

Equivalent to [`murmur url port`](/cli/url-port) in the CLI.

This tool is only available on VMs. It requires the `MURMUR_WORKFLOW_ID` environment variable to be set, which is automatically configured on agent VMs.

## Parameters

| Name   | Type    | Required | Description                                                      |
| ------ | ------- | -------- | ---------------------------------------------------------------- |
| `port` | integer | yes      | TCP port number (1-65535). The port must be listening on the VM. |

## Response

Returns the public HTTPS tunnel URL as a plain string.

## Examples

### Get URL for a dev server

```json theme={null}
{
  "port": 3000
}
```

Response:

```
https://port-a1b2c3d4-3000.murmur.dev
```

### Get URL for a database admin UI

```json theme={null}
{
  "port": 8080
}
```

## Errors

| Code                  | Meaning                                               | What to do                                                                   |
| --------------------- | ----------------------------------------------------- | ---------------------------------------------------------------------------- |
| `INVALID_ARGUMENT`    | Port is outside the valid range (1-65535).            | Use a valid port number.                                                     |
| `FAILED_PRECONDITION` | `MURMUR_WORKFLOW_ID` not set — tool must run on a VM. | This tool is VM-only. It cannot be used from the CLI or off-VM MCP sessions. |
| `INTERNAL`            | Port proxy not configured (`public_url` missing).     | Contact your administrator.                                                  |

## Related

* [`murmur url port`](/cli/url-port) — equivalent CLI command
* [`upload`](/mcp-server/upload) — upload a static file instead of sharing a live port
* [`agent_url`](/mcp-server/agent-url) — get the dashboard URL for an agent
