Skip to content

Test a Remote MCP Server

Last updated View as MarkdownAgent setup

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:

    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 http://localhost:<PORT>. Check the command output for the local port where MCP Inspector is running. In this example, MCP Inspector 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 Code

Add the remote server directly to Claude Code using Streamable HTTP:

claude mcp add --transport http my-server https://my-mcp-server.my-account.workers.dev/mcp

Run claude mcp list to verify the connection. If the server requires authentication, complete the authorization flow in your browser.

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"
		}
	}
}

Was this helpful?