Skip to content
Cloudflare Docs

Test a Remote MCP Server

Remote, authorized connections are an evolving part of the Model Context Protocol (MCP) specification. Not all MCP clients support remote connections yet.

This guide will show you options for how to start using your remote MCP server with MCP clients that support remote connections. If you haven't yet created and deployed a remote MCP server, you should follow the Build a Remote MCP Server guide first.

The Model Context Protocol (MCP) inspector

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

  1. Open a terminal and run the following command:

    Terminal window
    npx @modelcontextprotocol/inspector
    🚀 MCP Inspector is up and running at:
    http://localhost:5173/?MCP_PROXY_AUTH_TOKEN=46ab..cd3
    🌐 Opening browser...

    The MCP inspector will launch in your web browser. You can also launch it manually by opening a browser and going to https://localhost:<PORT>. Check the command output for the local port where MCP Inspector is running. In this example, the MCP server is served on port 5173.

  2. In the MCP inspector, enter the URL of your MCP server (for example, http://localhost:8788/mcp). Select Connect.

    You can connect to an MCP server running on your local machine or a remote MCP server running on Cloudflare.

  3. If your server requires authentication, the connection will fail. To authenticate:

    1. In MCP Inspector, select Open Auth settings.
    2. Select Quick OAuth Flow.
    3. Once you have authenticated with the OAuth provider, you will be redirected back to MCP Inspector. Select Connect.

You should see the List tools button, which will list the tools that your MCP server exposes.

Connect your remote MCP server to Cloudflare Workers AI Playground

Visit the Workers AI Playground, enter your MCP server URL, and click "Connect". Once authenticated (if required), you should see your tools listed and they will be available to the AI model in the chat.

Connect your remote MCP server to Claude Desktop via a local proxy

Even though Claude Desktop doesn't yet support remote MCP clients, you can use the mcp-remote local proxy to connect it to your remote MCP server. This lets you to test what an interaction with your remote MCP server will be like with a real-world MCP client.

  1. Open Claude Desktop and navigate to Settings -> Developer -> Edit Config. This opens the configuration file that controls which MCP servers Claude can access.
  2. Replace the content with a configuration like this:
{
"mcpServers": {
"my-server": {
"command": "npx",
"args": ["mcp-remote", "http://my-mcp-server.my-account.workers.dev/mcp"]
}
}
}
  1. Save the file and restart Claude Desktop (command/ctrl + R). When Claude restarts, a browser window will open showing your OAuth login page. Complete the authorization flow to grant Claude access to your MCP server.

Once authenticated, you'll be able to see your tools by clicking the tools icon in the bottom right corner of Claude's interface.

Connect your remote MCP server to Cursor

Connect Cursor to your remote MCP server by editing the project's .cursor/mcp.json file or a global ~/.cursor/mcp.json file and adding the following configuration:

{
"mcpServers": {
"my-server": {
"url": "http://my-mcp-server.my-account.workers.dev/mcp"
}
}
}

Connect your remote MCP server to Windsurf

You can connect your remote MCP server to Windsurf by editing the mcp_config.json file, and adding the following configuration:

{
"mcpServers": {
"my-server": {
"serverUrl": "http://my-mcp-server.my-account.workers.dev/mcp"
}
}
}