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/capabilities/mcp-server.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
@@ -7,7 +7,7 @@ sidebar:
7
7
hideIndex: true
8
8
description: Build and deploy an MCP server on Cloudflare Workers
9
9
---
10
-
[Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction) is an open standard that allows AI assistants & LLMs to interact with services directly. If you want users to access your service or product straight from their AI assistant, you can enable this by spinning up an MCP server for your application.
10
+
[Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction) is an open standard that allows AI assistants & LLMs to interact with services directly. If you want users to access your service or product straight from their AI assistant, you can enable this by spinning up an MCP server for your application.
11
11
12
12
## Building an MCP Server on Cloudflare Workers
13
13
@@ -19,14 +19,14 @@ Once deployed, your Worker becomes an MCP server that AI assistants (as long as
19
19
-**Minimal setup & built-in boilerplate:** The Worker automatically handles API routing, server management, and MCP protocol compliance. The [workers-mcp](https://www.npmjs.com/package/workers-mcp) package bootstraps your MCP server, allowing you to focus on your service logic.
20
20
-**Automatic documentation:** Public methods annotated with JSDoc are automatically documented and exposed as MCP tools. This means AI assistants can quickly understand how to interact with your service, making tool discovery and integration much easier.
21
21
-**Scalability & performance:** Deploy your MCP server on Cloudflare's global edge network so that users can make fast, performant requests from their LLMs. Cloudflare will handle traffic spikes and high load, ensuring your service remains available and responsive.
22
-
-**Expand MCP server capabilities:** Easily connect to Workers AI, D1, Durable Objects, and other Cloudflare services to add more functionality to your MCP Server.
22
+
-**Expand MCP server capabilities:** Easily connect to Workers AI, D1, Durable Objects, and other Cloudflare services to add more functionality to your MCP Server.
23
23
24
24
## Get Started
25
25
26
26
Follow these steps to create and deploy your own MCP server on Cloudflare Workers.
27
27
28
28
29
-
### 1. Create a new Worker
29
+
### 1. Create a new Worker
30
30
31
31
If you haven't already, install [Wrangler](https://developers.cloudflare.com/workers/wrangler/) and log in:
32
32
@@ -95,7 +95,7 @@ This converts your Cloudflare Worker into an MCP server, enabling interactions w
95
95
-**ProxyToSelf:** MCP servers must follow a specific request/response format. ProxyToSelf ensures that incoming requests are properly routed to the correct MCP tools. Without this, you would need to manually parse requests and validate responses.
96
96
97
97
98
-
**Note:** Every public method that is annotated with JSDoc becomes an MCP tool that is discoverable by AI assistants.
98
+
**Note:** Every public method that is annotated with JSDoc becomes an MCP tool that is discoverable by AI assistants.
99
99
100
100
101
101
### 5. Deploy the MCP Server
@@ -104,10 +104,10 @@ Update your [Wrangler configuration file](/workers/wrangler/configuration/) with
104
104
wrangler deploy
105
105
```
106
106
107
-
Your MCP server is now deployed globally and all your public class methods are exposed as MCP tools that AI assistants can now interact with.
107
+
Your MCP server is now deployed globally and all your public class methods are exposed as MCP tools that AI assistants can now interact with.
108
108
109
109
### Expanding the MCP Server Capabilities
110
-
Use existing Cloudflare products to expand the functionality of your MCP server. You can:
110
+
Use existing Cloudflare products to expand the functionality of your MCP server. You can:
111
111
- Send emails using [Email Routing](/email-routing/)
112
112
- Capture and share website previews using [Browser Rendering](/browser-rendering/)
113
113
- Store and manage sessions, user data, or other persistent information with [Durable Objects](/durable-objects/)
Copy file name to clipboardExpand all lines: src/content/docs/agents/index.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
@@ -24,7 +24,7 @@ import {
24
24
25
25
Build AI-powered agents that can autonomously perform tasks, persist state, browse the web, and communicate back to users in real-time over any channel.
26
26
27
-
-**Serverless inference that scales up _and_ down**: run AI directly on Cloudflre, without worrying about pre-provisioning VMs at peak, and worrying about utilization. Call the latest open-source models on [Workers AI](/workers-ai/), and pay just for what you use.
27
+
-**Serverless inference that scales up _and_ down**: run AI directly on Cloudflre, without worrying about pre-provisioning VMs at peak, and worrying about utilization. Call the latest open-source models on [Workers AI](/workers-ai/), and pay just for what you use.
28
28
-**Non I/O bound pricing:** don't pay for long-running processes when your code is not executing. Cloudflare Workers is designed to scale down and [only charge you for CPU time](https://blog.cloudflare.com/workers-pricing-scale-to-zero/), as opposed to wall-clock time.
29
29
-**Designed for durable execution:**[Durable Objects](/durable-objects/) and [Workflows](/workflows) are built for a programming model that enables guaranteed execution for async tasks like long-running deep thinking LLM calls, human-in-the-loop, or unreliable API calls.
30
30
-**Scalable, and reliable, without compromising on performance:** by running on Cloudflare's network, agents can execute tasks close to the user without introducing latency for real-time experiences.
0 commit comments