Platform

MCP server

Authalla exposes a Model Context Protocol (MCP) server that lets AI assistants manage your tenants, users, apps, branding, domains, and more — directly from your editor or chat.

Connect your agent to your Authalla account and it can do everything the admin dashboard can.


Quick start

Add the Authalla MCP server URL to your client:

https://api.authalla.com/mcp

That's it. Your MCP client signs you in through your browser, you approve the connection on a consent screen, and if you belong to more than one Authalla account you pick the one the agent should manage. No API keys, no client registration.


Setup for Claude Code

Add the MCP server with a single command:

claude mcp add --transport http authalla https://api.authalla.com/mcp

Then sign in:

claude mcp login authalla

Claude Code discovers the authorization server from https://api.authalla.com/.well-known/oauth-protected-resource/mcp, opens your browser, and identifies itself with its Client ID Metadata Document. Once connected, you can ask Claude to manage your account directly:

> Create a new app called "my-app" with redirect URI http://localhost:3000/callback
> Update the login page theme to use dark blue as the brand color
> Add a custom domain app.example.com to my tenant

Setup for Claude Desktop and claude.ai

  1. Open Settings > Connectors and add a custom connector with the URL:
https://api.authalla.com/mcp
  1. Claude opens your browser to sign in to Authalla and approve the connection
  2. Once connected, the Authalla tools appear in the tools menu

Setup for Cursor and VS Code

Cursor and VS Code do not yet identify themselves with a Client ID Metadata Document, so they cannot use the automatic sign-in above. Use an account API key instead:

{
  "mcpServers": {
    "authalla": {
      "url": "https://api.authalla.com/mcp",
      "headers": {
        "Authorization": "Bearer authalla_ak_<keyid>_<secret>"
      }
    }
  }
}

For VS Code put the same block under "mcp": { "servers": { ... } } in settings.json or .vscode/mcp.json.


Connecting with an account API key

Any MCP client can skip the browser flow and authenticate with an account API key sent as a bearer token. This is the right choice for CI pipelines, shared automation, and clients without OAuth support:

claude mcp add --transport http authalla https://api.authalla.com/mcp \
  --header "Authorization: Bearer authalla_ak_<keyid>_<secret>"

The connection is bound to the key's account and limited to the key's scopes and tenant allowlist. Changes the agent makes are recorded in Team activity under the key, not a person, so prefer the interactive sign-in for day-to-day work: then they name the team member who connected the agent.


How authentication works

The MCP server follows the MCP authorization specification (OAuth 2.1). When a client connects for the first time it:

  1. Gets a 401 whose WWW-Authenticate header points at https://api.authalla.com/.well-known/oauth-protected-resource/mcp, and fetches that document to discover the authorization server (login.authalla.com) and the scopes to request.
  2. Identifies itself with an OAuth Client ID Metadata Document: its client_id is an https URL pointing at a JSON document that describes the client and its redirect URIs. Authalla fetches and validates the document; nothing is registered by hand. Dynamic Client Registration is not supported.
  3. Opens your browser to sign in with your Authalla account (passkey, magic link, or social login).
  4. Shows a consent screen naming the client and the permissions it asked for, with a note that the client registered itself, so its name hasn't been verified, and, for an agent such as Claude Code, that it runs on your computer. The MCP server asks for the authalla:manage permission, which the screen calls out in bold: it lets the agent do everything you can do in the admin dashboard, acting as you. Agents that identify themselves this way always go through consent, even if you approved them before.
  5. If you belong to several Authalla accounts, asks which account the agent may manage. The choice is baked into the token; get_me shows it and you reconnect to switch.
  6. Receives an access token issued for https://api.authalla.com/mcp (the token's audience) carrying the authalla:manage scope, and a refresh token. The MCP server accepts a token only when both the audience and that scope are present. Tokens are refreshed automatically.

To revoke an agent, sign out of it in your MCP client; the refresh token stops being renewed. Account API keys are revoked from Settings → API Keys.


Available tools

The MCP server exposes the following tools for managing your Authalla account:

Account and session

ToolDescription
get_meWho this connection acts as, the accounts and tenants it can reach, and the current default tenant
select_tenantSet the default tenant for the session
clear_selectionClear the default tenant

Tenants

