← All articles

Error Connecting to MCP Inspector Proxy: Causes and Fixes

July 8, 2026·14 min read·MCPForge

Quick Answer

The error connecting to MCP Inspector proxy means the Inspector browser UI cannot reach the local proxy process — or the proxy cannot reach your target MCP server. Before diving into individual fixes, run this prioritized diagnostic:

  1. Is the Inspector process running? Look for its terminal output. If the terminal closed, nothing will work.
  2. What port is the proxy on? Confirm the UI is pointing at the address the proxy actually bound to.
  3. Did the proxy emit a startup error? Read the terminal for spawn errors, port-in-use messages, or immediate exits.
  4. What does the browser console say? ERR_CONNECTION_REFUSED = proxy unreachable. 4xx/5xx = proxy reached but target failed.
  5. Does the target server start independently? Run it manually to isolate server-only failures.

60-Second Fix Checklist

  • Terminal running npx @modelcontextprotocol/inspector is open and still running
  • No startup error visible in the Inspector terminal (port conflict, spawn error, missing command)
  • Proxy address and port in the browser URL match what the terminal reports
  • Browser console shows no ERR_CONNECTION_REFUSED or CORS error against the proxy URL
  • Target server command and args are exactly correct (test them manually first)
  • All required environment variables are passed to Inspector
  • No other process is occupying the proxy port (lsof -i :<port> / netstat -ano | findstr :<port>)
  • If using Docker or WSL: proxy and server are reachable via the correct host address, not localhost
  • No firewall or VPN rule is blocking the proxy port on loopback
  • Inspector version is current (npm list -g @modelcontextprotocol/inspector or run with @latest)

How the MCP Inspector Proxy Connection Works

MCP Inspector is not a single process — it is a browser UI backed by a local proxy. Understanding the layers tells you exactly where to look when something breaks.

Browser UI  (React frontend, served on a local HTTP port)
    |
    |  HTTP / fetch to proxy API
    v
Inspector Proxy  (Node.js process, started by npx @modelcontextprotocol/inspector)
    |
    |  stdio pipe  →  for stdio MCP servers
    |  HTTP        →  for Streamable HTTP MCP servers
    v
Target MCP Server  (your server binary, Node script, Python process, etc.)

There are two independent connection points, and the error message is the same for both.

ConnectionWhat it doesHow it fails
Browser → ProxyBrowser fetches the proxy's local HTTP APIProxy not running, wrong port, localhost unreachable, firewall
Proxy → Target ServerProxy spawns or connects to your MCP serverWrong command, missing executable, server exits, wrong URL

The Inspector UI loads from a static server, so it renders even when the proxy is completely down. That is why you can see the UI but still hit the connection error.


Is the Proxy Down or Is the MCP Server Failing?

This table helps you identify the failing layer before touching any configuration.

SymptomFailing LayerHow to VerifyFirst Fix
Browser console: ERR_CONNECTION_REFUSED against proxy URLProxy not runningCheck if Inspector process is alive in terminalRestart Inspector
Inspector terminal: nothing / closedProxy not startedRe-open terminal, run npx @modelcontextprotocol/inspectorRe-run Inspector
Inspector terminal: EADDRINUSE or address already in usePort conflictlsof -i :<port>Kill conflicting process or change port
Inspector terminal: spawn ENOENT or command not foundTarget server executable missingRun the exact command manually in the same shellFix command path or install missing package
Inspector terminal: Process exited with code NTarget server crashedRun server manually, read its stderrFix the server startup error
Browser console: HTTP 4xx or 5xx from proxyProxy running, server failingCheck proxy terminal for the HTTP error detailFix target server or endpoint URL
UI loads, connect button hangs or errorsProxy up, server unreachableCheck proxy terminal for connection attempt errorsVerify server transport type and URL
Inspector works locally, fails in Docker/WSLNetwork namespace mismatchTry host IP instead of localhostUse host.docker.internal or correct host IP

Fix "Error Connecting to MCP Inspector Proxy"

1. Confirm the Inspector Process Is Running

Every fix starts here. If the Inspector terminal is closed, no browser action will help.

bash
# Start Inspector with a stdio server
npx @modelcontextprotocol/inspector node path/to/server.js

# Start Inspector with a Streamable HTTP server
npx @modelcontextprotocol/inspector --cli http://localhost:3000/mcp

