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
Copy file name to clipboardExpand all lines: src/content/docs/agents/guides/build-mcp-server.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,7 +37,7 @@ Below we will run you through an example of building an MCP server that fetches
37
37
Follow these steps to create and deploy your own MCP server on Cloudflare Workers.
38
38
39
39
:::note
40
-
Looking to deploy a MCP server that supports _remote_ connections over the Internet, with authentication and authorization? Check out our [guide](/docs/agents/model-context-protocol/getting-started) for building and deploying remote MCP servers to Cloudflare.
40
+
Looking to deploy a MCP server that supports _remote_ connections over the Internet, with authentication and authorization? Check out our [guide](/agents/model-context-protocol/getting-started) for building and deploying remote MCP servers to Cloudflare.
Copy file name to clipboardExpand all lines: src/content/docs/agents/model-context-protocol/authorization.mdx
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,12 +16,12 @@ When building a [Model Context Protocol (MCP)](https://modelcontextprotocol.io)
16
16
17
17
The Model Context Protocol uses [a subset of OAuth 2.1 for authorization](https://spec.modelcontextprotocol.io/specification/draft/basic/authorization/). OAuth allows your users to grant limited access to resources, without them having to share API keys or other credentials.
18
18
19
-
Cloudflare provides an [OAuth Provider Library](https://github.com/cloudflare/ai/demos/remote-mcp-server/lib/workers-oauth-provider) that implements the provider side of the OAuth 2.1 protocol, allowing you to easily add authorization to your MCP server.
19
+
Cloudflare provides an [OAuth Provider Library](https://github.com/cloudflare/workers-mcp/tree/next/vendor/workers-oauth-provider) that implements the provider side of the OAuth 2.1 protocol, allowing you to easily add authorization to your MCP server.
20
20
21
21
You can use the OAuth Provider Library in three ways:
22
22
23
23
1.**Your Worker handles authorization itself.** Your MCP server, running on Cloudflare, handles the complete OAuth flow. ([Example](/agents/model-context-protocol/getting-started/))
24
-
2.**Integrate directly with a third-party OAuth provider**, such as GitHub or Google. ([Example](/agents/model-context-protocol/examples/github/))
24
+
2.**Integrate directly with a third-party OAuth provider**, such as GitHub or Google. ([Example](/cloudflare/ai/demos/remote-mcp-server-github/))
25
25
3.**Integrate with your own OAuth provider**, including authorization-as-a-service providers you might already rely on, such as Stytch and Auth0.
26
26
27
27
The following sections describe each of these options and link to runnable code examples for each.
@@ -30,9 +30,9 @@ The following sections describe each of these options and link to runnable code
30
30
31
31
### (1) Your MCP Server handles authorization and authentication itself
32
32
33
-
Your MCP Server, using the [OAuth Provider Library](https://github.com/cloudflare/ai/demos/remote-mcp-server/lib/workers-oauth-provider), can handle the complete OAuth authorization flow, without any third-party involvement.
33
+
Your MCP Server, using the [OAuth Provider Library](https://github.com/cloudflare/workers-mcp/tree/next/vendor/workers-oauth-provider), can handle the complete OAuth authorization flow, without any third-party involvement.
34
34
35
-
The [Workers OAuth Provider Library](https://github.com/cloudflare/ai/demos/remote-mcp-server/lib/workers-oauth-provider) is a Cloudflare Worker that implements a [`fetch()` handler](/workers/runtime-apis/handlers/fetch/), and handles incoming requests to your MCP server.
35
+
The [Workers OAuth Provider Library](https://github.com/cloudflare/workers-mcp/tree/next/vendor/workers-oauth-provider) is a Cloudflare Worker that implements a [`fetch()` handler](/workers/runtime-apis/handlers/fetch/), and handles incoming requests to your MCP server.
36
36
37
37
You provide your own handlers for your MCP Server's API, and autentication and authorization logic, and URI paths for the OAuth endpoints, as shown below:
38
38
@@ -77,7 +77,7 @@ Remember — [authentication is different from authorization](https://www.cloud
77
77
78
78
### (2) Third-party OAuth Provider
79
79
80
-
The [OAuth Provider Library](https://github.com/cloudflare/ai/demos/remote-mcp-server/lib/workers-oauth-provider) can be configured to use a third-party OAuth provider, such as GitHub or Google. You can see a complete example of this in the [GitHub example](/agents/guides/remote-mcp-server-github).
80
+
The [OAuth Provider Library](https://github.com/cloudflare/workers-mcp/tree/next/vendor/workers-oauth-provider) can be configured to use a third-party OAuth provider, such as GitHub or Google. You can see a complete example of this in the [GitHub example](/agents/guides/remote-mcp-server-github).
81
81
82
82
When you use a third-party OAuth provider, you must provide a handler to the `OAuthProvider` that implements the OAuth flow for the third-party provider.
83
83
@@ -120,13 +120,13 @@ sequenceDiagram
120
120
M->>C: MCP access token
121
121
```
122
122
123
-
Read the docs for the [Workers oAuth Provider Library](https://github.com/cloudflare/ai/demos/remote-mcp-server/lib/workers-oauth-provider) for more details.
123
+
Read the docs for the [Workers oAuth Provider Library](https://github.com/cloudflare/workers-mcp/tree/next/vendor/workers-oauth-provider) for more details.
124
124
125
125
### (3) Bring your own OAuth Provider
126
126
127
127
If your application already implements an Oauth Provider itself, or you use Stytch, Auth0, or authorization-as-a-service provider, you can use this in the same way that you would use a third-party OAuth provider, described above in (2).
128
128
129
129
## Next steps
130
130
131
-
-[Learn how to use the OAuth Provider SDK](/agents/model-context-protocol/authorization/oauth-provider-api-reference/)
132
-
- Learn how to use a third-party OAuth provider, using the [GitHub](/agents/model-context-protocol/examples/github/) and [Slack](/agents/model-context-protocol/examples/slack/) examples.
131
+
-[Learn how to use the Workers OAuth Provider Library](https://github.com/cloudflare/workers-mcp/tree/next/vendor/workers-oauth-provider)
132
+
- Learn how to use a third-party OAuth provider, using the [GitHub](/agents/guides/remote-mcp-server-github/) and [Slack](/agents/guides/remote-mcp-server-slack/) examples.
0 commit comments