In local development, MCP Inspector offers a smooth debugging interface. But what happens when your MCP server runs in the cloud or on a remote machine? This article focuses on how to inspect and interact with remotely hosted MCP servers using Inspector, all without writing custom code or SSHing into the machine.
How Remote Connections Work
MCP Inspector connects to remote servers using streamable HTTP (also called SSE, or Server-Sent Events). You start Inspector using the CLI:
npx @modelcontextprotocol/inspector
Once open in your browser, select streamable-http
as the transport and paste the remote server URL (like https://yourworkers.dev/sse
). Inspector then sends JSON-RPC requests to that endpoint and receives streamed responses in real time1.
Inspector also supports servers that require authentication. If the endpoint uses OAuth (common in production deployments), Inspector initiates the login flow automatically and reconnects once you’re verified2.
Step-by-step: Connecting to a Remote MCP Server
- Start Inspector Locally
npx @modelcontextprotocol/inspector
-
Choose
streamable-http
Transport
From the dropdown in the Inspector UI. -
Paste the Remote URL
For example:
https://your-cloud-server.dev/sse
-
Authenticate (if needed)
Inspector handles OAuth and redirects you back once verified. -
Inspect Tools and Prompts
You can now run tools and test prompts from the remote server—just as if it were local.
Integrating Clients via mcp-remote
Sometimes, you want to use Claude Desktop, Cursor, or another local MCP client with a remote server. That’s where mcp-remote
comes in.
You define it as a local command that forwards JSON-RPC traffic to the remote endpoint:
{
"mcpServers": {
"math": {
"command": "npx",
"args": ["mcp-remote", "https://myworkers.dev/sse"]
}
}
}
When the local client connects to math
, the proxy forwards traffic to the remote server3.
Exporting Configs from Inspector
Once connected, Inspector lets you export valid entries for mcp.json
. You can either:
- Copy an individual tool config
- Export the entire connection config
This makes it easy to reuse remote servers in local CLI tools or AI clients4.
My Thoughts
Connecting Inspector to remote MCP servers is straightforward and feels reliable. The ability to work with OAuth-protected endpoints, export configs, and bridge through local proxies means you can debug cloud-based tools without friction. It takes a few steps to set up, but once it’s done, the workflow becomes very natural.
References