Home / Servers / Cloudflare API / email_routing_routing_rules_create_routing_rule

Create routing rule

An MCP tool from the Cloudflare API server, hosted on mcp.hjlabs.in.

Create routing rule Rules consist of a set of criteria for matching emails (such as an email being sent to a specific… [POST /zones/{zone_id}/email/routing/rules]

Name on the gateway: cloudflare_api__email_routing_routing_rules_create_routing_rule · may change things.

Parameters

NameTypeDescription
zone_id requiredstringzone_id parameter
actions requiredarrayList actions patterns.
enabledbooleanRouting rule status.
matchers requiredarrayMatching patterns to forward to your actions.
namestringRouting rule name.
owner_worker_tagstringPublic tag (script_tag) of the Worker that owns…
prioritynumberPriority of the routing rule.
sourceapi | wranglerWho manages the rule. api covers dashboard…

How to call it

Through the Smart Gateway, any client can run it by name with call_tool, or let the gateway find it with search_tools:

call_tool arguments
{
  "name": "cloudflare_api__email_routing_routing_rules_create_routing_rule",
  "arguments": {
    "zone_id": "…",
    "actions": [],
    "matchers": []
  }
}

Or connect the Cloudflare API server directly, which lists 3,127 tools including this one:

Run in your terminal
claude mcp add --transport http hj-cloudflare-api https://mcp.hjlabs.in/mcp/cloudflare-api \
  --header "Authorization: Bearer YOUR_API_KEY"

Try asking

Use the create routing rule tool with zone_id set to ….

More from Cloudflare API