You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
? "Server configuration has been copied to clipboard. Add this to your mcp.json inside the 'mcpServers' object with your preferred server name."
137
-
: "SSE URL has been copied. Use this URL in Cursor directly.",
148
+
title: "Config entry copied",
149
+
description:
150
+
transportType==="stdio"
151
+
? "Server configuration has been copied to clipboard. Add this to your mcp.json inside the 'mcpServers' object with your preferred server name."
152
+
: "SSE URL has been copied. Use this URL in Cursor directly.",
138
153
});
139
-
154
+
140
155
setTimeout(()=>{
141
-
setCopiedConfig(false);
156
+
setCopiedConfigEntry(false);
142
157
},2000);
143
158
}catch(error){
144
159
toast({
@@ -147,7 +162,30 @@ const Sidebar = ({
147
162
variant: "destructive",
148
163
});
149
164
}
150
-
};
165
+
},[generateMCPConfigEntry,transportType,toast]);
166
+
167
+
consthandleCopyConfigFile=useCallback(()=>{
168
+
try{
169
+
constconfigJson=generateMCPConfigFile();
170
+
navigator.clipboard.writeText(configJson);
171
+
setCopiedConfigFile(true);
172
+
173
+
toast({
174
+
title: "Config file copied",
175
+
description: "Server configuration has been copied to clipboard. Add this to your mcp.json file. Current testing server will be added as 'default-server'",
176
+
});
177
+
178
+
setTimeout(()=>{
179
+
setCopiedConfigFile(false);
180
+
},2000);
181
+
}catch(error){
182
+
toast({
183
+
title: "Error",
184
+
description: `Failed to copy config: ${errorinstanceofError ? error.message : String(error)}`,
0 commit comments