Integrations
Handles user authentication through Auth0, enabling secure access to protected APIs by requesting user credentials, managing OAuth flows, and handling tokens.
Enables deployment of the MCP server to Cloudflare Workers, utilizing KV storage for OAuth tokens and providing environment configurations for secure operation.
모델 컨텍스트 프로토콜(MCP) 서버
이는 사용자가 먼저 인증을 해야 하는 MCP 서버입니다. 이후 MCP 서버는 사용자를 대신하여 보호된 API를 호출할 수 있습니다.
구성
할일 API
MCP 서버를 사용하려면 여기에 설명된 대로 Todos API를 배포해야 합니다.
Auth0 구성
Auth0 대시보드의 애플리케이션 섹션에서 새 애플리케이션을 만듭니다(유형: "일반 웹 애플리케이션").
애플리케이션을 만든 후 로컬에서 개발할 때 다음 URL을 콜백 URL로 구성하세요.
지엑스피1
KV 네임스페이스 설정
- KV 네임스페이스를 생성합니다:
wrangler kv:namespace create "OAUTH_KV"
- KV ID로 Wrangler 파일을 업데이트합니다.
환경 변수
이 MCP 서버에는 몇 가지 환경 변수를 구성해야 합니다.
환경 | 설명 |
---|---|
AUTH0_DOMAIN | Auth0 테넌트의 도메인(예: acme.auth0.com ) |
AUTH0_CLIENT_ID | 생성한 Auth0 애플리케이션의 클라이언트 ID |
AUTH0_CLIENT_SECRET | 생성한 Auth0 애플리케이션의 클라이언트 비밀번호 |
AUTH0_AUDIENCE | Auth0 대시보드에 등록한 API의 고유 식별자(예: urn:todos-api ) |
AUTH0_SCOPE | MCP 서버에서 요청하는 범위입니다. 여기서는 기본 프로필 정보( openid email profile ), 새로고침 토큰 기능( offline_access ), API 액세스( read:todos )를 요청합니다. |
NODE_ENV | 환경 설정 - 로컬 개발을 위한 development 사용 |
API_BASE_URL | Todos API가 실행되는 기본 URL |
개발
프로젝트의 루트에 다음과 같은 구조의 .dev.vars
파일을 만듭니다.
MCP 서버 테스트
MCP 서버를 시작하려면 다음 명령을 사용하면 됩니다.
MCP Inspector를 사용하면 MCP 서버에 연결하여 사용 가능한 도구를 나열하고 호출할 수 있습니다. 전송 유형을 sse
로, URL을 http://localhost:8788/sse
로 설정해야 합니다.
Cloudflare에 MCP 서버 배포
MCP 서버를 Cloudflare에 배포하려면 먼저 다음 비밀을 설정해야 합니다.
비밀이 설정되면 다음 명령을 사용하여 API를 배포할 수 있습니다.
Auth0 대시보드에서 배포된 MCP 서버에 대한 새 콜백 URL을 추가해야 합니다. 예:
이제 Workers AI LLM Playground를 사용하여 테스트할 수 있습니다. https://playground.ai.cloudflare.com/ 으로 이동하여 다음 URL 패턴을 사용하여 왼쪽 하단의 MCP 서버에 연결하세요.
그러면 로그인할 수 있는 팝업이 열리고, 로그인 후 모든 도구를 사용할 수 있습니다.
문제 해결
MCP 서버를 설정하거나 사용하는 동안 문제가 발생하면 다음과 같은 문제 해결 단계를 따르세요.
작업자 로그 확인
대시보드에서 Cloudflare Workers 로그를 방문하세요.
Auth0 대시보드 로그
- Auth0 대시보드의 로그 섹션으로 이동합니다.
- 인증 시도 및 실패 검토
일반적인 문제
- 인증이 실패하면 Auth0 구성 및 비밀번호를 확인하세요.
- 연결 문제가 있는 경우 Worker가 배포되었고 도메인이 올바른지 확인하세요.
- Auth0에서 모든 콜백 URL이 올바르게 구성되었는지 확인하세요.
- API_BASE_URL이 배포된 API 엔드포인트와 일치하는지 확인하세요.
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.
인증된 사용자를 대신하여 보안 API 액세스를 활성화하기 전에 Auth0를 통해 사용자 인증을 요구하는 모델 컨텍스트 프로토콜 서버입니다.
Related MCP Servers
- AsecurityFlicenseAqualityA Model Context Protocol server implementation for interacting with Salesforce through its REST API.Last updated -410TypeScript
- -securityAlicense-qualityA Model Context Protocol server that enables seamless execution of commands, Python code, web content fetching, and reusable task management with secure credentials handling.Last updated -2PythonMIT License
- -securityAlicense-qualityA Model Context Protocol server designed for testing backend APIs for security vulnerabilities like authentication bypass, injection attacks, and data leakage.Last updated -1TypeScriptMIT License
- AsecurityFlicenseAqualityA Model Context Protocol server implementation that provides endpoints for wallet-based authentication, cluster management, and name registration services.Last updated -TypeScript