# Always keep this terminal visible

The terminal must stay open for the proxy to remain alive. If you ran it in a background job or a closed terminal, the proxy is gone.

2. Check the Exact Address the Proxy Bound To

When Inspector starts successfully, it prints the URL where the UI is available and where the proxy is listening. Verify your browser is using that exact address.

If the terminal says the proxy is on port 3000 but your browser is hitting localhost:5173 (or vice versa), you are connecting to the wrong endpoint.

3. Test Proxy Reachability Directly

Before touching any server configuration, confirm the proxy itself responds:

bash
# Replace PORT with whatever Inspector printed
curl -v http://localhost:PORT/

If curl also gets Connection refused, the proxy is not bound on that port — restart Inspector. If curl succeeds but the browser fails, you have a browser-specific issue (see CORS/origin section below).

4. Kill Stale Inspector Processes

If you restarted Inspector repeatedly, a stale process may be holding the port:

bash
# macOS / Linux
lsof -i :<port> | grep node
kill -9 <PID>

# Windows
netstat -ano | findstr :<port>
taskkill /PID <PID> /F

Then restart Inspector fresh.


Check the MCP Inspector Terminal Logs

The terminal where you ran npx @modelcontextprotocol/inspector is your primary diagnostic source. Here is what each message means:

Terminal MessageMeaningAction
Proxy server listening on port XXXXProxy started correctlyCheck browser is using correct port
EADDRINUSE / address already in usePort conflictKill the occupying process
spawn ENOENTCommand not found when starting serverFix the command path
Error: Cannot find module '...'Node.js module resolution failureRun npm install in the project directory
Process exited with code 1 (or other non-zero)Target server crashed on startupRun the server manually and read its output
Process exited with code 0 immediatelyServer quit cleanly but unexpectedlyCheck server logic — it may be exiting on invalid args
connect ECONNREFUSED against a URLProxy tried to reach HTTP server, got refusedStart your Streamable HTTP server before Inspector
No output at all after running npxnpx is downloading or the package name is wrongWait, or verify package name @modelcontextprotocol/inspector

Distinguishing proxy startup failure from target server failure: Proxy failures appear before any server interaction log — they happen at process start. Target server failures appear after the proxy prints its ready message and then attempts to spawn or connect to your server.


Check the Browser Console

Open DevTools → Console and Network tabs before reproducing the error. What you find here identifies the browser-to-proxy layer.

ERR_CONNECTION_REFUSED The proxy is not listening on the expected address. The proxy process is down, on a different port, or the address is wrong. This is not a server-side issue.

CORS or Cross-Origin Request Blocked error This appears when you access the Inspector UI from a non-localhost origin — for example, through a tunneling tool, a remote development proxy, or a browser extension. The Inspector proxy allows requests from its own UI origin. If you see this, ensure the UI and proxy are accessed from the same origin or configure your reverse proxy to pass the correct headers.

HTTP 4xx / 5xx from the proxy endpoint The proxy is reachable. The error comes from the proxy's attempt to interact with the target server. Check the proxy terminal for the specific error it encountered.

Network tab shows requests pending indefinitely The proxy is partially running or overloaded. Check for unhandled exceptions in the proxy terminal.


Fix MCP Inspector Proxy Port and Address Problems

Port Already in Use

bash
# macOS/Linux: find what is using the port
lsof -i :5173
lsof -i :3000

# Kill the process
kill -9 <PID>

# Windows
netstat -ano | findstr :5173
taskkill /PID <PID> /F

If you cannot kill the conflicting process, check whether Inspector supports a port override via environment variables or CLI flags in the version you are using — consult the official MCP Inspector repository for the current CLI reference.

Localhost Resolution Problems

On some systems (particularly with certain IPv6 configurations), localhost resolves to ::1 (IPv6) while the proxy binds on 127.0.0.1 (IPv4), causing connection failures even when the proxy is running.

bash
# Test IPv4 directly
curl http://127.0.0.1:<port>/

# Test IPv6 directly
curl http://[::1]:<port>/

If one works and the other does not, use the address family that works in your browser URL bar (127.0.0.1 instead of localhost).


MCP Inspector Proxy Errors with stdio Servers

stdio-based MCP servers are spawned as child processes by the Inspector proxy. Most errors in this mode come from the proxy failing to start the target process correctly.

