Skip to main content

MCP server sign-in

SyAuth signs your users in to your own MCP server for AI assistants such as Claude. Register the MCP server's exact URL, publish protected resource metadata that names the authorization server https://api.syauth.com/e/v1/mcp, and verify the JWT access tokens with SyAuth's JWKS. Assistants identify themselves with a client metadata document or register themselves, then your users sign in on your hosted login and approve access. Follow the MCP server guide.

API conventions · All endpoints · Schemas

/e/v1/mcp/.well-known/oauth-authorization-server​

Authorization server metadata of the MCP issuer https://api.syauth.com/e/v1/mcp (RFC 8414, also valid as an OpenID discovery document). Also served at https://api.syauth.com/.well-known/oauth-authorization-server/e/v1/mcp and /.well-known/openid-configuration/e/v1/mcp. MCP clients read it themselves.

OPTIONS​

CORS preflight for browser-based MCP clients. No body.

Success and error response examples

Illustrative values; conditional branches are alternatives. Fields vary with the operation and account configuration.

204 — text/XML

No response body.

GET​

No body. Returns the issuer, authorization, token and registration endpoints, jwks_uri, code_challenge_methods_supported: ["S256"], token_endpoint_auth_methods_supported: ["none"], client_id_metadata_document_supported: true and authorization_response_iss_parameter_supported: true.

Success and error response examples

Illustrative values; conditional branches are alternatives. Fields vary with the operation and account configuration.

200 — json

JSON response varies with the request. See the operation requirements and linked schema; validation errors may be keyed by field name.

/e/v1/mcp/.well-known/openid-configuration​

Authorization server metadata of the MCP issuer https://api.syauth.com/e/v1/mcp (RFC 8414, also valid as an OpenID discovery document). Also served at https://api.syauth.com/.well-known/oauth-authorization-server/e/v1/mcp and /.well-known/openid-configuration/e/v1/mcp. MCP clients read it themselves.

OPTIONS​

CORS preflight for browser-based MCP clients. No body.

Success and error response examples

Illustrative values; conditional branches are alternatives. Fields vary with the operation and account configuration.

204 — text/XML

No response body.

GET​

No body. Returns the issuer, authorization, token and registration endpoints, jwks_uri, code_challenge_methods_supported: ["S256"], token_endpoint_auth_methods_supported: ["none"], client_id_metadata_document_supported: true and authorization_response_iss_parameter_supported: true.

Success and error response examples

Illustrative values; conditional branches are alternatives. Fields vary with the operation and account configuration.

200 — json

JSON response varies with the request. See the operation requirements and linked schema; validation errors may be keyed by field name.

/e/v1/mcp/register/​

Dynamic client registration (RFC 7591) for AI assistants. You do not call it yourself: the MCP client does.

OPTIONS​

CORS preflight. No body.

Success and error response examples

Illustrative values; conditional branches are alternatives. Fields vary with the operation and account configuration.

204 — text/XML

No response body.

POST​

JSON redirect_uris (1 to 5 exact addresses, https or http on localhost), optional client_name. Public clients only (token_endpoint_auth_method none) with the authorization_code grant. 20 registrations per hour per address. Registration grants nothing until a user approves access.

Example request body:


{
"client_name": "Claude",
"redirect_uris": [
"https://claude.ai/api/mcp/auth_callback"
],
"token_endpoint_auth_method": "none"
}

Success and error response examples

Illustrative values; conditional branches are alternatives. Fields vary with the operation and account configuration.

201 — json

JSON response varies with the request. See the operation requirements and linked schema; validation errors may be keyed by field name.

/e/v1/mcp/authorize/​

Start sign-in for an MCP server. Opened in the user's browser by the MCP client.

GET​

