Skip to content

feat(registry): add Registry tab with server-side OAuth credential protection#1553

Draft
khandrew1 wants to merge 1 commit intomainfrom
khandrew1/registry-tab
Draft

feat(registry): add Registry tab with server-side OAuth credential protection#1553
khandrew1 wants to merge 1 commit intomainfrom
khandrew1/registry-tab

Conversation

@khandrew1
Copy link
Contributor

@khandrew1 khandrew1 commented Mar 7, 2026

image

Summary

  • Adds a curated Registry tab in the sidebar for one-click connection to first-party MCP servers (Asana, GitHub, Notion, Linear, Jira)
  • Server-side credential injection: OAuth client_secret is fetched from Convex and injected during token exchange in the Hono proxy — secrets never reach the browser
  • registryManaged flag keeps registry servers out of the Servers tab and skips workspace sync
  • registrySlug is threaded through the OAuth flow (stored in localStorage to survive full-page redirects)

Changes

Client

  • RegistryTab.tsx — New component showing server cards with connect/disconnect, connection status badges
  • mcp-sidebar.tsx — Added "Registry" entry to sidebar navigation
  • App.tsx — Wired RegistryTab with onConnect, onDisconnect, and servers props
  • hosted-tab-policy.ts — Added registry to allowed hosted tabs
  • mcp-oauth.ts — Threaded registrySlug through initiateOAuth, handleOAuthCallback, refreshOAuthTokens, and clearOAuthData; parameterized fetch interceptor to include slug in proxy requests
  • app-types.ts — Added registryManaged and registrySlug to ServerWithName
  • types.ts — Added registryManaged and registrySlug to ServerFormData

Server

  • oauth.ts — Proxy route accepts registrySlug, injects client_secret for registry servers during token exchange
  • oauth-proxy.ts — Added isTokenExchangeUrl() and fetchRegistryCredentials() helpers

Hooks

  • use-server-state.ts — Skips Convex workspace sync and UPDATE_WORKSPACE dispatch for registry-managed servers; typed oauthOptions as MCPOAuthOptions

Companion PR

Backend changes (schema, seed, credentials endpoint, icon storage) in mcpjam-backend repo.

Test plan

  • Registry tab loads with 5 server cards (Asana, GitHub, Notion, Linear, Jira)
  • SVG icons render from Convex storage
  • Clicking "Connect" on a registry server initiates OAuth flow
  • Token exchange succeeds (Hono injects client_secret server-side)
  • Connected servers show "Connected" badge + "Disconnect" button
  • Registry servers do NOT appear in the Servers tab
  • Disconnecting a registry server returns card to "Connect" state
  • No secrets visible in browser DevTools network tab

🤖 Generated with Claude Code

Add a curated Registry tab in the sidebar for connecting to first-party
MCP servers (Asana, GitHub, Notion, Linear, Jira) with one click.

Client changes:
- New RegistryTab component with server cards, connect/disconnect UI
- Registry sidebar entry in mcp-sidebar.tsx
- registryManaged flag skips workspace sync for registry servers
- registrySlug threaded through OAuth flow for server-side secret injection
- OAuth fetch interceptor sends registrySlug to proxy endpoint
- localStorage persistence for registrySlug survives OAuth redirects

Server changes:
- OAuth proxy injects clientSecret server-side during token exchange
- fetchRegistryCredentials helper fetches from Convex backend
- isTokenExchangeUrl utility detects /token and /access_token endpoints

Type changes:
- ServerFormData: added registryManaged, registrySlug
- ServerWithName: added registryManaged, registrySlug
- MCPOAuthOptions: added registrySlug

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@chelojimenez
Copy link
Contributor

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@khandrew1 khandrew1 self-assigned this Mar 7, 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.

2 participants