Overview
Connect an AI agent to LocalCan, so it can inspect your captured traffic and create and manage your Public URLs.
LocalCan runs a Model Context Protocol server that gives AI coding agents (Claude Code, Codex, Cursor, Claude Desktop, and more) first-class tools for what LocalCan does: capturing your HTTP traffic and running your Public URLs (tunnels). Ask your assistant to look at the request a failing webhook actually sent, or to expose port 3000 and hand you the URL.
What an agent can do
- Read your captured request and response traffic, export a single exchange as markdown, cURL, raw HTTP, HAR, or JSON, and turn capture on when it is off.
- See the services you serve and your Public URLs with their state (a service is one local app LocalCan serves, and a project groups services).
- Create a Public URL for a local port, add one to an existing service, and pause, resume, or remove Public URLs. All of these need write access, a separate switch that is off by default. Creating one also needs an active license.
Two ways to connect
Agents that speak the Model Context Protocol call LocalCan's tools directly. This is the smoothest path. See MCP server to set it up.
An agent that runs shell commands can use the CLI instead. It covers the same ground, reading traffic and managing Public URLs:
localcan traffic ls --status 5xx --json
localcan traffic get <id> --format markdown
See Traffic and the CLI reference for the full command set.
Before you start
- LocalCan must be running. Open the desktop app or run
localcan start -d. - Capture must be on for the traffic tools. Turn it on in the app or with
localcan traffic enable, or let the agent do it with theenable_capturetool.
A typical session
Say a webhook just failed. Retrigger it and ask your agent something like "a webhook just failed in LocalCan, find out why." The agent lists recent 5xx exchanges, reads the failing one (request headers, the payload, the response body and status), cross-references your handler code, and explains the bug.
Prompts like these work well:
- "A webhook just failed in LocalCan. Find it and explain why."
- "Expose port 3000 publicly and give me the URL."
- "Which Public URLs am I not using? Pause them."
- "Export the last 5xx exchange as a curl command I can replay."
Access and privacy
Agent access is on by default and sensitive headers are redacted from agent responses by default. Creating or changing Public URLs needs a separate write-access opt-in, off by default. See MCP server for the switches.
© 2026 LocalCan™. All rights reserved.