# ObligationSign auth.md — Authentication for agents

## Public discovery is not permission to act

Public documentation, discovery metadata and the public proof verifier can be read without a tenant credential. MCP requests require an authorised Bearer credential. Discovery does not grant access to private data, permit registration on another person's behalf, or authorise purchases.

## Three ways to authenticate

1. **Sign-in connection (recommended for assistants such as Claude, ChatGPT, Cursor and Gemini).** The account owner adds the gateway as a connector, signs in to ObligationSign, and ticks the permissions the agent may use. The agent receives its own short-lived credential; no token is copied or stored by the user. See "Connect by account-owner sign-in" below.
2. **Agent registration by verified email (for agents without a connector setting).** The agent registers with the account owner's email address and shows the owner a six-digit code. The owner signs in, types the code and ticks the permissions; the agent then collects its own short-lived credential. See "Register by verified email" below.
3. **Bearer credential.** Supported onboarding method: account-owner browser onboarding at https://obligationsign.com/start/, followed by authenticated MCP use with the issued Bearer credential.

All three require an ObligationSign account. The account owner starts at https://obligationsign.com/start/ and completes the required account and billing steps. For an existing account, use its authorised credential-management flow or contact ops@obligationsign.com for onboarding assistance.

Do not bypass account verification, consent or checkout. An agent must have the user's explicit authority before creating accounts, enrolling additional agents or changing a paid plan.

## Connect by account-owner sign-in

- MCP endpoint: https://mcp.obligationsign.com/mcp (Streamable HTTP, stateless `POST`)
- Protected-resource metadata for this endpoint: https://mcp.obligationsign.com/.well-known/oauth-protected-resource/mcp
- Authorization server: https://auth.obligationsign.com (metadata at `/.well-known/oauth-authorization-server`)
- Flow: authorization code with S256 PKCE, public client, `resource=https://mcp.obligationsign.com/mcp`
- Registered clients and their OAuth client IDs: Claude `claude`; ChatGPT `chatgpt`; Gemini app `gemini`; Cursor `cursor`; Gemini CLI `gemini-cli`; Gemini Enterprise `gemini-enterprise`. All are public clients without a secret. Clients are registered by ObligationSign; there is no dynamic client registration. To have another application registered, contact ops@obligationsign.com.
- Permissions: the review page lists each requested permission with a tick box. The account owner chooses; the agent can list and call only the tools under the ticked permissions.
- Lifetime: 60 minutes. There are no refresh tokens; the account owner approves again after expiry.
- Revocation: the account owner revokes at https://auth.obligationsign.com/connections, effective on the next request.
- Record: every approval and revocation is written to the public transparency log.

Steps per application:

- Claude: Customize, Connectors, "+ Add", "Add custom connector"; name and URL `https://mcp.obligationsign.com/mcp`, Continue; under OAuth client choose "Use your own OAuth client", Client ID `claude`, Client Secret empty; Add. On Team and Enterprise plans an Owner adds the connector under Organization settings, Connectors first.
- ChatGPT (web): chatgpt.com/plugins, plus button, "Add custom MCP server"; name; Server URL `https://mcp.obligationsign.com/mcp`; authentication OAuth with Client ID `chatgpt` and no secret; "I understand and want to continue"; "Create as a plugin"; install the plugin.
- Gemini app (web, personal Google Account, Keep Activity on): Settings, Connected Apps (or Personal Intelligence, Connected Apps); under Custom apps, "Add a custom app"; URL `https://mcp.obligationsign.com/mcp`; next to "Advanced features" click "Show more" and enter Client ID `gemini`, no secret; Next.
- Cursor: in `mcp.json`, `"mcpServers": { "obligationsign": { "url": "https://mcp.obligationsign.com/mcp", "auth": { "CLIENT_ID": "cursor" } } }`.
- Gemini CLI: in `~/.gemini/settings.json`, `"mcpServers": { "obligationsign": { "url": "https://mcp.obligationsign.com/mcp", "oauth": { "enabled": true, "clientId": "gemini-cli" } } }`; then `/mcp auth obligationsign`. Any local callback port is accepted.
- Gemini Enterprise: custom MCP server data store with OAuth 2.0; MCP Server URL `https://mcp.obligationsign.com/mcp`; Authorization URL `https://auth.obligationsign.com/authorize`; Token URL `https://auth.obligationsign.com/token`; Client ID `gemini-enterprise`; Client Secret any value (not used); Scopes from the list in the authorization server metadata; "Enable PKCE Support" selected.