Query: client_id (from registration, or the https URL of the client's metadata document), redirect_uri (listed exactly in the registration or the document; an http loopback address such as http://localhost/callback matches on any port, for native clients like Claude Code), response_type=code, code_challenge with code_challenge_method=S256, resource (the MCP server URL registered in your workspace), optional state. Continues with your workspace's hosted login and consent; the browser then returns to redirect_uri with code, state and iss (RFC 9207). A wrong client, redirect, PKCE method or unknown resource is refused with 400 before any login, and nothing is sent to the client.

Client metadata documents: when client_id is an https URL with a path, SyAuth fetches that JSON document (public addresses only, no redirects, at most 5 KB, cached as its Cache-Control allows, between 5 minutes and 1 day). The document's client_id must equal the URL, redirect_uris must list 1 to 10 addresses (https or http on localhost), it must allow the none authentication method and must not contain a secret. The consent page shows the document's host next to the client's name. An unreachable document answers 503 unless an earlier copy is kept; a document whose client_id changed ends the client's refresh tokens.

Success and error response examples

Illustrative values; conditional branches are alternatives. Fields vary with the operation and account configuration.

302 — redirect

Redirect: inspect Location and preserve cookies.

/e/v1/mcp/callback/​

Internal step of MCP sign-in: the hosted login returns here, and SyAuth forwards the browser to the client's redirect_uri. You never call it yourself.

GET​

Query state (SyAuth's own, single use, 30 minutes) and code, or error with optional error_description. Redirects to the client's redirect_uri with code (or error), the client's original state and iss. An expired or unknown sign-in answers 400 as plain text.

Success and error response examples

Illustrative values; conditional branches are alternatives. Fields vary with the operation and account configuration.

302 — redirect

Redirect: inspect Location and preserve cookies.

/e/v1/mcp/token/​

Exchange a code or refresh token for an access token for the MCP server.

OPTIONS​

CORS preflight. No body.

Success and error response examples

Illustrative values; conditional branches are alternatives. Fields vary with the operation and account configuration.

204 — text/XML

No response body.

POST​

Form-encoded (or JSON). grant_type=authorization_code with code, code_verifier, client_id, redirect_uri and optionally resource; or grant_type=refresh_token with refresh_token and client_id. A code works once, within 10 minutes; a failed attempt also uses it up. Returns a 1-hour RS256 JWT access token (typ: at+jwt, kid from the JWKS) with iss https://api.syauth.com/e/v1/mcp, aud the MCP server URL, sub the user ID, client_id, scope, email and workspace_id, plus a 30-day refresh token. Each refresh returns a new refresh token and stops the one used (rotation). Errors use the OAuth format (error, error_description).

Success and error response examples

Illustrative values; conditional branches are alternatives. Fields vary with the operation and account configuration.

200 — json

JSON response varies with the request. See the operation requirements and linked schema; validation errors may be keyed by field name.

/e/v1/developer/mcp-servers/​

List or register the MCP servers of a workspace.

Authentication: X-Developer-Token with the scope shown below, an active SyAuth plan, and access to the resource. Dashboard requests use your signed-in account.

GET​

Header: X-Developer-Token: YOUR_DEVELOPER_TOKEN. The token must have the read_mcp scope. A token that only has write_mcp is rejected here: read and write calls use different scopes, so create a token with the scope this call needs.

Required query workspace_id. Returns results plus authorization_server, metadata_url and jwks_uri to configure your server.

Request fields (combine with the requirements and schema above):

LocationFieldFallback when absent
queryworkspace_idnot supplied
Success and error response examples

Illustrative values; conditional branches are alternatives. Fields vary with the operation and account configuration.

200 — json


{
"results": [
{
"id": "11111111-1111-4111-8111-111111111111",
"workspace_id": "EXAMPLE_WORKSPACE_ID",
"name": "Example",
"resource_url": "EXAMPLE_RESOURCE_URL",
"allow_signup": "EXAMPLE_ALLOW_SIGNUP",
"is_active": true,
"connected_clients": "EXAMPLE_CONNECTED_CLIENTS",
"created_at": "EXAMPLE_CREATED_AT",
"updated_at": "EXAMPLE_UPDATED_AT"
}
]
}

404 — json


{
"error": "Workspace not found"
}

POST​

Header: X-Developer-Token: YOUR_DEVELOPER_TOKEN. The token must have the write_mcp scope. A token that only has read_mcp is rejected here: read and write calls use different scopes, so create a token with the scope this call needs.

JSON workspace_id, name (2 to 100 characters, shown on the consent page) and resource_url (the exact https URL of your MCP endpoint, without query or fragment; stored in canonical form). Optional allow_signup (default false: only existing users of the workspace can sign in) and is_active.

Example request body:


{
"workspace_id": "11111111-1111-4111-8111-111111111111",
"name": "Acme MCP",
"resource_url": "https://mcp.example.com/mcp"
}

Success and error response examples

Illustrative values; conditional branches are alternatives. Fields vary with the operation and account configuration.

201 — json


{
"id": "11111111-1111-4111-8111-111111111111",
"workspace_id": "EXAMPLE_WORKSPACE_ID",
"name": "Example",
"resource_url": "EXAMPLE_RESOURCE_URL",
"allow_signup": "EXAMPLE_ALLOW_SIGNUP",
"is_active": true,
"connected_clients": "EXAMPLE_CONNECTED_CLIENTS",
"created_at": "EXAMPLE_CREATED_AT",
"updated_at": "EXAMPLE_UPDATED_AT"
}

400 — json

JSON response varies with the request. See the operation requirements and linked schema; validation errors may be keyed by field name.

400 — json


{
"resource_url": [
"This MCP server URL is already registered."
]
}

404 — json


{
"error": "Workspace not found"
}

/e/v1/developer/mcp-servers/{server_id}/​

Read, update or delete one MCP server.

Authentication: X-Developer-Token with the scope shown below, an active SyAuth plan, and access to the resource. Dashboard requests use your signed-in account.

GET​

Header: X-Developer-Token: YOUR_DEVELOPER_TOKEN. The token must have the read_mcp scope. A token that only has write_mcp is rejected here: read and write calls use different scopes, so create a token with the scope this call needs.

Must have access to its workspace.

Path parameters: server_id (uuid, required).

Success and error response examples

Illustrative values; conditional branches are alternatives. Fields vary with the operation and account configuration.

200 — json


{}

404 — json


{
"error": "Not found"
}

PUT​

Header: X-Developer-Token: YOUR_DEVELOPER_TOKEN. The token must have the write_mcp scope. A token that only has read_mcp is rejected here: read and write calls use different scopes, so create a token with the scope this call needs.

Partial name, resource_url, allow_signup or is_active. Deactivating revokes the refresh tokens of connected assistants.

Path parameters: server_id (uuid, required).

Example request body:


{
"is_active": false
}

Success and error response examples

Illustrative values; conditional branches are alternatives. Fields vary with the operation and account configuration.

200 — json


{
"id": "11111111-1111-4111-8111-111111111111",
"workspace_id": "EXAMPLE_WORKSPACE_ID",
"name": "Example",
"resource_url": "EXAMPLE_RESOURCE_URL",
"allow_signup": "EXAMPLE_ALLOW_SIGNUP",
"is_active": true,
"connected_clients": "EXAMPLE_CONNECTED_CLIENTS",
"created_at": "EXAMPLE_CREATED_AT",
"updated_at": "EXAMPLE_UPDATED_AT"
}

400 — json

JSON response varies with the request. See the operation requirements and linked schema; validation errors may be keyed by field name.

400 — json


{
"resource_url": [
"This MCP server URL is already registered."
]
}

404 — json


{
"error": "Not found"
}

DELETE​

Header: X-Developer-Token: YOUR_DEVELOPER_TOKEN. The token must have the write_mcp scope. A token that only has read_mcp is rejected here: read and write calls use different scopes, so create a token with the scope this call needs.

No body. Deletes the MCP server, the assistants' connections to it and their tokens.

Path parameters: server_id (uuid, required).

Success and error response examples

Illustrative values; conditional branches are alternatives. Fields vary with the operation and account configuration.

204 — json

No response body.

404 — json


{
"error": "Not found"
}