Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

🐛 fix: slove the agentbuilder install market tools not work (#11848)

Shinji-Lidbe901193999
diff --git a/src/store/tool/slices/mcpStore/action.ts b/src/store/tool/slices/mcpStore/action.ts
index e32c500248e..3aea527749d 100644
--- a/src/store/tool/slices/mcpStore/action.ts
+++ b/src/store/tool/slices/mcpStore/action.ts
@@ -205,9 +205,6 @@ export const createMCPPluginStoreSlice: StateCreator<
const normalizedConfig = toNonEmptyStringRecord(config);
let plugin = mcpStoreSelectors.getPluginById(identifier)(get());
- // @ts-expect-error
- const { haveCloudEndpoint } = plugin || {};
-
if (!plugin || !plugin.manifestUrl) {
const data = await discoverService.getMcpDetail({ identifier });
if (!data) return;
@@ -217,6 +214,10 @@ export const createMCPPluginStoreSlice: StateCreator<
if (!plugin) return;
+ // Extract haveCloudEndpoint after plugin is loaded
+ // @ts-expect-error
+ const { haveCloudEndpoint } = plugin || {};
+
const { updateInstallLoadingState, refreshPlugins, updateMCPInstallProgress } = get();
// Create AbortController for canceling installation
@@ -661,10 +662,10 @@ export const createMCPPluginStoreSlice: StateCreator<
errorLog,
params: connection
? {
- args: connection.args,
- command: connection.command,
- type: connection.type,
- }
+ args: connection.args,
+ command: connection.command,
+ type: connection.type,
+ }
: undefined,
step: 'installation_error',
timestamp: Date.now(),