cloudflare / cloudflare/ai

The remote-mcp-server OAuth demo doesn't work due to a bug in the @modelcontextprotocol/inspector 0.12.0

Open
#159 3 comments 8 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
1.2k
Forks
345
Avg merge
13h 31m
Merged PRs (30d)
1

Description

I was trying to follow what I thought was the simplest Remote MCP OAuth demo that CloudFlare published: https://github.com/cloudflare/ai/tree/main/demos/remote-mcp-server

That relies upon the `@modelcontextprotocol/inspector` tool: https://github.com/modelcontextprotocol/inspector/

Unfortunately, that tool currently has a broken OAuth flow with SSE, meaning that you are never prompted for the OAuth login, as you would expect.
That is noted here: https://github.com/modelcontextprotocol/inspector/issues/358
And here: https://github.com/modelcontextprotocol/inspector/issues/390

This bug manifests as clicking on "Connect" in the Inspect and getting a connection error, with no OAuth login form appearing. The server also simply logs:
```
┃ [wrangler:inf] GET /sse 401 Unauthorized (6ms) ║
┃ ✘ [ERROR] OAuth error response: 401 invalid_token - Missing or invalid access token
```

I kept thinking I was doing something wrong, since this seems like such a straightforward demo.
I'm writing this here to hopefully save some other people some trouble.

The workaround, as noted in https://github.com/modelcontextprotocol/inspector/issues/358, is to downgrade to 0.11.0 of inspector:
`npx @modelcontextprotocol/inspector@0.11.0`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.