From 9bb8a173aa2649c6ae8b1923bb535a5454046ab6 Mon Sep 17 00:00:00 2001 From: Brendan Irvine-Broque Date: Sun, 23 Mar 2025 10:55:44 -0700 Subject: [PATCH] Reference McpAgent rather than DurableMcp --- src/content/docs/agents/model-context-protocol/tools.mdx | 4 ++-- src/content/docs/agents/model-context-protocol/transport.mdx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/content/docs/agents/model-context-protocol/tools.mdx b/src/content/docs/agents/model-context-protocol/tools.mdx index d1e6aaa1483ee6..5abe732eb9b76b 100644 --- a/src/content/docs/agents/model-context-protocol/tools.mdx +++ b/src/content/docs/agents/model-context-protocol/tools.mdx @@ -16,9 +16,9 @@ For example, the following code from [this example MCP server](https://github.co ```ts title="src/index.ts" import { McpServer } from "@modelcontextprotocol/sdk/server/mcp"; -import { DurableMCP } from "@cloudflare/model-context-protocol"; +import { McpAgent } from "agents/mcp"; -export class MyMCP extends DurableMCP { +export class MyMCP extends McpAgent { server = new McpServer({ name: "Demo", version: "1.0.0" }); async init() { this.server.tool( diff --git a/src/content/docs/agents/model-context-protocol/transport.mdx b/src/content/docs/agents/model-context-protocol/transport.mdx index 06f4291848dc2e..0da30b42878a5f 100644 --- a/src/content/docs/agents/model-context-protocol/transport.mdx +++ b/src/content/docs/agents/model-context-protocol/transport.mdx @@ -12,7 +12,7 @@ The Model Context Protocol (MCP) specification defines [two standard transport m 1. **stdio, communication over standard in and standard out** — designed for local MCP connections 2. **HTTP with Server-Sent Events (SSE)** — designed for remote MCP connections -MCP Servers deployed to Cloudflare 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. +MCP Servers deployed to Cloudflare 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/) and the [Agents SDK](/agents). Transport is configured and handled automatically by the [`McpAgent` class](https://github.com/cloudflare/agents/blob/2f82f51784f4e27292249747b5fbeeef94305552/packages/agents/src/mcp.ts). You don't need to configure anything — it just works. :::note Even if the MCP client you are using only supports local MCP connections, you can still connect it to a remote MCP server.