Home / Servers / DigitalOcean API / firewalls_add_rules

Add Rules to a Firewall

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

Add Rules to a Firewall To add additional access rules to a firewall, send a POST request to /v2/firewalls/$FIREWALL_ID/rules. The body of the request may include an inbound_rules and/or outbound_rules attribute containing… [POST /v2/firewalls/{firewall_id}/rules]

Name on the gateway: digitalocean_api__firewalls_add_rules · may change things.

Parameters

NameTypeDescription
firewall_id requiredstringA unique ID that can be used to identify and reference a…
inbound_rules requiredarray
outbound_rulesarray

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": "digitalocean_api__firewalls_add_rules",
  "arguments": {
    "firewall_id": "…",
    "inbound_rules": []
  }
}

Or connect the DigitalOcean API server directly, which lists 874 tools including this one:

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

Try asking

Use the add rules to a firewall tool with firewall_id set to ….

More from DigitalOcean API