Prerequisites
- Claude or ChatGPT. These are the only supported MCP clients. See Connect an agent for setup.
- Access to a Relay organization whose token can be issued for the MCP resource.
1. Add the server
Add the Relay MCP endpoint to your MCP client as a remote Streamable HTTP server:2. Let the client authorize
1
Client sends an unauthenticated request
The MCP client
POSTs to /mcp without a bearer token. The server replies with 401 and a WWW-Authenticate header pointing at the protected-resource metadata.2
Client reads the discovery document
The client fetches
GET /.well-known/oauth-protected-resource/mcp (RFC 9728) to find the authorization server, supported scopes, and required bearer_methods_supported.3
Client completes the OAuth flow
The client authorizes against the advertised authorization server and requests a token whose RFC 8707
resource parameter is the MCP endpoint URL. Tokens minted for a different audience are rejected.4
Client retries with the token
The client retries the original request with
Authorization: Bearer <access_token>. The server verifies scopes and organization membership on every tool call.Bearer tokens are accepted in the header only. Never place a token in a query parameter or in tool arguments.
3. List your organizations
Once the client is authorized, calllist_organizations to resolve an organizationId. Every tool call must include an intent argument: a short, factual description of what the user asked for and why this call serves it. See Common tool arguments.
Request
Response
4. List transactions
Use the resolvedorganizationId to fetch a page of transactions.
Request
pagination object. If hasNextPage is true, pass the returned nextCursor back on the next call with the same filters and pageSize.
Next steps
Connect an agent
Setup steps for Claude and ChatGPT.
Authentication
Scopes, audience binding, and the discovery document.
Tool reference
Every tool’s input and output schema.
Errors
Tool errors,
401, and rate limits.