You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can secure <GlossaryTooltipterm="MCP server">Model Context Protocol (MCP) servers</GlossaryTooltip> by using Cloudflare Access as an OAuth Single Sign-On (SSO) provider.
12
12
@@ -77,6 +77,9 @@ The Worker will be deployed to your `*.workers.dev` subdomain at `mcp-server-cf-
77
77
78
78
## 2. Create an Access for SaaS app
79
79
80
+
<TabssyncKey="dashPlusAPI">
81
+
<TabItemlabel="Dashboard">
82
+
80
83
1. In [Zero Trust](https://one.dash.cloudflare.com), go to **Access** > **Applications**.
81
84
2. Select **SaaS**.
82
85
3. In **Application**, enter a custom name (for example, `MCP server`) and select the textbox that appears below.
@@ -97,6 +100,43 @@ The Worker will be deployed to your `*.workers.dev` subdomain at `mcp-server-cf-
97
100
9. Configure [Access policies](/cloudflare-one/policies/access/) to define the users who can access the MCP server.
98
101
10. Save the application.
99
102
103
+
</TabItem>
104
+
<TabItemlabel="API">
105
+
106
+
1. Make a `POST` request to the [Access applications](/api/resources/zero_trust/subresources/access/subresources/applications/methods/create/) endpoint:
2. Copy the `client_id` and `client_secret` returned in the response.
135
+
3. To determine the OAuth endpoint URLs for the SaaS application, refer to the [generic OIDC documentation](/cloudflare-one/applications/configure-apps/saas-apps/generic-oidc-saas/#2-add-your-application-to-access).
136
+
137
+
</TabItem>
138
+
</Tabs>
139
+
100
140
## 3. Configure your MCP server
101
141
102
142
Your MCP server needs to perform an OAuth 2.0 authorization flow to get an `access_token` from the SaaS app created in [Step 1](#1-create-an-access-for-saas-app). When setting up the OAuth client on your MCP server, you will need to paste in the OAuth endpoints and credentials from the SaaS app.
0 commit comments