> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.fabricgateway.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.fabricgateway.ai/_mcp/server.

# Agent Static Deny plugin

> Reference for the Agent Static Deny plugin, which blocks requests that match fixed rules.

The Agent Static Deny plugin blocks requests that match fixed rules on method, path, caller type, consumer type, or scope. Rules are checked in order, and the first matching rule blocks the request. A rule applies to every caller, not only agents, unless it sets a caller condition.

## Where it runs

|             |                                                                                                                                                                                                                                               |
| ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Protocols   | The console offers it for MCP routes. The gateway itself runs it on any protocol, so a `global` instance also applies to HTTP and LLM routes. On MCP routes, method and path are the same for every message, so a rule can't target one tool. |
| Scope kinds | `global`, `route`, on MCP routes                                                                                                                                                                                                              |
| Phase       | Request                                                                                                                                                                                                                                       |

## Configuration

**`rules`** `array of objects`

The deny rules. The console labels this **Deny rules**. A rule matches when every condition it sets holds. A rule with no conditions is ignored.

---

**`rules[].name`** `string`

The rule name, returned in the response.

---

**`rules[].reason`** `string` — default: denied: \<name>

The reason returned in the response. The default is `denied: <name>`, or `request denied by agent-static-deny` when the rule has no name.

---

**`rules[].methods`** `array of strings`

HTTP methods, in any letter case.

---

**`rules[].path_exact`** `array of strings`

Paths that must match exactly.

---

**`rules[].path_prefixes`** `array of strings`

Path prefixes. Together with `path_exact`, the path must match one entry.

---

**`rules[].principal_types`** `array of strings`

`agent` (or `bot`) and `user` (or `human`). Matches only callers with an agent identity.

---

**`rules[].consumer_types`** `array of strings`

Consumer types from the caller's agent identity, in any letter case.

---

**`rules[].scopes`** `array of strings`

Matches a caller whose agent identity holds at least one of these scopes.

---

Paths are compared case-sensitively, after the route rewrites the path. If any entry in `rules` isn't an object, every rule is ignored.

A blocked request gets `403` with `{"error":"forbidden","reason":"...","rule":"..."}`. On MCP routes, it gets HTTP `200` with JSON-RPC error `-32002`. The upstream isn't called.

## Example

```json
{
  "name": "no-agent-deletes",
  "plugin_id": "agent-static-deny",
  "scope": { "kind": "route", "name": "orders-api" },
  "config": {
    "rules": [
      {
        "name": "agents-cannot-delete",
        "reason": "Agents can't delete orders.",
        "methods": ["DELETE"],
        "principal_types": ["agent"]
      }
    ]
  }
}
```

## Related guides

* [Authenticate requests with JWT Auth](/configure/authentication/jwt-auth)