> ## Documentation Index
> Fetch the complete documentation index at: https://auth0.com/ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Secure MCP Servers with Auth0 and Cloudflare

> Learn how to use Auth0 and Cloudflare to secure MCP servers.

Auth0 has collaborated with Cloudflare to help developers secure remote MCP servers powered by [Cloudflare Workers](https://developers.cloudflare.com/workers/). With the pace of MCP adoption rapidly increasing, Cloudflare has [added features to its platform](https://blog.cloudflare.com/remote-model-context-protocol-servers-mcp/) that handle the hard parts of building remote MCP servers, like `workers-oauth-provider`, an OAuth Provider that makes authorization easy. By securing your MCP server with Auth0, AI applications can now interact with an external API by connecting through the remote MCP server and make API calls on behalf of an authenticated user.

## Sample App for Securing an MCP Server and API

Learn how to set up and use an AI application to connect with a sample Todos API using an MCP server secured by Auth0. The server and API are Cloudflare Workers projects and will use Auth0 to request and receive access and refresh tokens.

<Frame caption="MCP Authorization flow with Auth0">
  <img className="hidden dark:block" src="https://mintlify.s3.us-west-1.amazonaws.com/auth0-genai/img/mcp/mcp_auth_flow_dark.png" alt="Auth0 Authentication Flow" />

  <img className="block dark:hidden" src="https://mintlify.s3.us-west-1.amazonaws.com/auth0-genai/img/mcp/mcp_auth_flow_light.png" alt="Auth0 Authentication Flow" />
</Frame>

<Card href="https://auth0.com/blog/secure-and-deploy-remote-mcp-servers-with-auth0-and-cloudflare/" title="See all the steps and the full details in this blog post" icon="link" iconType="solid" horizontal />
