WorkOS MCP server for AI agents

Live

BEARER TOKEN

USER MANAGEMENT

Developer Tools

WorkOS gives your agent user management for your WorkOS environment: manage organizations, AuthKit users, memberships, and invitations, inspect SSO connections and Directory Sync, toggle feature flags, and write audit log events.

  • Per-user credentials: each call uses the actual user's access token, never a shared bot.
  • Encrypted per-tenant vault: AES-256, resolved at request time, never in LLM context.
  • Scoped before every call: pre-call scope check, 90-day SIEM-exportable audit chain.
WorkOS
agent · Acme Q3
Run
Is the SSO connection for Globex active?
S
workos_connections_list
97ms
Identity ops agent
Globex has 1 SSO connection, an Okta SAML connection in the active state for globex.com.
Sources: 1 organization, 1 connection
workos
1 connection
18:29
Message Claude...

Tools your identity ops agent reaches for on WorkOS, scoped per user.

CALL ANY TOOL
73 tools for user management in WorkOS: create and update organizations, AuthKit users, memberships, and invitations, inspect SSO connections and Directory Sync users and groups, assign roles, toggle feature flags, and record and export audit logs.
workos_audit_log_actions_list
List audit log actions
List the audit log actions configured in the WorkOS environment. Returns a page of actions, each with its name and current schema, plus list_metadata cursors. Use this to see which action names workos_audit_log_event_create accepts; use workos_audit_log_schemas_list for one action's schema versions.
Parameters
Name
Type
Required
Description
after
string
Optional
Pagination cursor for the next page. Pass the list_metadata.after value from the previous response to get the records that come after it. Leave empty for the first page. Example: user.signed_in
before
string
Optional
Pagination cursor for the previous page. Pass the list_metadata.before value from a response to get the records that come before it. Example: user.signed_in
limit
integer
Optional
Maximum number of records to return in one page, from 1 to 100. Defaults to 10. Example: 25. Default: `10`.
order
string
Optional
Sort order by creation time: desc (newest first), asc (oldest first), or normal (newest first with reversed cursor semantics). Defaults to normal (newest first). Example: desc. One of: `normal`, `desc`, `asc`.
workos_audit_log_event_create
Create audit log event
workos_audit_log_export_get
Get audit log export
workos_authorization_check
Check authorization
workos_connection_delete
Delete connection
workos_directories_list
List directories
workos_directory_get
Get directory
workos_events_list
List events
workos_feature_flag_enable
Enable feature flag
workos_feature_flag_get
Get feature flag
workos_group_create
Create group
workos_group_delete
Delete group
workos_group_member_add
Add group member
workos_group_member_remove
Remove group member
workos_group_update
Update group
workos_groups_list
List groups
workos_invitation_get
Get invitation
workos_invitation_revoke
Invitation revoke
workos_invitation_send
Send invitation
workos_organization_domain_create
Create organization domain
workos_organization_domain_delete
Delete organization domain
workos_organization_domain_verify
Verify organization domain
workos_organization_feature_flags_list
List organization feature flags
workos_organization_get_by_external_id
Organization get by external id
workos_organization_membership_reactivate
Organization membership reactivate
workos_organization_role_get
Get organization role
workos_organization_roles_list
List organization roles
workos_organization_update
Update organization
workos_roles_list
List roles
workos_user_get
Get user

For more tools, view docs.

Build your Agent
Same auth pattern across LangChain, OpenAI, Anthropic, and Google ADK.
Python · LlamaIndex
import { ScalekitClient } from "@scalekit-sdk/node";
import { createReactAgent } from "@langchain/langgraph/prebuilt";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);

// WorkOS tools scoped to this user
const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["workos"], toolNames: [
    "workos_organizations_list",
    "workos_connections_list",
    "workos_portal_link_generate"] },
  pageSize: 100,
});

const agent = createReactAgent({ llm, tools });
await agent.invoke({ messages: [{ role: "user", content: "Check whether the SSO connection for Globex is active" }] });
import OpenAI from "openai";
import { ScalekitClient } from "@scalekit-sdk/node";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);
const openai = new OpenAI();

const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["workos"] }, pageSize: 100,
});

const res = await openai.chat.completions.create({
  model: "gpt-5",
  messages: [{ role: "user", content: "Check whether the SSO connection for Globex is active" }],
  tools,
});

// Execute the tool call with the user's vaulted WorkOS access token
await sk.tools.executeTool(res.choices[0].message.tool_calls[0], "user_123");
import Anthropic from "@anthropic-ai/sdk";
import { ScalekitClient } from "@scalekit-sdk/node";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);
const anthropic = new Anthropic();

const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["workos"] }, pageSize: 100,
});

const msg = await anthropic.messages.create({
  model: "claude-sonnet-5",
  max_tokens: 1024,
  messages: [{ role: "user", content: "Check whether the SSO connection for Globex is active" }],
  tools,
});

// Tool call runs with the user's vaulted WorkOS access token
await sk.tools.executeTool(msg.content, "user_123");
import { Agent } from "@google/adk/agents";
import { ScalekitClient } from "@scalekit-sdk/node";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);

const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["workos"] }, pageSize: 100,
});

const agent = new Agent({
  name: "identity_ops_agent",
  model: "gemini-2.5-pro",
  instruction: "WorkOS tools scoped to this user",
  tools,
});

