@@ -39,7 +39,7 @@ protected virtual void OnGUI()
3939 ) ;
4040 GUI . Label (
4141 new Rect ( titleRect . x + 10 , titleRect . y + 6 , titleRect . width - 20 , titleRect . height ) ,
42- mcpClient . name + " Manual Configuration" ,
42+ ( mcpClient ? . name ?? "Unknown" ) + " Manual Configuration" ,
4343 EditorStyles . boldLabel
4444 ) ;
4545 EditorGUILayout . Space ( 10 ) ;
@@ -70,17 +70,17 @@ protected virtual void OnGUI()
7070 } ;
7171
7272 EditorGUILayout . LabelField (
73- "1. Open " + mcpClient . name + " config file by either:" ,
73+ "1. Open " + ( mcpClient ? . name ?? "Unknown" ) + " config file by either:" ,
7474 instructionStyle
7575 ) ;
76- if ( mcpClient . mcpType == McpTypes . ClaudeDesktop )
76+ if ( mcpClient ? . mcpType == McpTypes . ClaudeDesktop )
7777 {
7878 EditorGUILayout . LabelField (
7979 " a) Going to Settings > Developer > Edit Config" ,
8080 instructionStyle
8181 ) ;
8282 }
83- else if ( mcpClient . mcpType == McpTypes . Cursor )
83+ else if ( mcpClient ? . mcpType == McpTypes . Cursor )
8484 {
8585 EditorGUILayout . LabelField (
8686 " a) Going to File > Preferences > Cursor Settings > MCP > Add new global MCP server" ,
@@ -96,16 +96,23 @@ protected virtual void OnGUI()
9696 // Path section with improved styling
9797 EditorGUILayout . BeginVertical ( EditorStyles . helpBox ) ;
9898 string displayPath ;
99- if ( RuntimeInformation . IsOSPlatform ( OSPlatform . Windows ) )
99+ if ( mcpClient != null )
100100 {
101- displayPath = mcpClient . windowsConfigPath ;
102- }
103- else if (
104- RuntimeInformation . IsOSPlatform ( OSPlatform . OSX )
105- || RuntimeInformation . IsOSPlatform ( OSPlatform . Linux )
106- )
107- {
108- displayPath = mcpClient . linuxConfigPath ;
101+ if ( RuntimeInformation . IsOSPlatform ( OSPlatform . Windows ) )
102+ {
103+ displayPath = mcpClient . windowsConfigPath ;
104+ }
105+ else if (
106+ RuntimeInformation . IsOSPlatform ( OSPlatform . OSX )
107+ || RuntimeInformation . IsOSPlatform ( OSPlatform . Linux )
108+ )
109+ {
110+ displayPath = mcpClient . linuxConfigPath ;
111+ }
112+ else
113+ {
114+ displayPath = configPath ;
115+ }
109116 }
110117 else
111118 {
@@ -224,7 +231,7 @@ protected virtual void OnGUI()
224231
225232 EditorGUILayout . Space ( 10 ) ;
226233 EditorGUILayout . LabelField (
227- "3. Save the file and restart " + mcpClient . name ,
234+ "3. Save the file and restart " + ( mcpClient ? . name ?? "Unknown" ) ,
228235 instructionStyle
229236 ) ;
230237
0 commit comments