Effect CommunityEC
Effect Community6mo ago
22 replies
André König

Error Running MCP Server Locally with Wrangler on Cloudflare

I'm currently trying to ship an MCP server to Cloudflare, but when I try to run it locally with wrangler, I receive this error.

This is what I tried so far:

const router = McpServer.layerHttpRouter({
  name: "My MCP Server",
  version: "1.0.0",
  path: "/mcp"
}).pipe(
  Layer.provide(MyMcpServerTools),
  Layer.provide(FetchHttpClient.layer)
)


const { handler: fetch } = HttpLayerRouter.toWebHandler(router)

export default {
  fetch
}


Any pointer in the right direction is highly appreciated.
CleanShot_2025-07-11_at_22.16.512x.png
Was this page helpful?