await agent.run("Check whether the SSO connection for Globex is active");
Try these prompts
Copy any prompt into your agent. Each maps directly to a WorkOS tool. Click to copy, paste into your agent, done.
Organizations and users
Copy the prompt
Copied
Create an organization called Globex with the domain globex.com.
Copy the prompt
Copied
Find the AuthKit user with the email jane@globex.com.
Copy the prompt
Copied
Invite sam@globex.com to the Globex organization as an admin.
SSO and directories
Copy the prompt
Copied
List SSO connections for the Globex organization.
Copy the prompt
Copied
List the users synced from the Acme directory.
Copy the prompt
Copied
Generate an Admin Portal link so Globex IT can set up SSO.
Access and audit
Copy the prompt
Copied
Check whether Jane's Globex membership has the invoices:edit permission.
Copy the prompt
Copied
Enable the new-dashboard feature flag.
Copy the prompt
Copied
Export Globex audit log events from last month.
SEE HOW AUTH WORKS
Each user connects their own WorkOS access token once, and Scalekit sends it with every call. Tokens stay vaulted, every call is scope checked, and every action is logged.
1
Authorize
Your user connects
WorkOS
once. We tie it to their identity and the meetings they approved — no shared bot account, no org-wide access
Who:
user ‘A’
when:
Once per user
access:
Limited to user
2
Store
Their
WorkOS
token lives in a vault scoped to them. User A's meetings are never reachable by an agent acting for user B, even on the same connection
vault:
encrypted
scope:
per-user
tokens:
auto-refreshed
3
Resolve
When your agent calls a
WorkOS
tool, we fetch the right token server-side. It never touches your agent, never appears in the LLM context, never shows up in your logs
speed:
~40ms
check:
before every call
seen by:
nobody
4
Audit
Every
WorkOS
tool call is logged — who triggered it, which meeting was fetched, what came back. 90 days of history, tied to the user who authorized it
history:
90 days
export:
SIEM-ready
logged:
every call
Test other agents
See the same per-user auth pattern across other developer tools connectors.
Engineering Teams
DevOps assistant agent
Polls GitHub for failing checks and stale PRs, opens Linear issues for the ones that need work, and posts a daily digest to Slack. It acts as the engineer, not a shared service account.
Support and Ops Teams
Support ticket automation agent
Fetches new Zendesk tickets, drafts a reply from Notion knowledge base articles, digests what it cannot answer to Slack, and archives the rest, acting as the support agent rather than a shared API key.
Test other agents
See the same per-user auth pattern across other developer tools connectors.
ENGINEERING
DevOps assistant agent
Poll GitHub for failing checks and stale pull requests, open Linear issues for the ones that need work, and digest to Slack.
SUPPORT
Support ticket automation (Google ADK)
Fetch, annotate, and archive Zendesk tickets with Notion context, digesting anything it cannot answer to Slack.
Why Scalekit
Secure your agent's access. Connectors ship in minutes
01.
Shared tokens break per-user analytics
A shared WorkOS access token looks fine in a demo. In production every membership change looks like one service account, and you cannot tell which user triggered it. Scalekit resolves the credential of the actual user who triggered the agent, never a shared bot.
// shared token
audit → bot_service_account

// scalekit
audit → user_abc ✓
02.
Authentication is not authorization
03.
Multi-tenancy is architectural
04.
WorkOS today. Ten connectors tomorrow.
“Our agents act across Salesforce, Gong, Google Drive, and more, on behalf of every customer. Scalekit behind the scenes meant we can keep adding tools without ever rebuilding how credentials or tool calling work.”
Venu Madhav Kattagoni
Head of Engineering / Von
FAQs
Frequently Asked Questions
Does the agent access WorkOS as the user or through a shared access token?
As the user. Each user connects their own WorkOS access token once, and Scalekit sends it with every call. Organization, user, and membership changes the agent makes are attributed to that user in your audit trail, not a shared service account.
Where is the WorkOS access token stored?
In Scalekit's managed AES-256 token vault, namespaced per tenant. To rotate it, the user reconnects with a new access token. Revocation is a single dashboard action. Credentials never appear in prompts, logs, or LLM context.
Can I limit what the agent does in WorkOS?
Yes. Filter by tool name in listScopedTools to expose only what you want, for example read tools without workos_organization_delete and workos_user_delete, which cannot be undone. Scalekit also enforces scope checks before every API call.
What happens when a user revokes WorkOS access?
The connection is invalidated on the next tool call. Subsequent requests for that user fail closed with a clear error. Other users in the tenant remain unaffected. The event is logged for audit.
Can the agent set up SSO for a customer?
It can hand setup to the customer's IT admin. workos_portal_link_generate creates a short-lived Admin Portal link for SSO, Directory Sync, domain verification, or audit log streams. The agent can then check the result with workos_connections_list and workos_directories_list.
Start in your coding agent
Up and running in one command
Install the Scalekit skill in your editor of choice. Connector, auth, tools, prompt, all wired up
Claude Code REPL
/plugin marketplace add scalekit-inc/claude-code-authstack
/plugin install agentkit@scalekit-auth-stack
Cursor Code REPL
# ~/.cursor/mcp.json
{
""mcpServers"": {
""workos"": {
""url"": ""https://mcp.scalekit.com/workos"",
""headers"": { ""Authorization"": ""Bearer $SCALEKIT_TOKEN"" }
}
}
}
Codex Code REPL
# ~/.codex/config.toml
[mcp_servers.workos]
url = ""https://mcp.scalekit.com/workos""
auth_env = ""SCALEKIT_TOKEN""
Copilot Code REPL
# .vscode/mcp.json
{
""servers"": {
""workos"": {
""url"": ""https://mcp.scalekit.com/workos"",
""type"": ""http""
}
}
}