Skip to content

Connect agents

An agent reaches Sefra in one of two ways. Both run the same checks and return the same result.

Use When Endpoint
MCP Your agent uses an MCP client. Tools and their schemas are discovered automatically POST /mcp
REST Your agent is a service, a script or a framework without MCP POST /v1/executions

1. An identity for each agent. Every request carries an OAuth access token from your identity provider. Give each agent its own client, so the audit trail, rate limits and kill switches apply to that agent alone. A token shared between agents makes them indistinguishable. See Configuration for how Sefra reads the token’s claims.

2. One idempotency key per business action. Every write carries a key of 16 to 128 letters, digits, - or _. Generate it once per action and reuse it when you retry that action. A new key means a new action. The retries example shows why this matters.

3. Handling for each outcome. A request may succeed, be refused, wait for a person or need an operator. Handle every outcome says what your agent should do for each.

Sefra speaks MCP protocol revision 2026-07-28, and clients must use that revision. These clients were measured listing tools, calling them, polling and cancelling:

Client Version tested Setting needed
Python SDK (mcp) 2.3.0 None
Go SDK 1.8.0 None
TypeScript client (@modelcontextprotocol/client) 2.4.0 versionNegotiation: { mode: 'auto' }
MCP Inspector CLI 2.16.0 --protocol-era modern

The TypeScript SDK v1 (@modelcontextprotocol/sdk) and any client limited to revision 2025-11-25 cannot connect. Desktop and editor clients have not been tested yet. If yours is not listed, use the Inspector to check it, or use REST.