Skip to content

Commit c945139

Browse files
committed
improvement(mcp): remove mcp-remote for cursor config
1 parent 51891da commit c945139

File tree

1 file changed

+12
-8
lines changed
  • apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/settings-modal/components/workflow-mcp-servers

1 file changed

+12
-8
lines changed

apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/settings-modal/components/workflow-mcp-servers/workflow-mcp-servers.tsx

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,16 @@ function ServerDetailView({ workspaceId, serverId, onBack }: ServerDetailViewPro
185185
return `claude mcp add "${safeName}" --url "${mcpServerUrl}" --header "X-API-Key:$SIM_API_KEY"`
186186
}
187187

188+
// Cursor supports direct URL configuration (no mcp-remote needed)
189+
if (client === 'cursor') {
190+
const cursorConfig = isPublic
191+
? { url: mcpServerUrl }
192+
: { url: mcpServerUrl, headers: { 'X-API-Key': '$SIM_API_KEY' } }
193+
194+
return JSON.stringify({ mcpServers: { [safeName]: cursorConfig } }, null, 2)
195+
}
196+
197+
// Claude Desktop and VS Code still use mcp-remote (stdio transport)
188198
const mcpRemoteArgs = isPublic
189199
? ['-y', 'mcp-remote', mcpServerUrl]
190200
: ['-y', 'mcp-remote', mcpServerUrl, '--header', 'X-API-Key:$SIM_API_KEY']
@@ -265,14 +275,8 @@ function ServerDetailView({ workspaceId, serverId, onBack }: ServerDetailViewPro
265275
.replace(/[^a-z0-9-]/g, '')
266276

267277
const config = isPublic
268-
? {
269-
command: 'npx',
270-
args: ['-y', 'mcp-remote', mcpServerUrl],
271-
}
272-
: {
273-
command: 'npx',
274-
args: ['-y', 'mcp-remote', mcpServerUrl, '--header', 'X-API-Key:$SIM_API_KEY'],
275-
}
278+
? { url: mcpServerUrl }
279+
: { url: mcpServerUrl, headers: { 'X-API-Key': '$SIM_API_KEY' } }
276280

277281
const base64Config = btoa(JSON.stringify(config))
278282
return `cursor://anysphere.cursor-deeplink/mcp/install?name=${encodeURIComponent(safeName)}&config=${encodeURIComponent(base64Config)}`

0 commit comments

Comments
 (0)