http://localhost:2345/mcp, on the same address as the UI. It runs whenever Localdev runs, so there’s nothing to install or start. Localdev prints its address at start-up:
Connect an agent
Start Localdev first: the agent can only connect while Localdev runs. If you changed the address with-server, change the URL to match.
Claude Code
Run this in your project’s repository:--scope project saves the server in .mcp.json at the root of the repository. Commit it next to your Projectfile, and everyone on the project gets the server without setting it up. Claude Code asks each person to approve it the first time.
To check the connection, run claude mcp list, or /mcp inside Claude Code:
Cursor and VS Code
For Cursor, create.cursor/mcp.json in your project, or ~/.cursor/mcp.json for every project:
.cursor/mcp.json
.vscode/mcp.json:
.vscode/mcp.json
Other clients
The server uses the Streamable HTTP transport. Clients that only support stdio can’t connect to it. To try the tools by hand, use the command line of the MCP Inspector:The tools
since takes a duration (15m, 2h, 1d) or an RFC 3339 time. Without it, the tools search everything Localdev still has in memory.
The tools point to each other, and agents follow them: from project_status to service_output for a crashed service, from search_traces status=error to get_trace, from a trace ID to search_logs trace_id=…, and from list_metrics to get_metric.
What the output looks like
The tools return text written for a model, not JSON. Times are local clock times, with a date when they’re not today. Each result starts with the current time, so the agent can tell how old things are.search_traces:
get_trace:
- Failed spans show
ERROR: <message>, their attributes, and any exception with its stack trace, cut at 30 lines. - Three or more identical sibling spans that didn’t fail are folded into one line, such as
gateway SELECT product (client) ×12, each 1ms to 2ms. That makes an N+1 query easy to spot. - A large trace is cut at 300 lines. Failed spans after the cut are still listed.
no service named "wroker"; services are: demo. An unknown metric lists the service’s metrics, an attribute filter that matches nothing lists the values that exist, and an empty result names the filters that were used.
What to expect
Ask about your project the way you’d ask a colleague:- “Checkout is failing. Find out why.”
- “Why did the worker die?”
- “I fixed the handler. Is it still failing?”
- “What’s slow in this request?” or “What’s the p95 latency of the order endpoint?”
- “Which services call inventory, and what does inventory call?”
project_status, then follow the tools’ hints: service_output for a service that crashed, and get_trace for the IDs that search_traces and search_logs return. They often mention problems you didn’t ask about, such as a crashed service while you asked about latency. When your instrumentation records code.filepath on spans, the agent can tell where in your code a span comes from, and read the source next.
A specific question gets a faster and cheaper answer than a vague one. Every tool call adds its result to the conversation, and a vague question takes more calls. If you know which service is involved, say so.
What the tools can see
- Never returned: the values of environment variables (from the Projectfile or Localdev’s own), and span resource attributes, such as process command lines and host details.
- Only what’s in memory: the tools see the same telemetry as the UI, within the same limits (see
store). It’s gone when Localdev stops. - Only from this machine: Localdev accepts MCP requests only from the machine it runs on. With
-server 0.0.0.0:2345, other machines can open the UI, but they can’t use the MCP server. - Not from web pages: a request sent from another website’s page is refused, and so is a request with an unexpected
Hostheader. - No login: like the rest of Localdev, any program you run on this machine can call it.
Troubleshooting
Several projects at once
Each instance of Localdev has its own MCP server on its own-server port. Add each one under its own name, for example localdev-shop on port 2345 and localdev-billing on port 2355:

