Cloudflare DEX MCP Server is an implementation of the Model Context Protocol that provides visibility into device, network, and application performance across your Zero Trust organization. It comes with Cloudflare OAuth built-in and enables remote MCP connections to access various diagnostic and monitoring tools through the Cloudflare DEX API.
The server provides access to various tools categorized by their functionality:
dex_test_statistics
- Analyze Cloudflare DEX Test Results by quartile given a Test IDdex_list_tests
- List configured Cloudflare DEX tests with overview performance metricsdex_http_test_details
- Retrieve detailed time series results for an HTTP DEX test by iddex_traceroute_test_details
- Retrieve detailed time series results for a Traceroute DEX test by iddex_traceroute_test_network_path
- Retrieve detailed time series results for the network path of a traceroute testdex_traceroute_test_result_network_path
- Retrieve the hop-by-hop network path for a specific Traceroute DEX test resultdex_list_remote_capture_eligible_devices
- Retrieve devices eligible for remote capturesdex_create_remote_pcap
- Initiate a remote packet capture on a specific devicedex_create_remote_warp_diag
- Initiate a remote Warp diagnostic capture on a specific devicedex_list_remote_captures
- Retrieve previously created remote captures with details and statusdex_list_remote_warp_diag_contents
- List filenames included in a remote WARP diag capturedex_explore_remote_warp_diag_output
- Retrieve remote WARP diag file contents by filepathdex_analyze_warp_diag
- Analyze successful WARP-diag remote captures for common issuesdex_fleet_status_live
- View live metrics for your fleet of zero trust devices (up to past hour)dex_fleet_status_over_time
- View historical metrics for zero trust devices over timedex_fleet_status_logs
- View historical logs for zero trust devices (up to past 7 days)dex_list_warp_change_events
- View logs of users toggling WARP connection or changing configurationdex_list_colos
- List Cloudflare colos, optionally sorted by frequency of appearance in test resultsYou can access the Cloudflare DEX MCP Server from any MCP-compatible client using these methods:
If your MCP client directly supports remote MCP servers:
https://dex.mcp.cloudflare.com
in your client interfaceThis works with clients like Cloudflare AI Playground.
For clients without built-in remote server support:
Install the mcp-remote package:
npm install -g mcp-remote
Set up the client's configuration file with the following content:
{
"mcpServers": {
"cloudflare": {
"command": "npx",
"args": ["mcp-remote", "https://dex.mcp.cloudflare.com/sse"]
}
}
}
Restart your MCP client
A browser window will open showing the OAuth login page
Complete the authentication flow to grant access
After successful authentication, the tools will become available in your client
Here are some example prompts you can use with the Cloudflare DEX MCP Server:
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "cloudflare" '{"command":"npx","args":["mcp-remote","https://<your-subdomain>.workers.dev/sse"]}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cloudflare": {
"command": "npx",
"args": [
"mcp-remote",
"https://<your-subdomain>.workers.dev/sse"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"cloudflare": {
"command": "npx",
"args": [
"mcp-remote",
"https://<your-subdomain>.workers.dev/sse"
]
}
}
}
3. Restart Claude Desktop for the changes to take effect