HydraCore
API by router

Mcp

Get Api Key Context

GET
/v1/mcp/api-key-context

Header Parameters

X-Api-Key?string|null

Response Body

Successful Response

application/json
  1. response

Bounded metadata for MCP-side scope enforcement.

Mirrors what require_scope() reads from request.state so the MCP server can implement the same exact-match / wildcard-reject / legacy-bridge semantics without re-fetching the key row.

api_key_id*Api Key Id
customer_id*Customer Id
hash_version*Hash Version
needs_reissue*Needs Reissue
rate_limit_per_hour*Rate Limit Per Hour
rate_limit_per_minute*Rate Limit Per Minute
scopes*array<string>
tenant_id*Tenant Id
user_id*User Id
Example Request
curl -X GET 'https://example.com/v1/mcp/api-key-context'
Example Response
{  "api_key_id": "string",  "customer_id": "string",  "hash_version": "string",  "needs_reissue": true,  "rate_limit_per_hour": 0,  "rate_limit_per_minute": 0,  "scopes": [    "string"  ],  "tenant_id": "string",  "user_id": "string"}

Emit Mcp Call Log

POST
/v1/mcp/audit-log

Header Parameters

X-Api-Key?string|null

Request Body

application/json
  1. body

Fields the MCP server is allowed to send. Server-side stamping fills in the identity columns (api_key_id, user_id, tenant_id, customer_id, scope_kind) — never trust these from the wire.

error_class?|null
http_status?|null
latency_ms?|null
request_id?|null
scope_tag?|null
status*Status
Value in"allow""deny_scope""deny_jwt_only""upstream_4xx""upstream_5xx""network_error""exception"
tool_name*Tool Name
Match^[a-z][a-z0-9_]+$
Lengthlength <= 64

Response Body

Successful Response

Example Request
curl -X POST 'https://example.com/v1/mcp/audit-log' \  -H 'Content-Type: application/json' \  -d '{  "status": "allow",  "tool_name": "string"}'
Example Response
Empty