Command Not Found (spawn ENOENT)

bash
# Wrong — if 'my-mcp-server' is not on PATH
npx @modelcontextprotocol/inspector my-mcp-server

# Correct — use the full path or npx with the package
npx @modelcontextprotocol/inspector npx my-mcp-package
npx @modelcontextprotocol/inspector node /absolute/path/to/server.js

The Inspector process inherits the PATH from the shell that launched it. If you installed a package globally with a different user or in a different environment, npx inside Inspector may not find it.

Server Exits Immediately

bash
# Run the server command manually in the same terminal
node path/to/server.js

# For packaged servers
npx my-mcp-server

If the server exits immediately when run manually, read its stderr output. Common causes: missing required environment variables, configuration file not found, or an uncaught startup exception.

Missing Environment Variables

stdio servers often need API keys or configuration. These must be passed explicitly to Inspector, not assumed from your shell:

bash
# Pass environment variables inline
MY_API_KEY=abc123 DATABASE_URL=postgres://... npx @modelcontextprotocol/inspector node server.js

Or configure them in Inspector's environment settings if the UI provides that option for the current version.

Incorrect Args

If your server requires specific CLI arguments, ensure you pass them correctly:

bash
npx @modelcontextprotocol/inspector node server.js --config ./config.json

Args after the server command are passed through to the server process.


MCP Inspector Proxy Errors with Streamable HTTP Servers

For Streamable HTTP transport, the Inspector proxy connects to an already-running HTTP server rather than spawning one. Different failure modes apply.

Server Not Running Before Inspector Connects

bash
# Start your server first
node server.js &

# Verify it responds
curl http://localhost:3000/mcp

# Then start Inspector
npx @modelcontextprotocol/inspector http://localhost:3000/mcp

The proxy cannot spawn a Streamable HTTP server — you must start it independently.

Wrong Endpoint URL

The URL must point to the exact MCP endpoint, not just the server root. If your server mounts MCP at /mcp, the URL must include /mcp. A 404 from the proxy almost always means the endpoint path is wrong.

Authentication Failures (401 / 403)

If your server requires authentication headers, the current Inspector version may or may not support passing custom headers — verify against the official Inspector documentation. For servers requiring auth, consider temporarily disabling auth during Inspector testing, or run the server with a local no-auth mode.

Reverse Proxy Interference

If your Streamable HTTP server is behind nginx, Caddy, or a similar reverse proxy:

  • Ensure the reverse proxy is not stripping required headers
  • Ensure it is not adding authentication challenges the Inspector cannot answer
  • Ensure request body size limits are not truncating MCP messages
  • Test direct connectivity to the server port, bypassing the reverse proxy

For a deeper look at MCP server connection failures in general, the MCP server failed to connect: causes and fixes article covers transport-level failures in detail.


Inspector Works Locally but Fails in Docker, WSL, or Remote Development

This is a network namespace problem, not an Inspector bug.

The core issue: Inside a Docker container or WSL instance, localhost refers to that container's or instance's own loopback interface, not the host machine's. If the Inspector proxy is running on the host and your server is in a container (or vice versa), localhost will not bridge the gap.

Docker Desktop (macOS/Windows):

bash
# Use host.docker.internal instead of localhost from inside a container
http://host.docker.internal:3000/mcp

WSL2:

bash
# From WSL, find the host IP
cat /etc/resolv.conf | grep nameserver
# Use that IP instead of localhost

Remote development (VS Code Remote, SSH): The browser runs on your local machine. The Inspector proxy and target server run on the remote. Port forwarding must be configured for every port involved (proxy port and any server port the proxy connects to).

The general rule: draw a clear picture of where each process runs, then verify that the address used to connect actually routes to the right network namespace.


"Check Console Logs" MCP Inspector Proxy Error

When the Inspector UI shows a message telling you to check console logs, it means the error details are in one of two places — not in the UI itself.

What to collect:

  1. Browser DevTools Console (F12 → Console tab): Copy the full error message and any stack trace. Note whether it is a network error (ERR_CONNECTION_REFUSED), a CORS error, or an HTTP error with a status code.

  2. Inspector Terminal (the terminal where you ran npx @modelcontextprotocol/inspector): Copy everything printed after the startup message. Look for error lines, exit codes, and any stderr output your server emitted.

  3. Target Server Logs (if your server has its own log file or outputs to a separate terminal): Check for startup exceptions, configuration errors, or runtime crashes.

