Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

fix(mcp): use native HTTP for Devin MCP connections (#51646)

Alex Gercog0f618d8efbd6
diff --git a/packages/ui-patterns/src/McpUrlBuilder/clients.data.ts b/packages/ui-patterns/src/McpUrlBuilder/clients.data.ts
index c27fb187395..2c6e6c20969 100644
--- a/packages/ui-patterns/src/McpUrlBuilder/clients.data.ts
+++ b/packages/ui-patterns/src/McpUrlBuilder/clients.data.ts
@@ -16,7 +16,6 @@ import type {
OmpMcpConfig,
OpenCodeMcpConfig,
VSCodeMcpConfig,
- WindsurfMcpConfig,
} from './types'
import { getMcpUrl } from './types'
@@ -248,17 +247,7 @@ export const MCP_CLIENT_DATA: McpClientData[] = [
icon: 'devin',
hasDistinctDarkIcon: true,
configFile: '~/.config/devin/mcp_config.json',
- externalDocsUrl: '',
- transformConfig: (config): WindsurfMcpConfig => {
- return {
- mcpServers: {
- supabase: {
- command: 'npx',
- args: ['-y', 'mcp-remote', config.mcpServers.supabase.url],
- },
- },
- }
- },
+ externalDocsUrl: 'https://docs.devin.ai/cli/extensibility/mcp/configuration',
},
{
key: 'warp',
@@ -441,6 +430,10 @@ export const MCP_CLI_COMMANDS: Record<string, McpCliCommands> = {
install: (url) => `copilot mcp add --transport http supabase "${url}"`,
authenticate: 'copilot -i /mcp',
},
+ windsurf: {
+ install: (url) => `devin mcp add -s user supabase "${url}"`,
+ authenticate: 'devin mcp login supabase',
+ },
goose: {
install: (url) => `goose session --with-streamable-http-extension "${url}"`,
},
diff --git a/packages/ui-patterns/src/McpUrlBuilder/clients.instructions.md.tsx b/packages/ui-patterns/src/McpUrlBuilder/clients.instructions.md.tsx
index e59a51c558c..babf6a1e36c 100644
--- a/packages/ui-patterns/src/McpUrlBuilder/clients.instructions.md.tsx
+++ b/packages/ui-patterns/src/McpUrlBuilder/clients.instructions.md.tsx
@@ -210,6 +210,39 @@ export const MCP_CLIENT_INSTRUCTIONS: Record<string, McpClientInstructions> = {
</>
),
},
+ windsurf: {
+ primary: ({ url }) => (
+ <>
+ <paragraph>
+ These instructions use the Devin Local agent in Devin Desktop or Devin CLI. Add the
+ Supabase MCP server to your user configuration:
+ </paragraph>
+ <code lang="bash" value={MCP_CLI_COMMANDS['windsurf'].install!(url)} />
+ </>
+ ),
+ alternate: ({ isPlatform }) => (
+ <>
+ <paragraph>
+ On Windows, the configuration file is{' '}
+ <inlineCode value="%APPDATA%\devin\mcp_config.json" /> instead.
+ </paragraph>
+ {isPlatform && (
+ <>
+ <paragraph>
+ If you skipped the browser sign-in or need to re-authenticate, run:
+ </paragraph>
+ <code lang="bash" value={MCP_CLI_COMMANDS['windsurf'].authenticate!} />
+ <paragraph>Complete the authorization flow in your browser.</paragraph>
+ </>
+ )}
+ <paragraph>Check the server configuration:</paragraph>
+ <code lang="bash" value="devin mcp list" />
+ <paragraph>
+ Start a new Devin Local or Devin CLI session to load the server's tools.
+ </paragraph>
+ </>
+ ),
+ },
goose: {
primary: ({ url }) => (
<>
diff --git a/packages/ui-patterns/src/McpUrlBuilder/types.test.ts b/packages/ui-patterns/src/McpUrlBuilder/types.test.ts
index e7e8183b555..5e4a8cbf75e 100644
--- a/packages/ui-patterns/src/McpUrlBuilder/types.test.ts
+++ b/packages/ui-patterns/src/McpUrlBuilder/types.test.ts
@@ -5,22 +5,14 @@ import { getMcpUrl, type McpClientBaseConfig } from './types'
const SERVER_URL = 'https://mcp.supabase.com/mcp?project_ref=abc123&read_only=true'
-/**
- * `windsurf` configures a stdio `mcp-remote` command that carries the URL in `args`, so its
- * config has no URL field to read back. It renders no instructions and no deep link, so it
- * never reaches `getMcpUrl`.
- */
-const CLIENTS_WITHOUT_URL_IN_CONFIG = new Set(['windsurf'])
-
describe('getMcpUrl', () => {
- it.each(
- MCP_CLIENT_DATA.filter((client) => !CLIENTS_WITHOUT_URL_IN_CONFIG.has(client.key)).map(
- (client) => [client.key, client] as const
- )
- )('reads the server URL back out of the %s config', (_key, client) => {
- const base: McpClientBaseConfig = { mcpServers: { supabase: { url: SERVER_URL } } }
- const config = client.transformConfig ? client.transformConfig(base) : base
+ it.each(MCP_CLIENT_DATA.map((client) => [client.key, client] as const))(
+ 'reads the server URL back out of the %s config',
+ (_key, client) => {
+ const base: McpClientBaseConfig = { mcpServers: { supabase: { url: SERVER_URL } } }
+ const config = client.transformConfig ? client.transformConfig(base) : base
- expect(getMcpUrl(config)).toBe(SERVER_URL)
- })
+ expect(getMcpUrl(config)).toBe(SERVER_URL)
+ }
+ )
})
diff --git a/packages/ui-patterns/src/McpUrlBuilder/types.ts b/packages/ui-patterns/src/McpUrlBuilder/types.ts
index 89daf506c3d..e80c3b6e641 100644
--- a/packages/ui-patterns/src/McpUrlBuilder/types.ts
+++ b/packages/ui-patterns/src/McpUrlBuilder/types.ts
@@ -64,15 +64,6 @@ export interface VSCodeMcpConfig {
}
}
-export interface WindsurfMcpConfig {
- mcpServers: {
- supabase: {
- command: 'npx'
- args: ['-y', 'mcp-remote', string]
- }
- }
-}
-
export interface ClaudeCodeMcpConfig extends McpClientBaseConfig {
mcpServers: {
supabase: {
@@ -247,7 +238,6 @@ export type McpClientConfig =
| OpenCodeMcpConfig
| OtherMcpConfig
| VSCodeMcpConfig
- | WindsurfMcpConfig
// Type guards
export function isVSCodeMcpConfig(config: McpClientConfig): config is VSCodeMcpConfig {