opening soon
Surface · the public internet

Your agent can open localhost to the internet.

portmole is a dev tunnel built for coding agents. Claude Code, Codex or Cursor asks for a port and gets back an https:// address that reaches your machine. It works from a terminal too.

agent session~/code/my-shop
  1. YouDeniz needs to test the checkout page. Open it up and give me a link.
  2. Agent
    tunnel_create { port: 3000 }→ https://my-shop-ada.portmole.dev
  3. AgentIt's live at my-shop-ada.portmole.dev. I'll watch what comes in.
  4. Agent
    tunnel_requests { name: "my-shop" }GET /checkout 200 38 msPOST /webhooks/payment 200 41 ms
How it works

One connection out. Nothing listening on your machine.

1 · a visitor https://my-shop-ada.portmole.dev

Opens your address in a browser, or a service posts a webhook to it.

2 · portmole portmole.dev

Finds the session that owns the address and passes the request down the connection your machine opened.

3 · your machine localhost:3000

The portmole client hands the request to your app and sends the answer back the same way.

  • No admin rights
  • No open ports or router setup
  • WebSockets work
  • Windows, macOS and Linux
What your agent gets

Four tools, and the agent already knows the port.

The agent started your dev server, so it knows where it listens. A frontend and an API each get their own tunnel and their own address.

tunnel_create
Opens a port and returns its address. Takes the port, and optionally a name and a password. If you are not signed in yet, it hands the agent a sign-in link to show you.
tunnel_list
Lists what is open in this session, with the local port behind each address.
tunnel_close
Closes one. Everything else closes by itself when the agent session ends.
tunnel_requests
Shows the latest requests that reached a tunnel: time, method, path, status, duration and headers. This is how the agent finds out why a webhook failed.
Details

Built for the way a project is actually shared.

The same address every time

A tunnel is named after your project folder and your account: my-shop-ada.portmole.dev. Open it again tomorrow and the link you already sent still works.

A password when you need one

Ask for basic_auth and visitors have to enter a user name and password before they reach your app. Repeated wrong guesses are locked out.

It comes back by itself

If your connection drops, the client reconnects and your tunnels return under the same addresses.

Sign in with GitHub

No password to create. You approve a short code in the browser once per machine, and you can sign a machine out at any time.

Visitors know where they are

The first time someone opens a tunnel in a browser, a short notice tells them it leads to a developer's computer. Webhooks and API calls are not affected.

An open client

The program that runs on your machine is open source under Apache-2.0. You can read exactly what it sends and where.

Install

Add it to your agent.

Pick your tool. Each one starts portmole the same way, so nothing has to be installed first: npx fetches it when the agent needs it.

claude mcp add portmole -- npx -y portmole mcp

Run it in a terminal. Add -s user after add to have it in every project.

Start a new agent session, then ask in plain words: open port 3000 with portmole. The first tunnel shows you a link to sign in with GitHub. Needs Node 18 or newer.

Or install it and run it yourself

  1. Install. npm install -g portmole. Without Node, download the program for your system from the releases page and put it on your PATH.
  2. Check. portmole version prints the version.
  3. Sign in. portmole login prints a link; approve the code it shows in your browser.
  4. Open a port. portmole http 3000 prints the address and then each request as it arrives. Ctrl+C closes the tunnel.

Once it is installed, an agent can start it directly, which is quicker than npx and works where a desktop app cannot find npx: use portmole as the command and mcp as its only argument. The docs cover the rest.

Free plan

Free for development.

$0 for showing work in progress and testing webhooks

The limits below keep one account from taking the service down for everyone. Paid plans with your own names, your own domain and no session limit come later.

Tunnels open at once2
Session length2 hours
Requests per visitor, per tunnel120 / min
Data per day5 GB
Requests kept for the agentlast 20
Notice on a browser's first visityes
Questions

Before you send a link.

Can portmole see my traffic?

Yes, in transit. Visitors connect to portmole over HTTPS, and portmole passes each request to your machine over the encrypted connection the client opened. Request bodies are not stored. The request log keeps the method, path, status and headers of the last 20 requests in memory, without Authorization and Cookie.

Who can open my address?

Anyone who has it, and the address is easy to guess because it is built from your project and account names. Put a password on the tunnel for anything that should stay private.

Can I use my own domain?

Not yet. Tunnels live under portmole.dev for now. Custom names and your own domain are planned for the paid plans.

What happens after two hours?

The session ends and the tunnels close. Ask your agent to open the port again, or run the command again, and you get the same address back.

Is this for production?

No. portmole is for development: showing unfinished work, testing webhooks, checking a page on your phone. Host production sites on a server.

I received a portmole link that looks like a scam.

Write to [email protected] with the address; how to report a tunnel lists what helps. Every tunnel belongs to a signed-in account, and accounts used for abuse are closed.