Skip to content

feat(mcp): one-click installs, per-client pages, PAT bridge, JSON-RPC hints - #17

Merged
criptogus merged 1 commit into
mainfrom
claude/mcp-onboarding-v2
May 21, 2026
Merged

feat(mcp): one-click installs, per-client pages, PAT bridge, JSON-RPC hints#17
criptogus merged 1 commit into
mainfrom
claude/mcp-onboarding-v2

Conversation

@criptogus

Copy link
Copy Markdown
Owner

8-point UX pass to make MCP onboarding a single click for end users.

What's in

  1. One-click install buttons<InstallButtons /> renders Cursor + VS Code deep links that hand off to the editor with the server already configured. Used on /connect and /docs/mcp.
  2. Per-client landing pages/connect/{claude,claude-code,cursor,vscode,codex,lovable,hermes,openclaw} with one focused card each (deep link, CLI, config, manual), endpoint copy button, verification prompt, and PAT fallback.
  3. PAT as first-class fallback — Surfaced on every connect page and in the new unauthorized hint payload for clients with flaky OAuth (Hermes, OpenClaw, n8n, Grok).
  4. "Test" button on /account/connections — Server-side checks for a live, unexpired access token per client and reports back inline (✓ live / ✗ reason).
  5. JSON-RPC 401 with data.hint/api/mcp unauthorized() now returns a proper JSON-RPC error with data.hint, data.authorization_url, data.tokens_url, data.connect_url. Clients that render error.data inline can show the recovery action directly in chat.
  6. MCP instructions welcome paragraph — Points users at /connect/{client} on first call and mentions the PAT path. (Real notifications/message would need library changes in mcp-tanstack-start.)
  7. CLI single-binary buildcli/package.json adds @yao-pkg/pkg + bun compile scripts; .github/workflows/cli-release.yml builds binaries for linux/macos/macos-arm64/windows-x64 on cli-v* tags so users without Node can curl … | install.
  8. Stdio bridgenpx -y super-agent mcp is called out on per-client pages as the escape hatch for runtimes where remote OAuth is unreliable.

Files

  • src/components/site/InstallButtons.tsx (new)
  • src/routes/connect.$client.tsx (new)
  • src/routes/api/mcp.ts — JSON-RPC error + welcome instruction
  • src/lib/oauth/connections.functions.tstestOauthConnection
  • src/routes/account.connections.tsx — Test button
  • src/routes/connect.tsx, src/routes/docs.mcp.tsx — install buttons
  • cli/package.json — build scripts
  • .github/workflows/cli-release.yml (new)

Test plan

  • Click "Install in Cursor" on /connect — Cursor opens with the server pre-filled.
  • Visit /connect/cursor, /connect/claude, /connect/vscode, /connect/codex, /connect/lovable, /connect/hermes, /connect/openclaw — each renders a focused page.
  • On /account/connections, click Test on an existing OAuth connection → ✓ live; revoke and re-test → ✗ no_live_token.
  • Call a write tool (upload_packages) without auth → response is JSON-RPC { error: { code: -32001, data: { hint, authorization_url, tokens_url, connect_url } } }.
  • Tag cli-v0.3.0 and confirm the workflow produces 4 binaries.
  • PAT generated at /account/tokens + pasted as Bearer header in n8n works end-to-end.

https://claude.ai/code/session_019gMoupKKTVydpNwiiACQRd


Generated by Claude Code

… hints

8-point UX pass to make MCP onboarding a single click for end users.

1. One-click install buttons (Cursor + VS Code deep links) on /connect and
   /docs/mcp via a new <InstallButtons /> component — hands off to the
   editor with the server already configured, no JSON editing.
2. Per-client landing pages at /connect/{claude,claude-code,cursor,vscode,
   codex,lovable,hermes,openclaw} — focused single-card flow with copy
   button, install steps, verification prompt and PAT escape hatch.
3. Personal Access Token route (/account/tokens) is now surfaced as the
   primary fallback path on every connect page and in the unauthorized
   hint payload — useful for clients with flaky OAuth (Hermes, OpenClaw,
   n8n, Grok).
4. "Test" button on /account/connections — server-side checks for a
   live, unexpired access token per client and reports back inline,
   so users can tell at a glance whether a connection still works.
5. 401s from /api/mcp now return a proper JSON-RPC error with
   data.hint, data.authorization_url, data.tokens_url and
   data.connect_url. Clients that surface error.data inline can render
   the recovery action directly in chat.
6. MCP `instructions` updated with a welcome paragraph that points users
   at /connect/{client} on first call and mentions the PAT path.
7. CLI single-binary build: cli/package.json adds @yao-pkg/pkg + bun
   compile scripts; .github/workflows/cli-release.yml builds binaries
   for linux/macos/macos-arm64/windows-x64 on cli-v* tags so users
   without Node can curl|install.
8. Stdio bridge (npx -y super-agent mcp) is now called out on per-client
   pages as the escape hatch for runtimes where remote OAuth is unreliable.

https://claude.ai/code/session_019gMoupKKTVydpNwiiACQRd
@criptogus
criptogus marked this pull request as ready for review May 21, 2026 17:12
@criptogus
criptogus merged commit dad8744 into main May 21, 2026
1 check passed
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.

2 participants