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/model-context-protocol/authorization.mdx
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,8 +20,8 @@ Cloudflare provides an [OAuth Provider Library](https://github.com/cloudflare/ai
20
20
21
21
You can use the OAuth Provider Library in three ways:
22
22
23
-
1.**Your Worker handles authorization itself.** Your MCP server, running on Cloudflare, handles the complete OAuth flow. ([Example](/agents/model-context-protocol/mcp-server/getting-started/))
24
-
2.**Integrate directly with a third-party OAuth provider**, such as GitHub or Google. ([Example](/agents/model-context-protocol/mcp-server/examples/github/))
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/))
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.
@@ -49,7 +49,7 @@ export default new OAuthProvider({
49
49
});
50
50
```
51
51
52
-
Refer to the [getting started example](/agents/model-context-protocol/mcp-server/getting-started/) for a complete example of the `OAuthProvider` in use, with a mock authentication flow.
52
+
Refer to the [getting started example](/agents/model-context-protocol/getting-started/) for a complete example of the `OAuthProvider` in use, with a mock authentication flow.
53
53
54
54
The authorization flow in this case works like this:
55
55
@@ -73,7 +73,7 @@ sequenceDiagram
73
73
Note over C,M: Begin standard MCP message exchange
74
74
```
75
75
76
-
Remember — [authentication is different from authorization](https://www.cloudflare.com/learning/access-management/authn-vs-authz/). Your MCP Server can handle authorization itself, while still relying on an external authentication service to first authenticate users. The [example](/agents/model-context-protocol/mcp-server/getting-started) in getting started provides a mock authentdcation flow. You will need to implement your own authentication handler — either handling authentication yourself, or using an external authentication services.
76
+
Remember — [authentication is different from authorization](https://www.cloudflare.com/learning/access-management/authn-vs-authz/). Your MCP Server can handle authorization itself, while still relying on an external authentication service to first authenticate users. The [example](/agents/model-context-protocol/getting-started) in getting started provides a mock authentdcation flow. You will need to implement your own authentication handler — either handling authentication yourself, or using an external authentication services.
77
77
78
78
### (2) Third-party OAuth Provider
79
79
@@ -128,5 +128,5 @@ If your application already implements an Oauth Provider itself, or you use Styt
128
128
129
129
## Next steps
130
130
131
-
-[Learn how to use the OAuth Provider SDK](/agents/model-context-protocol/mcp-server/authorization/oauth-provider-api-reference/)
132
-
- Learn how to use a third-party OAuth provider, using the [GitHub](/agents/model-context-protocol/mcp-server/examples/github/) and [Slack](/agents/model-context-protocol/mcp-server/examples/slack/) examples.
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.
Copy file name to clipboardExpand all lines: src/content/docs/agents/model-context-protocol/getting-started.mdx
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,13 +21,13 @@ This guide will teach you how to build and deploy your first remote MCP server t
21
21
22
22
-**MCP Hosts**: AI assistants (like [Claude](http://claude.ai) or [Cursor](http://cursor.com)), AI agents, or applications that need to access external capabilities.
23
23
-**MCP Clients**: Clients embedded within the MCP hosts that connect to MCP servers and invoke tools. Each MCP client instance has a single connection to an MCP server.
24
-
-**MCP Servers**: Applications that expose [tools](/agents/model-context-protocol/mcp-server/tools/), [prompts](https://modelcontextprotocol.io/docs/concepts/prompts), and [resources](https://modelcontextprotocol.io/docs/concepts/resources) that MCP clients can use.
24
+
-**MCP Servers**: Applications that expose [tools](/agents/model-context-protocol/tools/), [prompts](https://modelcontextprotocol.io/docs/concepts/prompts), and [resources](https://modelcontextprotocol.io/docs/concepts/resources) that MCP clients can use.
25
25
26
26
#### Remote vs. local MCP connections
27
27
28
28
The MCP standard supports two modes of operation:
29
29
30
-
-**Remote MCP connections**: MCP clients connect to MCP servers over the Internet, establishing a [long-lived connection using HTTP and Server-Sent Events (SSE)](/agents/model-context-protocol/mcp-server/transport/), and authorizing the MCP client access to resources on the user's account using [OAuth](/agents/model-context-protocol/mcp-server/authorization/).
30
+
-**Remote MCP connections**: MCP clients connect to MCP servers over the Internet, establishing a [long-lived connection using HTTP and Server-Sent Events (SSE)](/agents/model-context-protocol/transport/), and authorizing the MCP client access to resources on the user's account using [OAuth](/agents/model-context-protocol/authorization/).
31
31
-**Local MCP connections**: MCP clients connect to MCP servers on the same machine, using [stdio](https://spec.modelcontextprotocol.io/specification/draft/basic/transports/#stdio) as a local transport method.
32
32
33
33
## Deploy your first MCP server
@@ -38,7 +38,7 @@ The link below will guide you through everything you need to do to deploy this [
38
38
39
39
[](https://dash.cloudflare.com/?to=/:account/workers-and-pages/create/deploy-to-workers&repository=https://github.com/cloudflare/ai/demos/remote-mcp-server)
40
40
41
-
At the end of this process, you will have a new git repository on your GitHub or GitLab account for your MCP server, configured to automatically deploy Cloudflare each time you push a change or merge a pull request to the main branch of the repository. You can then clone this repository, [develop locally](/agents/model-context-protocol/mcp-server/getting-started/#local-development), and start writing code and building.
41
+
At the end of this process, you will have a new git repository on your GitHub or GitLab account for your MCP server, configured to automatically deploy Cloudflare each time you push a change or merge a pull request to the main branch of the repository. You can then clone this repository, [develop locally](/agents/model-context-protocol/getting-started/#local-development), and start writing code and building.
42
42
43
43
Alternatively, you can use the command line as shown below to create a new MCP Server on your local machine.
44
44
@@ -80,7 +80,7 @@ In the inspector, enter the URL of your MCP server, `http://localhost:8787/sse`,
80
80
81
81

82
82
83
-
You will be redirected to an example OAuth login page. Enter any username and password and click "Log in and approve" to continue. (you can add your own authentication and/or authorization provider to replace this. Refer to the [authorization](/agents/model-context-protocol/mcp-server/authorization/) section for details on how to do this.)
83
+
You will be redirected to an example OAuth login page. Enter any username and password and click "Log in and approve" to continue. (you can add your own authentication and/or authorization provider to replace this. Refer to the [authorization](/agents/model-context-protocol/authorization/) section for details on how to do this.)
Copy file name to clipboardExpand all lines: src/content/docs/agents/model-context-protocol/tools.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
@@ -7,7 +7,7 @@ sidebar:
7
7
8
8
import { Render } from"~/components";
9
9
10
-
Model Context Protocol (MCP) tools are functions that a [MCP Server](/agents/model-context-protocol/mcp-server) provides and MCP clients can call.
10
+
Model Context Protocol (MCP) tools are functions that a [MCP Server](/agents/model-context-protocol) provides and MCP clients can call.
11
11
12
12
When you build MCP Servers with the `@cloudflare/model-context-protocol` package, you can define tools the [same way as shown in the `@modelcontextprotocol/typescript-sdk` package's examples](https://github.com/modelcontextprotocol/typescript-sdk?tab=readme-ov-file#tools).
Copy file name to clipboardExpand all lines: src/content/docs/agents/model-context-protocol/transport.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
@@ -12,7 +12,7 @@ The Model Context Protocol (MCP) specification defines [two standard transport m
12
12
1.**stdio, communication over standard in and standard out** — designed for local MCP connections
13
13
2.**HTTP with Server-Sent Events (SSE)** — designed for remote MCP connections
14
14
15
-
The [remote MCP examples](/agents/model-context-protocol/mcp-server/getting-started/) support remote MCP connections, using HTTP with Server-Sent Events (SSE) as transport. SSE requires a persistent HTTP connection, which is supported by Cloudflare [Durable Objects](/durable-objects/). Transport is configured and handled automatically. You don't need to configure anything — it just works.
15
+
The [remote MCP examples](/agents/model-context-protocol/getting-started/) support remote MCP connections, using HTTP with Server-Sent Events (SSE) as transport. SSE requires a persistent HTTP connection, which is supported by Cloudflare [Durable Objects](/durable-objects/). Transport is configured and handled automatically. You don't need to configure anything — it just works.
16
16
17
17
:::note
18
18
If you are looking to deploy a MCP server that supports _local_ MCP connections, you should follow the [guide](/agents/guides/build-mcp-server/) for building local MCP servers using Cloudflare Workers.
0 commit comments