Runtime restrictions

From RedHatProductSecurity/prodsec-skills · View interactive version

Runtime restrictions is an AI agent skill from the GitHub repository RedHatProductSecurity/prodsec-skills. Enforce timeouts and rate limiting in MCP servers to prevent abuse and DoS. Use when building, configuring, or reviewing MCP server runtime controls, resource limits, or abuse prevention.

How to use this skill

Skill file

Runtime Restrictions for MCP Servers

Security Requirement

MCP servers MUST implement strict timeouts and rate limiting to prevent abuse and Denial of Service (DoS) attacks.

Timeouts

| Timeout Type | Purpose |

|---|---|

| Request timeout | Maximum time for an entire MCP request to complete |

| Tool execution timeout | Maximum time for a single tool invocation to run |

| Connection timeout | Maximum idle time before disconnecting a client |

| Upstream timeout | Maximum time waiting for downstream API responses |

Tool executions without timeouts can be exploited to exhaust server resources (CPU, memory, connections).

Rate Limiting

| Strategy | Description |

|---|---|

| Per-user rate limit | Limit requests per authenticated user over a time window |

| Per-tool rate limit | Limit invocations of specific tools (sensitive tools get tighter limits) |

| Global rate limit | Overall request limit to protect server capacity |

| Concurrent execution limit | Maximum number of simultaneous tool executions |

Implementation Checklist

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.