SentnelOpsSentnelOpsbeta
LAYER 3 · THE MCP GATEWAY

Gateway reference

Endpoints, the call-log row schema, gateway status codes, and the two knobs that tune the hot path.

Endpoints

EndpointAuthWhat it does
ANY /proxy/{server}/{path}Agent tokenThe data path. All HTTP methods (GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS) forward to the registered upstream after identity, revocation, and policy checks. Agent tokens only — org API keys and user sessions are not valid here.
POST /mcp-serverssecurity roleRegister an upstream: {"name", "upstream_url"}. Upsert on name — re-posting updates the upstream. Returns the proxy_path.
GET /mcp-serversviewer roleList the org's registered servers with upstream URLs and creation dates.
GET /mcp-callsviewer roleDurable call history, newest first. Filters: agent_id, would_block, status; paging via limit (default 100, max 1000) and offset.
GET /mcp-calls/export.csvviewer roleSIEM-ready CSV of the last days days (default 30). Same fields as the API minus raw params.
GET /cimd/{agent_id}.jsonpublicThe agent's resolvable identity document — name, owner, environment, risk level, status, allowed servers. Metadata only, never secrets; unknown ids get an indistinguishable 404.
WS /ws/calls?key=…org API key onlyLive call feed, events pushed under a second after logging. Auth is the API key as a query param (browsers cannot set WS headers); a wrong key closes with code 4401. Lossy tail: slow consumers drop oldest events.

Call-log row fields

FieldTypeMeaning
agent_idtextThe verified layer-1 identity that made the call.
mcp_servertextThe registered server name from the proxy path.
tool_nametextTool from JSON-RPC tools/call; otherwise the RPC method or request path.
paramsjsonbThe tool arguments as sent. API only — excluded from the CSV export.
duration_msintegerUpstream round-trip time; 0 for calls that never reached the upstream.
statuspermitted | blocked | errorWhat happened. blocked is written only by layer-4 enforcement; error covers unreachable upstreams and 5xx responses.
would_blockbooleanTrue when the policy verdict was deny — regardless of whether it was enforced. The enforcement dress-rehearsal flag.
blast_radiusnumeric(3,2)The policy engine's 0–1 risk score for this server + tool, when defined.
violation_reasontextThe rule and reason behind a denied verdict; null on clean passes.

Every row also carries its own id, an org scope, and a timestamp set when the call is logged.

Gateway status codes

StatusCause
401Missing bearer token, invalid signature, revoked/rotated token, or an unknown agent. Also what a user-session token gets — only agent tokens work at the proxy.
404The server name in the path is not registered for the agent's org.
502Upstream unreachable — logged as status=error with the reason.
Observe mode never returns 403. That code — a machine-readable blocked_by_sentnelops refusal — arrives only when layer 4 enforcement or approvals are switched on, using layer-2 policy verdicts unchanged.

Configuration

Setting (env var)DefaultEffect
SNOPS_PROXY_IDENTITY_TTL_SECONDS5.0TTL for both hot-path caches (identity+upstream resolution, token revocation). It is the staleness bound: a revocation or suspension takes effect within this many seconds. 0 disables caching — every call pays a database round trip.
SNOPS_RATE_LIMIT_PER_MINUTE600Per-key fixed-window limit (60 s window), applied API-wide including the proxy. Keyed by credential hash — floods with invalid keys are rejected before any database lookup.

Operational behavior when the gateway itself degrades — fail-open logging, feed loss, deploy shape — is covered in Trust & reliability.