Secure MCP Servers in Minutes with XMCP and WorkOS AuthKit
Blog post from WorkOS
xmcp, a TypeScript framework for creating and deploying MCP servers, now offers a seamless integration with the WorkOS AuthKit, enabling developers to incorporate robust, enterprise-level authentication swiftly. This integration is crucial for securing MCP servers, which provide AI clients with database access, API integrations, and more, by ensuring that only authorized users can interact with the server's resources. The @xmcp-dev/workos plugin facilitates the addition of comprehensive authentication features such as user management, social login, SSO, and audit logs, enhancing security and scalability for businesses. Developers can access authenticated user details and organizational data directly within MCP tools using functions like getSession() and getUser(), and leverage the full WorkOS SDK for advanced capabilities, including OAuth 2.0 with dynamic client registration and organization management. The setup process involves installing the plugin, configuring WorkOS settings, and integrating middleware, enabling MCP servers to require authentication and access detailed user contexts, thereby supporting organization-specific tools and audit logging functionalities.