Problem
When managing Workers via the MCP, there's currently no way to inspect or modify how traffic reaches a Worker. The existing tools cover deployment and bindings well, but stop short of routing — leaving a gap that forces you to context-switch to the dashboard or the REST API directly.
Concrete example: asking an AI assistant "what URL do I reach this worker on?" is unanswerable through the MCP today, even though that information is readily available via the Cloudflare API.
Proposed Tools
| Tool |
Description |
workers_list_routes |
List all routes (zone-based patterns) bound to a given worker |
workers_list_custom_domains |
List custom domains attached to a given worker |
workers_add_route |
Add a route pattern for a worker on a given zone |
workers_update_route |
Update an existing route pattern |
workers_delete_route |
Remove a route from a worker |
workers_add_custom_domain |
Attach a custom domain to a worker |
workers_delete_custom_domain |
Remove a custom domain from a worker |
Use Cases
- "What URL do I reach
my-worker on?" — currently impossible to answer via MCP
- "Add
api.example.com/* as a route for this worker" — requires dropping out to wrangler or the dashboard
- Validating routing config as part of a deployment workflow, entirely within the MCP context
Notes
The underlying data is available via the Cloudflare REST API (/zones/{zone_id}/workers/routes and /workers/domains). This would simply expose it through the typed tool interface, consistent with how other resources are handled in this server.
There is a related broader option in cloudflare/mcp (Code Mode), but that requires broader API permissions and is less ergonomic for targeted tasks. Domain-specific tooling here would be the right fit for users already using workers-bindings.
Problem
When managing Workers via the MCP, there's currently no way to inspect or modify how traffic reaches a Worker. The existing tools cover deployment and bindings well, but stop short of routing — leaving a gap that forces you to context-switch to the dashboard or the REST API directly.
Concrete example: asking an AI assistant "what URL do I reach this worker on?" is unanswerable through the MCP today, even though that information is readily available via the Cloudflare API.
Proposed Tools
workers_list_routesworkers_list_custom_domainsworkers_add_routeworkers_update_routeworkers_delete_routeworkers_add_custom_domainworkers_delete_custom_domainUse Cases
my-workeron?" — currently impossible to answer via MCPapi.example.com/*as a route for this worker" — requires dropping out towrangleror the dashboardNotes
The underlying data is available via the Cloudflare REST API (
/zones/{zone_id}/workers/routesand/workers/domains). This would simply expose it through the typed tool interface, consistent with how other resources are handled in this server.There is a related broader option in cloudflare/mcp (Code Mode), but that requires broader API permissions and is less ergonomic for targeted tasks. Domain-specific tooling here would be the right fit for users already using
workers-bindings.