Guard MCP API
Rate limiting and cost control for AI agents via Model Context Protocol
The Guard MCP API provides AI assistants with rate limiting and cost control capabilities. Optimized for AI integrations using the MCP protocol over HTTP transport with JSON-RPC 2.0.
MCP Endpoint
https://mcp.ainoflow.io/mcp/v1/guardTransport:
Configuration
Add MCP server in the UI dialog:
Add to your Claude Desktop configuration:
Add to your Cursor MCP configuration:
Available Tools
key rateMax rateWindow failOpen allowPolicyOverwrite * Required on first call to auto-create policy. Optional on subsequent calls.
Example Usage (first call):
Allowed Response:
Denied Response:
Check allowed field to determine if execution should proceed
key Example:
Response:
key Example:
Response:
Available Resources
MIME Type: application/json
Returns: {"key":"send-emails","exists":true,"rateLimit":{"current":42,"max":100,"window":3600,"resetsIn":2145}}
Use Cases for AI Assistants
Prevent expensive API overuse
Cap expensive operations per time window
Rate limit + deduplication
Check remaining budget before starting
Key lengthMax 512 charactersrateMax range1 to 1,000,000rateWindow range1 to 86,400 secondsAlgorithmFixed windowPolicy cache TTL5 minutesDenied requestsNot counted toward limit| REST API | MCP Tool |
|---|---|
POST /guard/{key}/counter | guard_check |
GET /guard/{key}/counter | guard_status |
DELETE /guard/{key}/counter | guard_reset |
Ready to integrate Guard MCP?
Sign up for free and start rate-limiting your AI agent tasks