Connecting WorkOS to Claude: A Comprehensive Guide to MCP Integration

Última actualización: 2 de November de 2026
  • WorkOS utilizes the Model Context Protocol (MCP) to allow Claude and other AI agents to manage SSO, directory syncs, and organizations via natural language.
  • The integration strictly adheres to existing dashboard permissions, ensuring the AI cannot perform actions that the authenticated user is not authorized to execute.
  • Security is reinforced through a two-step confirmation process for irreversible deletions and the automatic stripping of sensitive API keys from AI responses.

Pantalla de ordenador con código de programación y un menú de acciones de inteligencia artificial, ilustrando la gestión de infraestructura mediante IA.

Ever felt like you’re wasting half your morning jumping between a code editor, a complex admin dashboard, and a mountain of API documentation just to fix one login error? It’s a classic developer headache. But things are shifting. Instead of you hunting for data, the tools are now coming to the AI. By linking WorkOS with Claude, you’re essentially giving your AI assistant a set of hands to manage your identity and auth infrastructure through simple conversation.

This isn’t just about a fancy shortcut; it’s a fundamental change in how we handle DevOps and support. By leveraging the Model Context Protocol (MCP), Claude can now act as a remote operator for your WorkOS environment. Whether you’re using the web app, the desktop version, or the CLI-based Claude Code, you can now execute complex administrative tasks without ever leaving your chat window, turning what used to be a tedious manual process into a quick chat.

Getting the Connection Live

Desarrollador concentrado trabajando en un portátil con software de inteligencia artificial en un entorno moderno.

Setting things up is surprisingly breezy, though the path differs depending on where you spend your time. For those using Claude on the web or desktop, the fastest route is the marketplace. It’s a one-click affair where you find WorkOS in the connector directory and authorize it. If you’re feeling more hands-on, you can go to Settings, hit Add custom connector, and manually input the WorkOS server URL.

For the terminal warriors using Claude Code, it’s even simpler. A single command is all it takes to start the process, which then triggers an OAuth consent screen in your browser. Once you sign in and approve the access, you’re golden. If your session ever feels stale or disconnected, running /mcp inside the CLI will let you check your status or re-authenticate on the fly.

The Architecture: How it Actually Works

Vista detallada de un rack de servidores en un centro de datos, representando la infraestructura de WorkOS.

Under the hood, this integration relies on a remote MCP server. This server acts as the bridge between Claude’s reasoning capabilities and the WorkOS API. One of the coolest parts is that it doesn’t just guess; it uses a discover-then-execute design. Instead of overwhelming the AI with hundreds of different tools, it provides a few core functions: whoami, list_operations, query, and mutate. This allows the agent to figure out the best path to solve your specific problem in real-time.

If you’re a developer building your own MCP server and want to use AuthKit for security, the process involves a few specific steps. You’ll need to enable Client ID Metadata Document (CIMD) support and register your server’s URL as a resource indicator. Your server then verifies JWT tokens from AuthKit and exposes a protected resource metadata endpoint, ensuring that Claude Code can discover the authorization server automatically without any manual config on the user’s end.

Mastering the Capabilities

Cables de red conectados a un panel en un centro de datos, simbolizando la conexión y el puente MCP entre Claude y WorkOS.

Once you’re connected, the possibilities are huge. Imagine a customer tells you they can’t sign in. Instead of digging through logs, you can just ask, “Why is organization_123 having SSO trouble?” Claude will investigate the connection, find that the SAML certificate is there but the ACS URL is missing, and can even generate an admin portal link for the customer to fix it. It’s a massive win for support efficiency.

  • Configuration Sweeps: You can ask Claude to find every single organization that currently has a draft SSO connection or flag any directories that haven’t synced in the last 24 hours.
  • Sandbox Testing: You can spin up a test organization and user in your sandbox and generate an invite link without ever opening the dashboard.
  • Visual Branding: You can actually upload a screenshot of your marketing site and tell Claude to make your AuthKit sign-in page match the aesthetic.
  • Log Management: Setting up a Datadog audit log stream for production is now a matter of a single prompt.

Safety, Permissions, and Guardrails

Primer plano de una pantalla de ordenador mostrando una interfaz de chat de IA, representando la interacción conversacional con Claude.

A common worry is whether an AI agent can accidentally delete your entire production environment. The short answer is: it can’t do anything you can’t. The agent inherits your specific dashboard role and permissions. If you don’t have admin rights in the WorkOS dashboard, the agent won’t have them either. It’s not a separate permission model; it’s a mirror of your existing access.

Furthermore, there are built-in safety triggers for dangerous actions. Irreversible moves, such as deleting a directory or an organization, require a two-step confirmation. The agent will first describe exactly what will be destroyed and then wait for your explicit “yes” before proceeding. To protect sensitive data, API keys and client secrets are stripped from the responses before they reach the AI, meaning the agent can set a secret you provide, but it can’t read existing ones back to you.

Troubleshooting Common Hiccups

If things aren’t working as expected, it’s usually down to a few specific settings. If the agent can read data but can’t make changes, check if Allow write access is disabled in your team authentication settings. Similarly, if you can’t see production data, it’s because the agent defaults to the sandbox environment; you have to explicitly tell it to switch to production, provided that Allow production access is toggled on.

For Codex users, a frequent issue is the MCP startup interrupted error. This typically means the server is configured but not yet authenticated. Running codex mcp login workos usually clears this right up. Just remember that Codex reads its config at startup, so if you edit your config.toml file, you’ll need to restart the session for those changes to take effect.

Integrating your WorkOS workspace with Claude transforms administrative overhead into a conversational flow, leveraging MCP to securely bridge the gap between AI and infrastructure. By mirroring user permissions and enforcing strict confirmation for destructive actions, this setup allows developers to manage SSO, directory syncs, and branding through natural language, effectively treating documentation and dashboards as a live, executable runtime.