REST API
API reference
Every endpoint of the MCP Guard API, with request and response examples. New here? Start with the quickstart. Below the summary: the live OpenAPI spec, rendered by Scalar, where you can try requests with your own key. Those requests go to this site's own /v1 endpoints (the same API as api.mcp-guard.ai) and are billed like any other request. Source spec at /v1/openapi.
- Base URL
https://api.mcp-guard.ai(alsohttps://mcp-guard.ai/v1/…)- Auth
Authorization: Bearer mcpg_live_…(orx-api-key) on every call except /v1/openapi. Create keys in the dashboard under API keys.- Content type
application/jsonrequests and responses. Max body 512 KB.
Endpoints
POST/v1/guard
Check one agent action before it runs. 1 credit, or one free request.
POST/v1/guard/batch
Up to 64 checks in one request; one result per check, in order (each shaped like /v1/guard, abridged here). 1 credit per check, or one free request for the whole batch.
GET/v1/usage
Credit balance (1 credit = 1 check), free requests left, plan and the last 30 days of usage. Free.
GET/v1/openapi
This API as an OpenAPI 3.1 document. No key needed.
Example values are illustrative.