> ## Documentation Index
> Fetch the complete documentation index at: https://portkey-docs-cookbook-aws-sts-session-tags.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Guardrails

> Apply policies to MCP requests.

Guardrails apply policies to MCP requests before and after they execute.

## Available now

**Rate limiting.** Limit requests and token consumption per API key, server, or tool. See [MCP Rate Limits](/product/mcp-gateway/rate-limits).

**Guardrail checks.** Run the same guardrail checks available for LLM requests against MCP tool calls, before and after they execute. Denied calls return a structured error containing the guardrail and check ID.

### Per-server guardrail mappings

Guardrails can be attached directly to individual MCP servers through the guardrail-to-server mapping API. Each mapping specifies:

* **`run_on`** — when the guardrail runs: `beforeToolCall`, `afterToolCall`, or both
* **`capability_ids`** (optional) — limit the guardrail to specific tools on the server. When omitted, the guardrail applies to all tools

Configure mappings via the Admin API or the [SCM API](/product/enterprise-offering/access-management/scm) using the guardrail MCP server mapping endpoints. Guardrails can also be configured at the workspace level using the standard [guardrails workflow](/product/guardrails/list-of-guardrail-checks).

### Creating MCP-targeted guardrails

When creating a guardrail intended for MCP servers, set `target` to `mcp`. The guardrail list API supports filtering by target (`llm`, `mcp`, or both). Guardrails with target `mcp` only appear when you explicitly filter for them.

## What's coming

**Approval workflows.** Require explicit approval for high-risk operations like deletions or write actions.

**Budget controls.** Limit usage based on cost or request volume.

## Get early access

Contact us if you're interested in early access to approval workflows or budget controls.

***

<Card title="Portkey is now PRISMA AIRS AI Gateway. See it in action." href="https://www.paloaltonetworks.in/ai-security/ai-gateway?utm_source=portkey&utm_medium=referral&utm_campaign=prisma_airs&utm_content=docs_nav#contact" icon="arrow-up-right-from-square">
  Contact Us
</Card>