ToolDescription
list_tenantsList all tenants in the account, with each one's issuer
get_tenantGet tenant details: its issuer (the address users sign in on and the iss of its tokens) and its sign-in methods. magic_link is sign-in by email: one email with a one-time code and a link that does the same
create_tenantCreate a new tenant. Pass id to choose its ID, which is also its subdomain: an adjective and two nouns from Authalla's word lists, such as brave-otter-lantern. An ID that isn't one, or is taken, fails with a few to pick from
update_tenantUpdate tenant settings: name, product name, registration, sign-in methods and whether AI agents may sign its users in. Only the fields you pass change
list_allowed_originsList the tenant's allowed origins: the browser origins that may call it (CORS)
add_allowed_originAllow a browser origin, such as a single-page app's. Adding one the tenant already allows changes nothing
remove_allowed_originStop a browser origin from calling the tenant

Users

ToolDescription
list_usersList users in a tenant
get_userGet user details
create_userCreate a new user. No email is sent. The user's email is verified the first time they sign in with an emailed code or link, a passkey, or a sign-in provider that vouches for it; no tool sets it
update_userUpdate a user, including their scopes. Resource server scopes such as crm:read are granted to one user here
delete_userDelete a user
list_connected_appsList the apps that can still act for a user: its resource servers, scopes and when it last got a token
revoke_connected_appRevoke an app's refresh and access tokens and remembered consent for a user. Servers that introspect refuse its access token at once; others accept it until it expires
sign_out_user_everywhereEnd all of a user's browser sessions and revoke every connected app, optionally suspending the user. See Revoke access

The user tools need an interactive sign-in: account API keys don't carry the users:read and users:write scopes.

Apps

An app is what the OAuth2 specs call a client. These tools take the app's ID as app_id; it is the same value as the app's client_id.

ToolDescription
list_appsList apps
get_appGet an app's details, redirect URIs, and scopes
create_appCreate a new app (returns the client secret for a confidential app)
update_appUpdate an app, including require_consent and its scopes
delete_appDelete an app
list_app_secretsList an app's secrets — label, prefix, created, last used, expires. Never their values
add_app_secretIssue an additional secret and return its value once, optionally retiring the current one at a deadline
expire_app_secretSet when a secret stops working, or revoke it immediately

Branding

ToolDescription
get_themeGet the login page theme: color mode, corner style, font, logos, tab icon and colors
update_themeSet the color mode, corner style, font, logos, tab icon and colors (brand, page background, card background) in one call; a logo or icon can be an uploaded file or a public image URL
create_logo_upload_urlGet a 15-minute URL to upload a logo or tab icon file to, for use in update_theme
reset_themeReset the logo, colors, corners and font to the defaults and remove the tab icon

Custom domains

ToolDescription
list_custom_domainsList custom domains
get_custom_domainGet domain details and DNS records
create_custom_domainAdd a custom domain to a tenant
verify_custom_domainTrigger DNS verification
delete_custom_domainRemove a custom domain

Sender addresses

Sender addresses belong to the account, so all but set_tenant_sender_address need an account-wide key.

ToolDescription
list_sender_addressesList the account's sender addresses and the tenants that send from each
get_sender_addressGet a sender address and its DNS records
add_sender_addressAdd a sender address and get the DNS records to publish
verify_sender_addressCheck the DNS records
remove_sender_addressRemove a sender address from the account and the email provider
set_tenant_sender_addressChoose the verified address a tenant sends from, or Authalla's

Social login

Each social login belongs to one tenant, with at most one per provider.

ToolDescription
list_social_loginsList the tenant's social logins
create_social_loginAdd a social login (Google, GitHub, Microsoft, Facebook, LinkedIn, X, Discord) to the tenant
update_social_loginUpdate a social login's credentials or turn it on or off
delete_social_loginRemove a social login from the tenant

Resource servers

Your own APIs and MCP servers that the tenant issues access tokens for. See Build an MCP server with Authalla.

ToolDescription
list_resource_serversList the tenant's resource servers with their scopes
get_resource_serverGet a resource server, its scopes and the protected resource metadata your server serves, with the token checks your server makes and a link to the guide. Says when AI agents can't connect because the tenant doesn't allow Client ID Metadata Documents
create_resource_serverRegister a resource server with its identifier, name, scope prefix and first scopes. Returns what get_resource_server does
update_resource_serverChange a resource server's identifier or name
delete_resource_serverDelete a resource server and take its scopes from every user
add_resource_server_scopeAdd a scope, optionally granted to all users
update_resource_server_scopeChange a scope's description or turn Grant to all users on or off. Off takes the scope from every user of the tenant
delete_resource_server_scopeDelete a scope and take it from every user

