Skip the install. Get this working in under 2 minutes.
Start a free trial on cloud.anythingmcp.com, add the WorkOS in one click, then point your AI client (Claude, ChatGPT, Copilot or Cursor) at the generated MCP endpoint. No Docker, no git clone, zero engineering experience required.
Summary
WorkOS API for B2B identity in one environment: organizations and their domains, AuthKit users, memberships, invitations and sessions, SSO connections, Directory Sync directories, users and groups, Audit Logs exports, the event stream, and RBAC roles and permissions. Creates and updates organizations, users, memberships and invitations; deletes and revokes are switched off at install.
Try asking
Example prompts for WorkOS
Click any prompt to copy it. Paste into Claude, ChatGPT, Cursor, Gemini, Copilot or OpenClaw to run it against this connector.
Claude is AI and can make mistakes. Please double-check responses.
💡 No install? Use cloud.anythingmcp.com directly. Sign in, click Connectors → WorkOS, paste your credentials, mint an MCP API key and you're done. No Docker, no
git clone, no local server.
WorkOS
WorkOS API for B2B identity in one environment: organizations and their domains, AuthKit users, memberships, invitations and sessions, SSO connections, Directory Sync directories, users and groups, Audit Logs exports, the event stream, and RBAC roles and permissions. Creates and updates organizations, users, memberships and invitations; deletes and revokes are switched off at install.
Setup
Setting up takes about 2 minutes.
- Open https://dashboard.workos.com, pick the environment (Sandbox or Production) in the top bar and open API Keys.
- Create a secret key (
sk_..., shown once) and paste it intoWORKOS_API_KEY, without spaces or aBearerprefix. - Install the connector and run
workos_list_organizations: it lists the organizations of the environment and confirms the key.
A key belongs to one environment and has full access to that environment's API: WorkOS keys have no scopes. Start with a Sandbox key, and use a Production key only when the AI should work on real data.
Personal and sensitive data: the key reaches the identity data of every organization in the environment, and the AI reads whatever a tool returns: names and email addresses, sign-in identities, session IP addresses and user agents, directory users with job titles, organization metadata and Stripe customer ids, and audit log content. workos_get_directory_user and workos_get_directory_group return the provider's raw attributes in full, which can hold phone numbers, manager, department and employee ids; the list tools leave them out. The AI shares only what the task needs.
Secret values: the connector never returns the API key. Invitation answers have their token and accept_invitation_url removed, because that link lets anyone who has it join the organization. workos_get_audit_log_export returns a short-lived download link (url) to the CSV; the AI treats it like a password and does not paste it anywhere else.
Organizations and domains: workos_list_organizations (filter by name text or domain), workos_get_organization, workos_get_organization_by_external_id, workos_create_organization and workos_update_organization. workos_create_organization_domain adds a domain as pending with a DNS TXT record (verification_prefix, verification_token) for the domain owner to publish; then workos_verify_organization_domain starts the check and workos_get_organization_domain shows the state.
Users, memberships and roles: workos_list_users (by email or organization_id), workos_get_user, workos_get_user_by_external_id, workos_create_user (without a password; the person signs in with Magic Auth, social login, SSO or an invitation) and workos_update_user; sign-in providers with workos_list_user_identities, sessions with workos_list_user_sessions. Memberships: workos_list_organization_memberships, workos_get_organization_membership, workos_create_organization_membership, workos_update_organization_membership to change the role, and workos_deactivate_organization_membership and workos_reactivate_organization_membership to block and restore access. Role slugs come from workos_list_roles, workos_get_role and workos_list_organization_roles (custom roles start with org-), permissions from workos_list_permissions.
Invitations: workos_list_invitations, workos_get_invitation, workos_send_invitation (WorkOS sends the email itself) and workos_resend_invitation.
SSO and Directory Sync: workos_list_connections and workos_get_connection show the connection type and state (active means users can sign in). workos_list_directories, workos_get_directory, workos_list_directory_users (needs directory or group), workos_get_directory_user, workos_list_directory_groups (needs directory or user) and workos_get_directory_group read the synced users and groups; workos_sync_directory queues a sync right away.
Audit Logs and events: workos_list_audit_log_actions and workos_list_audit_log_schemas show what is logged. workos_create_audit_log_export starts a CSV export for a time range (it writes no events) and workos_get_audit_log_export reports on it until state is ready; workos_get_audit_log_retention says how many days events are kept. workos_list_events reads the event stream by type (user.created, organization_membership.updated, dsync.user.created, connection.activated and so on) with range_start and range_end; order: asc replays them in sequence. The API keeps 90 days of events, and one call covers at most 30 days.
Updates: workos_update_organization and workos_update_user change only the fields you pass, but domain_data and metadata replace the stored value, so the AI sends the full list or object. Changing a user's email resets email_verified to false. A new role on a membership replaces the current one.
Switched off at install: workos_delete_organization, workos_delete_organization_domain, workos_delete_user, workos_delete_organization_membership, workos_revoke_invitation, workos_revoke_session and workos_create_audit_log_event. They cannot be undone (audit log events cannot be removed once written), so a workspace admin turns them on when the team needs them.
Data formats: ids carry a type prefix (org_, org_domain_, user_, om_, invitation_, session_, conn_, directory_, directory_user_, directory_group_, audit_log_export_, event_). Timestamps are ISO 8601 in UTC. Lists come as {"object": "list", "data": [...], "list_metadata": {...}}. metadata values are strings.
Paging: lists return 10 items by default, up to 100 with limit, newest first. For the next page the AI passes list_metadata.after as after and stops when it is null; workos_list_events pages the same way.
Limits: 6,000 requests a minute per key; AuthKit 1,000 reads and 500 writes per 10 seconds; directory users 4 requests a second per directory; organization deletes 50 a minute. Invitation emails count toward WorkOS's email sending limits.
Common errors: 401 means a wrong or revoked key. 403 means the key may not do this or the feature is not enabled for the environment. 404 means an unknown id, or an id from another environment. 400 or 422 means an invalid field, and the body names it. 429 means the rate limit: wait and retry once.
The connector does not configure SSO connections, AuthKit branding, redirect URIs, Vault, Pipes or API keys, does not set passwords, and never signs anyone in.
Prerequisites: WORKOS_API_KEY
Install the connector locally
curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d
Open http://localhost:3000/connectors/store, pick WorkOS and paste in the env vars listed under Prerequisites.
Available tools
| Tool | What it does |
|---|---|
workos_list_organizations | List organizations (the customer companies of this WorkOS environment), newest first: id, name, external_id, domains with their… |
workos_get_organization | One organization by id: name, domains (each with id, state and verification strategy), external_id, stripe_customer_id, metadata and… |
workos_get_organization_by_external_id | One organization by the external_id your own application stored on it |
workos_create_organization | Create an organization |
workos_update_organization | Update an organization: name, domains (domain_data replaces the whole list), external_id, Stripe customer id, metadata or the… |
workos_delete_organization | Permanently delete an organization together with its SSO connections and directories |
workos_get_organization_domain | One organization domain: domain name, state (pending, verified, failed, legacy_verified), verification strategy (dns or manual), the DNS… |
workos_create_organization_domain | Add a domain to an organization |
workos_verify_organization_domain | Start DNS verification of a pending organization domain after its TXT record was published |
workos_delete_organization_domain | Remove a domain from its organization |
workos_list_users | List AuthKit users of the environment, newest first: id, email, email_verified, first and last name, profile picture URL, external_id… |
workos_get_user | One AuthKit user by id: email, verification state, names, external_id, metadata, locale and last sign-in time |
workos_get_user_by_external_id | One AuthKit user by the external_id your own application stored on it |
workos_create_user | Create an AuthKit user without a password; the person signs in with a method enabled in the environment (Magic Auth, social or SSO) or… |
workos_update_user | Update an AuthKit user: name, email (resets email_verified to false), email_verified, external_id, metadata or locale |
workos_delete_user | Permanently delete an AuthKit user with their memberships, identities and sessions |
workos_list_user_identities | The sign-in identities linked to a user: provider (e.g |
workos_list_user_sessions | A user's AuthKit sessions, newest first: id, status, auth_method, organization_id, ip_address, user_agent, impersonator, expires_at and… |
workos_revoke_session | End one AuthKit session (sign the user out of that device) |
workos_list_organization_memberships | List organization memberships (which user belongs to which organization, with role(s) and status active, inactive or pending) |
workos_get_organization_membership | One organization membership: user, organization, role(s), status, whether a directory manages it, and IdP custom attributes |
workos_create_organization_membership | Add an existing AuthKit user to an organization with one role (role_slug) or several (role_slugs) |
workos_update_organization_membership | Change the role(s) of an organization membership; the new role replaces the current one |
workos_deactivate_organization_membership | Deactivate a membership: the user keeps the account and the membership record but can no longer sign in to that organization |
workos_reactivate_organization_membership | Reactivate an inactive membership, with its previous role(s) |
workos_delete_organization_membership | Permanently remove a user from an organization |
workos_list_invitations | List invitations, newest first: email, state (pending, accepted, expired, revoked), organization, role, inviter, expires_at |
workos_get_invitation | One invitation by id with its state and expiry, without the token and accept link |
workos_send_invitation | Invite someone by email, optionally into an organization with a role |
workos_resend_invitation | Send the email of a pending invitation again, optionally in another language |
workos_revoke_invitation | Revoke a pending invitation so its link stops working |
workos_list_connections | List SSO connections, newest first: id, name, organization_id, connection_type (OktaSAML, AzureSAML, GoogleOAuth, GenericOIDC, ...), state… |
workos_get_connection | One SSO connection by id: connection type, state, organization and domains |
workos_list_directories | List Directory Sync directories (SCIM, Entra ID, Google Workspace, Okta, BambooHR, ...), newest first: id, name, type, state (linked… |
workos_get_directory | One directory: type, state, organization, domain and user and group counts |
workos_sync_directory | Ask WorkOS to sync a directory from its provider now |
workos_list_directory_users | List users synced from a directory or a directory group: name, emails, username, job title, state (active, suspended, inactive), role(s)… |
workos_get_directory_user | One directory user with everything the provider sent, including raw_attributes (can hold phone numbers, manager, department, employee ids) |
workos_list_directory_groups | List groups synced from a directory, or the groups of one directory user: id, name, idp_id. raw_attributes are left out |
workos_get_directory_group | One directory group by id: name, idp_id, directory, organization and the provider's raw_attributes |
workos_list_audit_log_actions | List the Audit Logs actions configured in the environment (e.g. user.signed_in, document.updated) with their latest schema |
workos_list_audit_log_schemas | List the schema versions of one Audit Logs action: allowed target types and the actor, target and metadata JSON schemas |
workos_create_audit_log_event | Write an event into an organization's audit log |
workos_create_audit_log_export | Start a CSV export of an organization's audit log events for a time range, optionally filtered by actions, actors and target types |
workos_get_audit_log_export | State of an audit log export (pending, ready, error) |
workos_get_audit_log_retention | How many days an organization's audit log events are kept (retention_period_in_days) |
workos_list_events | Read the environment's event stream (what happened in WorkOS and at the connected identity and directory providers): id, event type… |
workos_list_roles | List the environment roles (RBAC) with slug, name, description, permissions and type, the roles every organization starts with |
workos_get_role | One environment role by slug: name, description, type and its permission slugs |
workos_list_organization_roles | All roles available in one organization: the environment roles plus its own custom roles (slugs starting with org-), with permissions |
workos_list_permissions | List the RBAC permissions defined in the environment: slug, name, description |
Example prompts
- "Which organizations have an SSO connection that is not active yet?"
- "List the members of the organization Acme Corp with their roles and status."
- "Invite [email protected] to the organization Acme Corp with the role admin."
- "Which directories are in the state invalid_credentials, and which organizations do they belong to?"
- "Export the audit log of Acme Corp for October as a CSV file."
Next steps
Was this guide helpful?