With those three outputs, you can identify the exact failing layer and apply the appropriate fix from the sections above. You can also use MCPForge's MCP server testing tool to validate your server independently of the Inspector.


MCP Inspector Proxy Troubleshooting Table

SymptomLikely CauseHow to VerifyFix
ERR_CONNECTION_REFUSED in browser consoleProxy not running or wrong portCheck Inspector terminal is open; curl the proxy portRestart Inspector; fix port
Proxy terminal shows EADDRINUSEPort conflictlsof -i :<port>Kill conflicting process
Proxy terminal: no output / exits instantlyInspector package not installed or crashRun with npx @modelcontextprotocol/inspector@latestReinstall or update Inspector
spawn ENOENT error in terminalServer executable not foundRun the exact command manuallyFix PATH, use absolute path
Process exited with code N (non-zero)Target server crashed on startupRun server manually, read stderrFix server startup error
Process exited with code 0 immediatelyServer quit unexpectedlyTest server manually with same argsCheck server logic and args
Browser cannot reach proxy despite it runninglocalhost IPv4/IPv6 mismatchcurl http://127.0.0.1:<port>Use 127.0.0.1 instead of localhost
CORS error in browser consoleNon-localhost origin accessing InspectorCheck browser URL and headersAccess Inspector from localhost
HTTP 401 / 403 from proxyTarget server requires authcurl -v <server-url>Add auth headers or disable auth for testing
HTTP 404 from proxyWrong MCP endpoint pathcurl <server-url>/mcpFix endpoint URL
HTTP 500 from proxyTarget server internal errorCheck server logsFix server runtime error
Streamable HTTP endpoint unreachableServer not started or wrong URLcurl <server-url>Start server first; fix URL
Session error after connectingServer state issue or timeoutReconnect; check server session handlingRestart server and Inspector
Works locally, fails in Docker/WSLNetwork namespace mismatchping host from containerUse host.docker.internal or host IP
Inspector UI loads, connect button failsProxy up, server failing to initializeCheck proxy terminal for initialization errorsFix server startup; check args and env vars
npx takes long or fails silentlynpm registry issue or outdated npmnpm cache clean --force; retryUpdate npm; retry with fresh cache
Executable not found despite being installedWrong npm scope or PATH issuewhich <command> in same shellUse full path or npx prefix

How to Confirm the Fix

Do not assume the fix worked because the error message disappeared. Verify each layer explicitly:

1. Proxy process is stable The Inspector terminal continues to output without errors and does not exit.

2. Browser reaches the proxy

bash
curl http://localhost:<proxy-port>/
# Expect: HTTP 200 or a meaningful response (not connection refused)

3. Proxy reaches the target server The Inspector terminal shows a successful connection or initialization log, not a spawn error or connection refused.

4. MCP initialization completes The Inspector UI transitions past the connection state and shows the server capabilities (tools list, resources, prompts).

5. A test operation succeeds Navigate to the Tools tab and invoke any tool. A successful response with no proxy error confirms end-to-end functionality.

For a structured way to validate your MCP server before using Inspector, see the MCPForge MCP server test tool.


How to Prevent MCP Inspector Proxy Connection Errors

Keep the Inspector terminal visible. Run it in a dedicated terminal pane. Accidentally closing it kills the proxy.

Test your server independently first. Before connecting Inspector, run your server manually and confirm it starts and responds correctly. This separates server bugs from Inspector configuration bugs.

Pin the Inspector version during development. Using @latest always ensures you have the most current fixes, but if a regression appears, pin a specific version: npx @modelcontextprotocol/inspector@x.y.z.

Document the exact command. Store the full npx @modelcontextprotocol/inspector command with all args and env vars in a script or Makefile. Retyping complex commands introduces errors.

Use absolute paths for server executables. Relative paths depend on the working directory at launch time. Absolute paths work regardless of where you run Inspector.

On shared or CI machines, check ports before starting. Port conflicts are far more common in multi-user or automated environments. Add a port check to your startup script.

In containerized environments, plan the network topology before starting. Decide which process runs where, draw the connection path, and verify the addresses before you debug.

