Skip to content

Commit bd9711d

Browse files
authored
Update mcp-server.mdx
Added step 3 - configuring the worker to support MCP
1 parent b5b5e3d commit bd9711d

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

src/content/docs/agents/capabilities/mcp-server.mdx

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,19 @@ npm install workers-mcp
5050

5151
This package provides the tools needed to run your Worker as an MCP server.
5252

53-
### 3. Set up the MCP Server on Workers
53+
### 3. Configure your Worker to support MCP
54+
Run the following setup command:
55+
56+
```bash
57+
npx workers-mcp setup
58+
```
59+
60+
This guided installation process takes a brand new or existing Workers project and adds the required tooling to become an MCP server:
61+
- Automatic documentation generation
62+
- Shared-secret security using Wrangler Secrets
63+
- Installs a local proxy so you can access it from your MCP desktop clients (like Claude Desktop)
64+
65+
### 4. Set up the MCP Server
5466
Replace the contents of your src/index.ts with the following boilerplate code:
5567

5668
```ts
@@ -86,7 +98,7 @@ This converts your Cloudflare Worker into an MCP server, enabling interactions w
8698
**Note:** Every public method that is annotated with JSDoc becomes an MCP tool that is discoverable by AI assistants.
8799

88100

89-
### 4. Deploy the MCP Server
101+
### 5. Deploy the MCP Server
90102
Update your wrangler.toml with the appropriate configuration then deploy your Worker:
91103
```bash
92104
wrangler deploy

0 commit comments

Comments
 (0)