Organizations

Your business customers, each with its email domains, its enterprise connection, its SCIM provisioning, its members and the setup link its IT admin uses to connect their identity provider. See Single sign-on, SCIM provisioning and the setup portal.

ToolDescription
list_organizationsList the tenant's organizations with their domains, connection status and member counts
get_organizationGet an organization: its domains, connection status, member count, how many users on its domains aren't on single sign-on yet, and when its setup link expires
create_organizationAdd a business customer with its email domains and your own external ID
update_organizationChange an organization's name, external ID or email domains
delete_organizationDelete an organization with its connection, provisioning, domains, members and setup links. Its users stay in the tenant
list_organization_membersList an organization's members, or the users on its domains not on its single sign-on yet
add_organization_memberAdd a member by email, creating the user if the tenant has none, and optionally email them that they can sign in
remove_organization_memberRemove a member, optionally signing them out everywhere
create_portal_linkCreate the setup link for the organization's IT admin. Shown once; replaces the previous link
revoke_portal_linkRevoke the organization's setup link
get_organization_connectionGet the organization's enterprise connection: status, last test sign-in, identity provider details and the values to give the identity provider
create_organization_connectionSet up the organization's OIDC or SAML connection yourself, as a draft
update_organization_connectionChange its identity provider details, or turn it on (a draft without a test sign-in) or off
start_organization_connection_testGet a link to run a test sign-in; a pass turns a draft on and makes pending changes live
discard_organization_connection_changesDrop identity provider details waiting for a test sign-in
delete_organization_connectionDelete the organization's connection, whatever its status
get_organization_provisioningGet the organization's SCIM provisioning: its base URL, when its token was made and when the identity provider last called
create_organization_provisioningTurn on SCIM provisioning and get the SCIM base URL and token. The token is shown once
create_organization_scim_tokenMake a new SCIM token, shown once. The previous one stops working at once
delete_organization_provisioningTurn off SCIM provisioning and delete its token. Provisioned members and groups stay

Team

These tools need an interactive sign-in; an account API key cannot use them, so a key can never add an admin to the account.

ToolDescription
list_teamList the account's members and its open invitations, including expired ones
invite_team_memberEmail someone an invitation to administer the account. They accept it by signing in with that email within 7 days; inviting the same address again replaces it
resend_inviteEmail an invitation again and restart its 7 days
revoke_inviteRevoke an invitation so signing in with that email no longer joins the account
remove_team_memberRemove a member. They lose access on their next request. You cannot remove yourself or the account owner

Multiple accounts and tenants

If you belong to several Authalla accounts, the consent screen asks which one the agent may manage, and the connection is bound to it. Connect a second time (for example under a different server name in Claude Code) to give an agent access to another account.

Tools that operate on a specific tenant accept an optional tenant_id parameter. If the account has only one tenant, it is selected automatically; otherwise call select_tenant once or pass tenant_id on each call. Use get_me to see the tenants.


Programmatic access (without MCP)

The MCP server is for AI assistants. For automated pipelines or custom integrations, call Authalla's REST APIs directly, from your server or CI. Each takes its own secret credential:

  • Management API (control plane) — provision and configure infrastructure across your whole account: tenants and their allowed origins, apps, custom domains, sender addresses, social logins, resource servers, organizations, and themes. Authenticated with an account API key (authalla_ak_...) created from the Admin Dashboard. This is the equivalent of what the MCP tools above do, and the same key also works on the MCP endpoint.

    curl https://api.authalla.com/management/v1/tenants \
      -H "Authorization: Bearer authalla_ak_<keyid>_<secret>"
    
  • Application API (data plane) — manage users within a single tenant at runtime. Authenticated with a tenant-bound OAuth2 client credentials token. Create a Backend Service app in the Admin Dashboard and use the client credentials grant:

    curl -X POST https://your-tenant.authalla.com/oauth2/token \
      -d "grant_type=client_credentials" \
      -d "client_id=YOUR_CLIENT_ID" \
      -d "client_secret=YOUR_CLIENT_SECRET" \
      -d "scope=users:read users:write"
    

Tenant client_credentials tokens are scoped to the data plane (users:read / users:write) and are not accepted by the MCP endpoint — account-wide configuration goes through the Management API account key or the MCP server. Neither secret credential belongs in a browser or a mobile app. A signed-in user's own profile, sessions and connected apps are the User API's job, with the user's own access token; see Choosing an API.

Previous
Account API keys