For broader context on using the Inspector effectively, the complete MCP Inspector guide covers setup, transport configuration, and testing workflows. If you are seeing specific MCP error codes, MCP error codes reference provides a structured breakdown of JSON-RPC error responses.


Want to analyze your API security?

Import your OpenAPI spec and generate a Security Report automatically.

If you have resolved the Inspector proxy error but are still seeing connection failures from an MCP client like Claude Desktop or Cursor, those failures operate differently — the Inspector proxy is not involved. The MCP server failed to connect: causes and fixes article covers client-to-server connection failures outside of the Inspector context.

For timeout-related failures that appear after a successful connection, how to fix MCP error 32001 request timed out addresses the specific scenario where the connection establishes but operations stall.

Frequently Asked Questions

What does 'error connecting to MCP Inspector proxy' mean?

It means the Inspector browser UI could not establish a connection to the local proxy process that MCP Inspector runs to bridge between your browser and your target MCP server. The failure can be at the browser-to-proxy layer (proxy not running, wrong port, blocked address) or at the proxy-to-server layer (your MCP server failed to start, exited immediately, or is unreachable).

Why does MCP Inspector say 'check console logs'?

The Inspector UI surfaces a generic message when the proxy connection fails or the target server handshake fails. It directs you to the browser developer console and the terminal where you ran `npx @modelcontextprotocol/inspector` because those two places contain the specific error — connection refused, process exit code, spawn error, or HTTP failure — that the UI itself cannot display in detail.

How do I know if the proxy or the MCP server is failing?

If the browser console shows a network error (connection refused, ERR_CONNECTION_REFUSED) against the proxy address, the proxy itself is not reachable — check whether the Inspector process is running. If the proxy starts successfully (you see its ready message in the terminal) but then reports a spawn error, non-zero exit, or HTTP error against your server URL, the target MCP server is the failing layer.

Why does the Inspector UI load but not connect?

The Inspector UI is served as a static frontend, so it can load even when the proxy is down. The connection error appears when the UI tries to reach the proxy API. Common causes: you closed the terminal running Inspector, the proxy started on a different port than the UI expects, or a stale proxy process is occupying the expected port while the new one failed to bind.

Can a port conflict cause the MCP Inspector proxy error?

Yes. If the default proxy port is already in use by another process, the Inspector proxy will either fail to start or start on an unexpected port. Run `lsof -i :<port>` (macOS/Linux) or `netstat -ano | findstr :<port>` (Windows) to identify the conflicting process, then terminate it or configure Inspector to use a different port.

Can CORS cause MCP Inspector proxy errors?

CORS is rarely the root cause of the proxy connection error itself. The Inspector proxy is designed to be reached from the locally served UI. CORS issues are more likely if you are accessing the Inspector UI from a non-localhost origin, running it behind a reverse proxy that strips or modifies headers, or accessing it from a browser extension context. Check the browser console for CORS-specific error messages to confirm.

Why does MCP Inspector fail in Docker or WSL?

In Docker and WSL, 'localhost' inside the container or WSL instance does not resolve to the host machine's localhost. If your target MCP server or the Inspector proxy is listening on the host, you need to use the host's IP (e.g., host.docker.internal on Docker Desktop, or the WSL host IP) rather than localhost. The Inspector proxy itself must also be network-accessible from wherever the browser is running.

How do I find MCP Inspector proxy logs?

The proxy logs appear directly in the terminal where you ran `npx @modelcontextprotocol/inspector`. There is no separate log file by default. Keep that terminal window open and look for startup messages, error messages, and any stderr output from the target server process that the proxy spawned.

Why does my MCP server work manually but fail in Inspector?

Inspector spawns your server in its own subprocess environment, which may differ from your shell: different PATH, missing environment variables, a different working directory, or npx resolving to a different version. Confirm you are passing the exact command and args that work manually, that all required environment variables are set in Inspector's env configuration, and that the executable is on the PATH available to the Inspector process.

How do I reset or restart MCP Inspector safely?

Stop the Inspector process with Ctrl+C in the terminal. Verify no stale process remains on the proxy port using `lsof -i :<port>` and kill any leftover process. Clear your browser's connection to the old session (a hard refresh or closing the tab is sufficient). Then run `npx @modelcontextprotocol/inspector` again with the correct arguments.

Check your MCP security posture

Generate a Security Score, detect risky tools, and review permissions before exposing APIs to AI agents.