supermemory/apps/web/lib/oauth-plugins.ts
Prasanna721 651e304735 feat(web): MCP OAuth consent page (#1118)
Consent + connect UI for the new OAuth 2.1 provider. The API side lives in mono#1812 (stacked on the Enterprise MCP PR). When an MCP client starts OAuth, this is the page where you pick the org and approve access.

What's here:

- `/oauth/consent`: the consent screen. Pick an organization (cards), then set access: permission (read / read+write) and scope (full, or scoped to specific container-tag spaces with a searchable picker). Approving hands the code back to the client.
- `/connect`: plugin-aware entry for known clients (Claude Code, etc.).
- `ConsentCard.tsx`: shared card component (org list with fade, dual-icon connecting header, scoped-spaces picker), built to reuse across plugins.
- plus a fix to the mcp resource metadata.

Pairs with mono#1812 (the API OAuth provider) and the Enterprise MCP PR. Draft until the end-to-end flow is verified.
2026-06-16 17:33:09 +00:00

57 lines
1.9 KiB
TypeScript

// OAuth-connectable plugins, mirroring the `authMethod: "oauth"` entries in mono's packages/lib/plugins.ts.
// `oauthClientId` is the stable first-party client id (omitted for Cursor — it self-registers via DCR).
export interface OAuthPluginInfo {
id: string
oauthClientId?: string
name: string
description: string
icon: string
docsUrl: string
}
export const OAUTH_PLUGINS: OAuthPluginInfo[] = [
{
id: "claude_code",
oauthClientId: "supermemory-claude-code",
name: "Claude Code",
description:
"Persistent memory for Claude Code — recalls your coding context, patterns and decisions across sessions.",
icon: "/images/plugins/claude-code.svg",
docsUrl: "https://supermemory.ai/docs/integrations/claude-code",
},
{
id: "opencode",
oauthClientId: "supermemory-opencode",
name: "OpenCode",
description:
"Memory layer for OpenCode — semantic search across sessions and automatic context injection.",
icon: "/images/plugins/opencode.svg",
docsUrl: "https://supermemory.ai/docs/integrations/opencode",
},
{
id: "openclaw",
oauthClientId: "supermemory-openclaw",
name: "OpenClaw",
description:
"Multi-platform memory for OpenClaw — persistence across Telegram, WhatsApp, Discord, Slack and more.",
icon: "/images/plugins/openclaw.svg",
docsUrl: "https://supermemory.ai/docs/integrations/openclaw",
},
{
id: "codex",
oauthClientId: "supermemory-codex",
name: "OpenAI Codex",
description:
"Persistent memory for the OpenAI Codex CLI — recalls coding context and decisions across projects.",
icon: "/images/plugins/codex.png",
docsUrl: "https://supermemory.ai/docs/integrations/codex",
},
{
id: "cursor",
name: "Cursor",
description:
"Persistent AI memory for Cursor via the Supermemory MCP server. Connect from Cursor's MCP setup.",
icon: "/images/plugins/cursor.png",
docsUrl: "https://supermemory.ai/docs/supermemory-mcp/setup",
},
]