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.
- YouDeniz needs to test the checkout page. Open it up and give me a link.
- Agent
tunnel_create { port: 3000 }→ https://my-shop-ada.portmole.dev
- AgentIt's live at my-shop-ada.portmole.dev. I'll watch what comes in.
- Agent
tunnel_requests { name: "my-shop" }GET /checkout 200 38 msPOST /webhooks/payment 200 41 ms
One connection out. Nothing listening on your machine.
Opens your address in a browser, or a service posts a webhook to it.
Finds the session that owns the address and passes the request down the connection your machine opened.
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
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.
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.
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.
{
"mcpServers": {
"portmole": { "command": "npx", "args": ["-y", "portmole", "mcp"] }
}
}
Settings → Developer → Edit Config opens claude_desktop_config.json. Add the entry, then restart the app.
codex mcp add portmole -- npx -y portmole mcp
Or add it to ~/.codex/config.toml by hand:
[mcp_servers.portmole]
command = "npx"
args = ["-y", "portmole", "mcp"]
{
"mcpServers": {
"portmole": { "command": "npx", "args": ["-y", "portmole", "mcp"] }
}
}
Put this in .cursor/mcp.json in your project, or in ~/.cursor/mcp.json for every project.
{
"servers": {
"portmole": { "type": "stdio", "command": "npx", "args": ["-y", "portmole", "mcp"] }
}
}
Put this in .vscode/mcp.json in your workspace. VS Code calls the list servers, not mcpServers.
{
"mcpServers": {
"portmole": { "command": "npx", "args": ["-y", "portmole", "mcp"] }
}
}
Put this in ~/.codeium/windsurf/mcp_config.json, then refresh the MCP servers in Windsurf's settings.
{
"mcpServers": {
"portmole": { "command": "npx", "args": ["-y", "portmole", "mcp"] }
}
}
Put this in ~/.gemini/settings.json, or in .gemini/settings.json in your project.
{
"mcpServers": {
"portmole": { "command": "npx", "args": ["-y", "portmole", "mcp"] }
}
}
Any MCP client that can start a local program works. The command is npx with the arguments -y portmole mcp; most tools take it in this shape.
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
- Install.
npm install -g portmole. Without Node, download the program for your system from the releases page and put it on yourPATH. - Check.
portmole versionprints the version. - Sign in.
portmole loginprints a link; approve the code it shows in your browser. - Open a port.
portmole http 3000prints 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 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 once | 2 |
|---|---|
| Session length | 2 hours |
| Requests per visitor, per tunnel | 120 / min |
| Data per day | 5 GB |
| Requests kept for the agent | last 20 |
| Notice on a browser's first visit | yes |
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.