Remote MCP Server example is not working

I followed all the necessary steps mentioned here: https://developers.cloudflare.com/agents/guides/remote-mcp-server/ When I try to connect with http://localhost:8787/see, it is failing and shows diconnected regardless
[wrangler:inf] GET /sse 401 Unauthorized (68ms)
[wrangler:inf] GET /.well-known/oauth-authorization-server 200 OK (2ms)
[wrangler:inf] POST /token 401 Unauthorized (3ms)
[wrangler:inf] GET /authorize 200 OK (5ms)
[wrangler:inf] POST /approve 200 OK (8ms)
[wrangler:inf] GET /.well-known/oauth-authorization-server 200 OK (3ms)
[wrangler:inf] POST /token 401 Unauthorized (5ms)
[wrangler:inf] GET /sse 401 Unauthorized (6ms)
[wrangler:inf] GET /.well-known/oauth-authorization-server 200 OK (3ms)
[wrangler:inf] POST /token 401 Unauthorized (2ms)
[wrangler:inf] GET /authorize 200 OK (2ms)
[wrangler:inf] POST /approve 200 OK (5ms)
[wrangler:inf] GET /.well-known/oauth-authorization-server 200 OK (2ms)
[wrangler:inf] POST /token 401 Unauthorized (2ms)
[wrangler:inf] GET /sse 401 Unauthorized (68ms)
[wrangler:inf] GET /.well-known/oauth-authorization-server 200 OK (2ms)
[wrangler:inf] POST /token 401 Unauthorized (3ms)
[wrangler:inf] GET /authorize 200 OK (5ms)
[wrangler:inf] POST /approve 200 OK (8ms)
[wrangler:inf] GET /.well-known/oauth-authorization-server 200 OK (3ms)
[wrangler:inf] POST /token 401 Unauthorized (5ms)
[wrangler:inf] GET /sse 401 Unauthorized (6ms)
[wrangler:inf] GET /.well-known/oauth-authorization-server 200 OK (3ms)
[wrangler:inf] POST /token 401 Unauthorized (2ms)
[wrangler:inf] GET /authorize 200 OK (2ms)
[wrangler:inf] POST /approve 200 OK (5ms)
[wrangler:inf] GET /.well-known/oauth-authorization-server 200 OK (2ms)
[wrangler:inf] POST /token 401 Unauthorized (2ms)
Cloudflare Docs
Build a Remote MCP server · Cloudflare Agents docs
This guide will walk you through how to deploy an example MCP server to your Cloudflare account. You will then customize this example to suit your needs.
1 Reply
light gayami
light gayamiOP5w ago
Solved the issue While connecting to http://localhost:8787/see in inspector, I was accidentally passing the auth header which was not required. Removal of it solved the problem

Did you find this page helpful?