mcp-gate speaks the MCP protocol over HTTP. Your MCP client connects to this endpoint instead of the upstream server. All tools/call methods are evaluated against your policies.
Base URL: https://<project-ref>.supabase.co/functions/v1/mcp-gate
Required scope: mcp (falls back to evaluate)
Transport: Streamable HTTP / SSE endpoint over HTTP POST (not stdio)
Authentication
initialize
tools/list
tools/call
Status polling
JSON-RPC error codes
| Code | Meaning |
|---|---|
-32001 | Action blocked by Sentrail policy |
-32000 | Internal Sentrail error |
-32602 | Invalid params (missing name in tools/call) |
Method allow-list
Only the following JSON-RPC methods are permitted throughmcp-gate:
| Method | Behavior |
|---|---|
initialize | Handled locally; returns Sentrail server info and protocol version 2024-11-05 |
notifications/initialized | Client lifecycle notification — acknowledged with HTTP 202, no response body |
tools/list | Forwarded to the upstream server; result is cached 60 seconds per workspace+connection set |
tools/call | Intercepted and policy-evaluated before forwarding |
ping | Answered locally with {} |
-32601:
action: "unknown_method_blocked" and the method name in the payload. This prevents agents from routing side-effecting work through non-tools/call methods (such as resources/*, prompts/*, or custom extensions) to bypass policy evaluation.
Status codes
| HTTP Code | Meaning |
|---|---|
200 | RPC processed (check error field in body for RPC-level errors) |
400 | Invalid JSON body |
401 | Invalid or expired API key |
405 | Method not allowed |
424 | No MCP server connected for this workspace |
500 | Internal error |