Skip to content

Exposing a MCP Server

Model Context Protocol (MCP) is an open standard for enabling language models to use tools, retrieve data, and operate over structured inputs. If you’re running a local MCP server, Inspectr lets you expose it securely to the internet and inspect real-time traffic.

Inspectr makes it easy to run and test your local MCP servers by exposing them via a streamable HTTP transport. This allows you to connect MCP servers to a wide range of MCP clients without worrying about WebSocket bindings or specialized transports.

If you haven’t built an MCP server yet, start with the Build a Local MCP Server guide ↗ before continuing here.


In this guide, you’ll learn how to:

  • Run a local MCP server.
  • Expose your MCP server as an HTTP/SSE endpoint.
  • Test your MCP server visually with the MCP Inspector.
  • Connect your server to popular MCP clients like Claude Desktop, Cursor, and Windsurf.
  • Securely share your MCP server session with teammates.

Before you begin, make sure you have:

  • Node.js 22+ installed on your system.
  • npm or npx available to run Inspectr and MCP tools.
  • A working MCP server (for example, the Everything MCP server).

Let’s say you already have an MCP server, spin it up.

Terminal window
mcp-server --port 3001

or if you are looking for an example MCP server, you can use he Everything MCP server.

Terminal window
npm run start:streamableHttp
Start MCP server

This means that the MCP server is running on http://localhost:3001


Step 2: Start Inspectr to Expose Your MCP Server

Section titled “Step 2: Start Inspectr to Expose Your MCP Server”
Terminal window
inspectr \
--listen=:8080 \
--backend=http://localhost:3001 \
--expose \
--channel=mcp-demo \
--channel-code=mcpserver123
Inspectr exposing MCP server

This means:

  • Inspectr listens on port 8080
  • Forwards traffic to your MCP server on port 3001
  • Captures and displays traffic in the App UI at http://localhost:4004

The MCP server is now publicly available at:

https://mcp-demo.in-spectr.dev

The @modelcontextprotocol/inspector is a visual testing tool for MCP servers.

You can start the MCP Inspector with the following command:

Terminal window
npx @modelcontextprotocol/inspector

As the server URL, enter the Inspectr session URL from above (notice the /mcp if that is applicable), for example:

https://mcp-demo.in-spectr.dev/mcp

MCP Inspector

After connecting, try the List Tools button to confirm your MCP server is working correctly through Inspectr.


Claude Desktop doesn’t support HTTP/SSE MCP servers directly, but you can combine Inspectr with mcp-remote.

Edit your Claude Desktop config. Go to “Settings"" → “Developer” → “Edit Config”:

Claude Desktop config

Set the configuration details, for example:

{
"mcpServers": {
"inspectr": {
"command": "npx",
"args": [
"mcp-remote",
"https://mcp-demo.in-spectr.dev/mcp"
]
}
}
}

Save and restart Claude Desktop (Cmd/Ctrl + R).

Claude Desktop configured

When Claude restarts, it will connect to your MCP server through Inspectr.

Once connected, if you open the “Connectors”, you will see your MCP server listed.

Claude Desktop connectors

When clicking on “Configure, you can see a list of available actions of the MCP server.

Claude Desktop connectors actions

Once your MCP server is exposed through Inspectr, you can interact with it directly inside Claude Desktop.

Claude Desktop connectors details

This lets you test how Claude queries your MCP server in a natural conversation flow, with results displayed as structured data or even visualizations.

For example, let’s run a prompt that searches for the most used API endpoints:

Claude Desktop results

Next we want Claude to show how the response times visually look like:

Claude chat graphing results

Once your MCP server is running through Inspectr, you can connect it to real MCP clients. Different clients configure MCP servers differently, but the general idea is to point them at your Inspectr session URL.

Cursor accepts a simple command-style configuration. Use mcp-remote to forward the Inspectr session URL:

{
"mcpServers": {
"inspectr": {
"command": "npx",
"args": [
"mcp-remote",
"https://mcp-demo.in-spectr.dev/mcp"
]
}
}
}

Windsurf uses an mcp_config.json file. Add an entry like:

{
"mcpServers": {
"inspectr": {
"command": "npx",
"args": [
"mcp-remote",
"https://mcp-demo.in-spectr.dev/mcp"
]
}
}
}

When Claude Desktop interacts with your MCP server through Inspectr, every request and response is captured in Inspectr’s dashboard. This lets you see exactly what’s happening behind the scenes.

  1. Open http://localhost:4004 in your browser while Inspectr is running.
Inspectr request details
  1. You’ll see a history of requests made by Claude, including the tools it invoked, prompts it sent, and any parameters.

  2. Select a request to view the response returned by your MCP server, including result data, errors, or logs.

This makes Inspectr not just a bridge but also an observability layer for MCP development.


Inspectr makes it easy to:

  • Expose any local MCP server as an HTTP/SSE endpoint.
  • Test your MCP server visually with the MCP Inspector.
  • Connect it to MCP clients like Claude Desktop, Cursor, or Windsurf.
  • Monitor every MCP interaction in real time via the Inspectr dashboard.