From 2dcb9dda23a1e2328090a9c1de89e592015a335a Mon Sep 17 00:00:00 2001 From: StefELianos Date: Thu, 9 Jul 2026 11:53:55 +0200 Subject: [PATCH] Use submitted name if possible and server as fallback for MCP installation --- apps/cursor/src/components/plugins/detail/mcp-section.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/cursor/src/components/plugins/detail/mcp-section.tsx b/apps/cursor/src/components/plugins/detail/mcp-section.tsx index f33a39e2..24dce758 100644 --- a/apps/cursor/src/components/plugins/detail/mcp-section.tsx +++ b/apps/cursor/src/components/plugins/detail/mcp-section.tsx @@ -12,7 +12,7 @@ import { buildMCPInstallDeepLink } from "./deeplinks"; function resolveMcpConfig( content: string | null, meta: Record, -): { name: string; config: Record } | null { +): { config: Record } | null { // Try content first, then metadata.config let parsed: Record | null = null; @@ -37,14 +37,13 @@ function resolveMcpConfig( const keys = Object.keys(servers); if (keys.length > 0) { return { - name: keys[0], config: servers[keys[0]] as Record, }; } } // Content is already a raw config (no mcpServers wrapper) - return { name: (meta?.name as string) ?? "server", config: parsed }; + return { config: parsed }; } export function McpSection({ @@ -75,8 +74,9 @@ export function McpSection({ const serialized = JSON.stringify(resolved.config, null, 2); configPreview = serialized; if (!installLink) { + const installName = mcp.name.trim() || "server"; installLink = buildMCPInstallDeepLink( - resolved.name, + installName, JSON.stringify(resolved.config), ); }