모델 컨텍스트 프로토콜(MCP) 서버 + WorkOS AuthKit
이는 원격 클라이언트가 WorkOS AuthKit을 사용하여 연결하고 인증할 수 있도록 하는 MCP(Model Context Protocol) 서버의 예입니다.
AuthKit은 사용자 및 조직 권한에 따라 도구 액세스를 제어할 수 있는 조직 중심 인증 모델을 포함한 사용자 관리 기능을 지원합니다.
시작하기
먼저 WorkOS 대시보드 에 로그인하여 WorkOS 계정을 만드세요.
다음으로, MCP 서버의 콜백 URL을 '리디렉션 ' -> '로그인 콜백' 아래에 '리디렉션 URI'로 추가합니다. 로컬에서 테스트하는 경우 http://localhost:8788/callback
되고, 배포된 경우 배포된 작업자의 도메인과 동일한 /callback
경로가 사용됩니다.
다음으로, WORKOS_CLIENT_ID
및 WORKOS_CLIENT_SECRET
환경 변수를 설정해야 합니다. 이 변수들은 WorkOS 대시보드의 API 키 에서 확인할 수 있습니다.
Cloudflare 대시보드나 wrangler
CLI를 사용하여 설정할 수 있습니다.
지엑스피1
참고: WORKOS_CLIENT_ID
는 기술적으로 비밀이 아니므로 wrangler.jsonc
설정 파일을 통해 설정할 수도 있습니다. 하지만 WORKOS_CLIENT_SECRET
공개되지 않으므로 다른 곳에 안전하게 설정해야 합니다.
이제 끝났습니다! 아래 예시 플레이그라운드를 사용하여 원격 MCP 서버를 테스트해 보세요.
MCP 인증 테스트
Cloudflare Workers AI 플레이그라운드를 방문하여 작업자의 URL을 입력하세요.
연결을 클릭하면 WorkOS AuthKit 도메인으로 리디렉션되어 로그인하고 WorkOS AuthKit 사용자로 인증된 상태로 플레이그라운드로 돌아갈 수 있습니다.
데모 코드에서 generateImage
도구는 image_generation
권한 뒤에 숨겨져 있습니다. AuthKit의 권한에 대한 자세한 내용은 여기를 참조 하세요. image_generation
슬러그를 사용하여 사용자에게 권한을 할당하여 플레이그라운드에서 추가 도구를 어떻게 사용할 수 있는지 확인해 보세요.
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
WorkOS AuthKit을 사용하여 원격 클라이언트가 연결하고 인증할 수 있도록 하는 MCP 서버의 예로, 도구에 대한 권한 기반 액세스 제어를 통해 조직 중심 인증을 제공합니다.
Related MCP Servers
- -securityAlicense-qualityA lightweight MCP server allowing agents to interact with the WorkOS API for streamlined WorkOS operations through natural language commands.Last updated -5MIT License
- -securityAlicense-qualityA lightweight MCP server that enables Cursor Agents to interact with the WorkOS API, providing access to WorkOS functionality directly from within the editor.Last updated -14MIT License
- AsecurityFlicenseAqualityA server based on the MCP framework that provides remote server management capabilities through SSH, supporting features like connection pooling, file transfers, and remote command execution.Last updated -7
- -securityFlicense-qualityA remote MCP server that can be deployed on Cloudflare Workers without requiring authentication, allowing users to add and use custom tools through the Model Context Protocol.Last updated -