A request to `/authorize` that names no `resource` is treated as a request for `https://mcp.obligationsign.com/mcp`. A refused client ID or return address is named on the notice page.

## Register by verified email

An agent that knows the account owner's email address can register itself. No credential exists until the owner has signed in and approved. ObligationSign never emails the code: it travels from the agent to the owner.

1. Register. `POST https://auth.obligationsign.com/agent/identity` with `Content-Type: application/json` and body `{"type":"service_auth","login_hint":"<account owner's email>"}`. The answer carries `claim_token` (returned once; keep it in memory only), `claim.user_code` (six digits), `claim.verification_uri`, `claim.expires_in` and `claim.interval`.
2. Hand over. Show the owner the code and the link in one message. The owner opens the link, signs in to ObligationSign, types the code, ticks the permissions and approves. Only the address given as `login_hint` can complete the registration.
3. Poll. `POST https://auth.obligationsign.com/token` (form-encoded) with `grant_type=urn:workos:agent-auth:grant-type:claim` and `claim_token=<claim_token>`, every `claim.interval` seconds, and keep polling until an answer other than `authorization_pending` arrives. On approval the answer carries `access_token`, `token_type`, `expires_in` and `scope`.
4. Use the access token as `Authorization: Bearer <YOUR_TOKEN>` on https://mcp.obligationsign.com/mcp.
5. Revoke when finished: `POST https://auth.obligationsign.com/revoke` (form-encoded) with `token=<access_token>` and `client_id=agent-registration`.

Poll answers: `authorization_pending` (keep polling); `slow_down` (poll less often); `expired_token` (the six-digit code ran out: `POST https://auth.obligationsign.com/agent/identity/claim` with JSON `{"claim_token":"...","email":"..."}` for a fresh code and link, then show them to the owner); `access_denied` (the owner declined: stop); `invalid_grant` (the registration is gone: register again).

Limits and guarantees:

- Registration method: `service_auth` only. `anonymous` and `identity_assertion` registrations are refused, and nothing is usable before the owner approves.
- Existing accounts only. Registration never creates an account, a tenant or a paid plan.
- A six-digit code can be typed for 10 minutes; a registration can be claimed for 30 minutes.
- Permissions: the owner ticks them on the approval page. Every permission is available to a registered agent except administering keys and secrets, which is given only through a sign-in connection.
- Lifetime: 60 minutes, no refresh tokens. Register again after expiry.
- The owner sees and revokes the connection at https://auth.obligationsign.com/connections.
- Record: every approval and revocation is written to the public transparency log.
- Machine-readable description: the `agent_auth` block in https://auth.obligationsign.com/.well-known/oauth-authorization-server.

Register only for a user who asked you to connect to their own ObligationSign account. Do not register with an address the user did not give you.

## Connect to the gateway

- Recommended transport: Streamable HTTP
- Endpoint: https://mcp.obligationsign.com/mcp
- Authentication header: `Authorization: Bearer <YOUR_TOKEN>`
- Tool discovery: `tools/list`
- Tool invocation: `tools/call`, using the tool's current input schema
- Gateway discovery: https://mcp.obligationsign.com/.well-known/mcp/server.json
- Protected-resource metadata: https://mcp.obligationsign.com/.well-known/oauth-protected-resource

The origin-level protected-resource metadata advertises `mcp:invoke` and Bearer authentication through a header. The authorization server for sign-in connections is named only in the `/mcp` metadata listed above. Use the endpoints published in the authorization server's metadata; do not invent token, authorization or dynamic client-registration endpoints. A scope label does not itself grant permissions: only permissions the account owner ticked are granted.

## Credential and action boundaries

Keep credentials in the client's protected credential store. Never place them in URLs, public prompts, source control, discovery documents or logs. Use only credentials authorised for the intended tenant.

Governed writes require pre-execution admission. Read-only and discovery calls do not each imply a new governance commitment. Follow the tool's actual approval and authorization requirements; listing a tool is not approval to execute it.

If a request returns 401 or 403, stop and resolve authentication or authorization through the existing account flow. Do not try other tenants' credentials or alternate routes to bypass the denial. Obtain explicit user approval before billing changes or other consequential actions.

## References

- MCP usage and onboarding: https://obligationsign.com/mcp/
- API catalogue: https://obligationsign.com/.well-known/api-catalog
- Public verification: https://obligationsign.com/verify/
- Legal terms: https://obligationsign.com/legal/
- Security reporting: https://obligationsign.com/security/
