Skip to content

Commit 09ca587

Browse files
authored
Title capitalisation nit (#24349)
1 parent 7ef63f7 commit 09ca587

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

src/content/docs/agents/model-context-protocol/transport.mdx

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,15 @@ sidebar:
55
order: 5
66
---
77

8-
import { Render } from "~/components";
9-
import { TabItem, Tabs } from "~/components";
8+
import { Render, TabItem, Tabs } from "~/components";
109

1110
The Model Context Protocol (MCP) specification defines three standard [transport mechanisms](https://spec.modelcontextprotocol.io/specification/draft/basic/transports/) for communication between clients and servers:
1211

13-
1. **stdio, communication over standard in and standard out** designed for local MCP connections.
14-
2. **Server-Sent Events (SSE)** Currently supported by most remote MCP clients, but is expected to be replaced by Streamable HTTP over time. It requires two endpoints: one for sending requests, another for receiving streamed responses.
12+
1. **stdio, communication over standard in and standard out** designed for local MCP connections.
13+
2. **Server-Sent Events (SSE)** Currently supported by most remote MCP clients, but is expected to be replaced by Streamable HTTP over time. It requires two endpoints: one for sending requests, another for receiving streamed responses.
1514
3. **Streamable HTTP** — New transport method [introduced](https://modelcontextprotocol.io/specification/2025-03-26/basic/transports#streamable-http) in March 2025. It simplifies the communication by using a single HTTP endpoint for bidirectional messaging. It is currently gaining adoption among remote MCP clients, but it is expected to become the standard transport in the future.
1615

17-
MCP servers built with the [Agents SDK](/agents) can support both remote transport methods (SSE and Streamable HTTP), with the [`McpAgent` class](https://github.com/cloudflare/agents/blob/2f82f51784f4e27292249747b5fbeeef94305552/packages/agents/src/mcp.ts) automatically handling the transport configuration.
16+
MCP servers built with the [Agents SDK](/agents) can support both remote transport methods (SSE and Streamable HTTP), with the [`McpAgent` class](https://github.com/cloudflare/agents/blob/2f82f51784f4e27292249747b5fbeeef94305552/packages/agents/src/mcp.ts) automatically handling the transport configuration.
1817

1918
## Implementing remote MCP transport
2019

@@ -34,11 +33,11 @@ If you're manually configuring your MCP server, here's how to use the `McpAgent`
3433
export default {
3534
fetch(request: Request, env: Env, ctx: ExecutionContext) {
3635
const { pathname } = new URL(request.url);
37-
36+
3837
if (pathname.startsWith('/sse')) {
3938
return MyMcpAgent.serveSSE('/sse').fetch(request, env, ctx);
4039
}
41-
40+
4241
if (pathname.startsWith('/mcp')) {
4342
return MyMcpAgent.serve('/mcp').fetch(request, env, ctx);
4443
}
@@ -52,15 +51,15 @@ export default {
5251
export default {
5352
fetch(request: Request, env: Env, ctx: ExecutionContext): Response | Promise<Response> {
5453
const { pathname } = new URL(request.url);
55-
54+
5655
if (pathname.startsWith('/sse')) {
5756
return MyMcpAgent.serveSSE('/sse').fetch(request, env, ctx);
5857
}
59-
58+
6059
if (pathname.startsWith('/mcp')) {
6160
return MyMcpAgent.serve('/mcp').fetch(request, env, ctx);
6261
}
63-
62+
6463
// Handle case where no path matches
6564
return new Response('Not found', { status: 404 });
6665
},
@@ -78,7 +77,7 @@ export default app
7877
```
7978
</TabItem> </Tabs>
8079
81-
#### MCP Server with Authentication
80+
#### MCP server with authentication
8281
If your MCP server implements authentication & authorization using the [Workers OAuth Provider](https://github.com/cloudflare/workers-oauth-provider) Library, then you can configure it to support both transport methods using the `apiHandlers` property.
8382
8483
```js
@@ -91,7 +90,7 @@ export default new OAuthProvider({
9190
})
9291
```
9392
94-
### Upgrading an Existing Remote MCP Server
93+
### Upgrading an existing remote MCP server
9594
If you've already built a remote MCP server using the Cloudflare Agents SDK, make the following changes to support the new Streamable HTTP transport while maintaining compatibility with remote MCP clients using SSE:
9695
- Use `MyMcpAgent.serveSSE('/sse')` for the existing SSE transport. Previously, this would have been `MyMcpAgent.mount('/sse')`, which has been kept as an alias.
9796
- Add a new path with `MyMcpAgent.serve('/mcp')` to support the new Streamable HTTP transport.
@@ -104,7 +103,7 @@ To use apiHandlers, update to @cloudflare/workers-oauth-provider v0.0.4 or later
104103
105104
With these few changes, your MCP server will support both transport methods, making it compatible with both existing and new clients.
106105
107-
### Testing with MCP Clients
106+
### Testing with MCP clients
108107
While most MCP clients have not yet adopted the new Streamable HTTP transport, you can start testing it today using [`mcp-remote`](https://www.npmjs.com/package/mcp-remote), an adapter that lets MCP clients that otherwise only support local connections work with remote MCP servers.
109108
110109
Follow [this guide](/agents/guides/test-remote-mcp-server/) for instructions on how to connect to your remote MCP server from Claude Desktop, Cursor, Windsurf, and other local MCP clients, using the [`mcp-remote` local proxy](https://www.npmjs.com/package/mcp-remote).

0 commit comments

Comments
 (0)