Skip to content

docs(mcp): Document headless / remote OAuth flow (#383)#7

Merged
stevenweaver merged 1 commit into
mainfrom
docs/mcp-headless-oauth-383
May 22, 2026
Merged

docs(mcp): Document headless / remote OAuth flow (#383)#7
stevenweaver merged 1 commit into
mainfrom
docs/mcp-headless-oauth-383

Conversation

@stevenweaver
Copy link
Copy Markdown
Member

Summary

  • Adds a new Headless / Remote setup section to guide/mcp.md covering the out-of-band OAuth flow for users running Claude Code (or similar HTTP-MCP clients) on SSH / remote hosts where the localhost-callback OAuth handshake can't complete
  • Includes a POSIX-compatible bash recipe that registers a client, drives PKCE, prints the OOB authorize URL, parses the code, exchanges for a bearer token, and prints the final claude mcp add --header "Authorization: Bearer <token>" command
  • Cross-links from the Claude Code section and adds a troubleshooting row pointing users from the symptom to the fix

Why

Issue veg/datamonkey-js-server#383: users running Claude Code on a remote box hit Safari Can't Connect to the Server (or equivalent) because the OAuth flow redirects to http://localhost:<port> on the wrong machine. The MCP server already supports OOB (urn:ietf:wg:oauth:2.0:oob) per veg/datamonkey-js-server#385; this PR is the user-facing documentation for that capability.

Test plan

  • Render preview locally (npm run dev in datamonkey-docs/) and confirm the new H2 renders, the > callout in Claude Code links to the right anchor, and the troubleshooting row's link resolves
  • Verify the bash recipe still works against https://mcp.datamonkey.org/mcp end-to-end (smoke-tested by the issue reporter / by us before this PR)

Adds a "Headless / Remote setup" section to guide/mcp.md covering the
out-of-band OAuth flow for users running Claude Code on SSH / remote
hosts where the browser-based localhost callback can't reach the CLI.

Includes a POSIX-compatible bash recipe that registers a client, drives
PKCE, prints the OOB authorize URL, exchanges the pasted code for a
bearer token, and emits the exact `claude mcp add --header` command.

Also cross-links from the Claude Code section and adds a troubleshooting
row for the localhost-callback failure mode.
@stevenweaver stevenweaver merged commit 57cd651 into main May 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant