Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ When you build MCP Servers on Cloudflare, you extend the [`McpAgent` class](http

```ts title="src/index.ts"
import { McpAgent } from "agents/mcp";
import { DurableMCP } from "@cloudflare/model-context-protocol";
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";

export class MyMCP extends McpAgent {
server = new McpServer({ name: "Demo", version: "1.0.0" });
Expand All @@ -28,6 +28,9 @@ export class MyMCP extends McpAgent {
);
}
}

export default MyMCP.mount("/mcp", { binding: "MyMCP" });

```

</TypeScriptExample>
Expand Down