musistudio/claude-code-router · error

MCP server must be saved before tool discovery.

Error message

MCP server must be saved before tool discovery.

What it means

Error "MCP server must be saved before tool discovery." thrown in musistudio/claude-code-router.

Source

Thrown at packages/electron/src/main/ipc.ts:145

ipcMain.handle(IPC_CHANNELS.appGetPluginMarketplace, () => getPluginMarketplace());
ipcMain.handle(IPC_CHANNELS.appGetRequestLogDetail, (_event, request) => getRequestLogDetail(request));
ipcMain.handle(IPC_CHANNELS.appGetRequestLogBodyChunk, (_event, request) => getRequestLogBodyChunk(request));
ipcMain.handle(IPC_CHANNELS.appGetRequestLogs, (_event, filter?: RequestLogListFilter) => getRequestLogs(filter));
ipcMain.handle(IPC_CHANNELS.appGetUpdateStatus, () => appUpdateService.getStatus());
ipcMain.handle(IPC_CHANNELS.appGetUsageStats, (_event, range?: UsageStatsRange, filter?: UsageStatsFilter) => getUsageStats(range, filter));
ipcMain.handle(IPC_CHANNELS.appFetchProviderManifest, (_event, request: ProviderManifestFetchRequest) => fetchProviderManifest(request));
ipcMain.handle(IPC_CHANNELS.appImportLocalAgentProvider, (_event, request: LocalAgentProviderImportRequest) => importLocalAgentProvider(request));
ipcMain.handle(IPC_CHANNELS.appProbeLocalAgentProvider, (_event, request) => probeLocalAgentProvider(request));
ipcMain.handle(IPC_CHANNELS.appInstallProxyCertificate, () => proxyService.installCertificate());
ipcMain.handle(IPC_CHANNELS.appListMcpServerTools, async (_event, serverName: string) => {
  const name = typeof serverName === "string" ? serverName.trim() : "";
  if (!name) {
    throw new Error("MCP server name is required.");
  }
  const config = await loadAppConfig();
  const server = config.agent.mcpServers.find((candidate) => candidate.name === name);
  if (!server) {
    throw new Error("MCP server must be saved before tool discovery.");
  }
  return listMcpServerTools(server);
});
ipcMain.handle(IPC_CHANNELS.appStartChromeLoginImport, async (_event, request: ChromeLoginImportRequest) => {
  return await chromeLoginImportService.createJob(request);
});
ipcMain.handle(IPC_CHANNELS.appGetChromeLoginImport, (_event, id: string) => {
  return chromeLoginImportService.getJob(typeof id === "string" ? id : "");
});
ipcMain.handle(IPC_CHANNELS.appOpenBuiltInBrowser, async (_event, url?: string) => {
  const config = await loadAppConfig();
  await builtInBrowserService.open(config, url);
});
ipcMain.handle(IPC_CHANNELS.appOpenPluginApp, async (_event, pluginId: string, appId?: string) => {
  const normalizedPluginId = readString(pluginId);
  if (!normalizedPluginId) {
    throw new Error("Plugin id is required.");
  }

View on GitHub (pinned to 99f24806c6)

When it happens

Trigger: Thrown at packages/electron/src/main/ipc.ts:145 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of musistudio/claude-code-router@99f24806c6 (2026-08-27). Data as JSON: /api/errors/fee0fbbef7b4ae4b. Report an issue: GitHub.