25 MB lightweight cross-platform database client for 100+ databases, including MySQL, PostgreSQL, SQLite, Redis, MongoDB, DuckDB, SQL Server, and Dameng. Built-in AI, MCP Server, CLI, desktop and Docker. | 轻量级跨平台数据库管理工具,支持 MySQL、PostgreSQL、SQLite、Redis、MongoDB、达梦等 100+ 数据库,提供桌面端、Docker、CLI、内置 AI 助手和 MCP。
TypeScript aicliclickhousedatabasedatabase-clientdatabase-managementdockerguimcpmongodbmysqlpostgresqlredisrustsql-serversqlitetaurivue
fix(mcp): repair HTTP service startup and simplify settings
二丫讲梵72f8dfeb7c38
diff --git a/apps/desktop/src/components/editor/EditorSettingsDialog.vue b/apps/desktop/src/components/editor/EditorSettingsDialog.vueindex b9d24f68b2..957ee54888 100644--- a/apps/desktop/src/components/editor/EditorSettingsDialog.vue+++ b/apps/desktop/src/components/editor/EditorSettingsDialog.vue@@ -9899,7 +9899,7 @@ LIMIT 100;</pre<div class="flex items-center gap-2"><Label class="text-base">{{ t("settings.mcpHttpServiceTitle") }}</Label><Badge :variant="mcpHttpStatus?.running ? 'default' : 'outline'">- {{ mcpHttpStatus?.running ? t("settings.mcpHttpStatusLabelRunning") : mcpHttpSettings.enabled ? t("settings.mcpHttpStatusLabelPending") : t("settings.mcpHttpStatusLabelDisabled") }}+ {{ mcpHttpStatus?.running ? t("settings.mcpHttpStatusLabelRunning") : mcpHttpSettings.enabled ? t("settings.mcpHttpStatusLabelNotRunning") : t("settings.mcpHttpStatusLabelDisabled") }}</Badge></div><p class="text-xs leading-relaxed text-muted-foreground">{{ t("settings.mcpHttpServiceDescription") }}</p>@@ -9965,10 +9965,9 @@ LIMIT 100;</pre{{ mcpHttpHasUnsavedChanges ? t("settings.mcpHttpUnsavedChangesHint") : t("settings.mcpHttpSaveHint") }}</p><div class="flex shrink-0 justify-end gap-2">- <Button type="button" variant="outline" :disabled="mcpHttpLoading || mcpHttpSaving" @click="loadMcpHttpSettings">{{ t("settings.mcpHttpReload") }}</Button><Button type="button" :disabled="mcpHttpLoading || mcpHttpSaving || Boolean(mcpHttpDraftValidationError)" @click="saveMcpHttpSettings"><Loader2 v-if="mcpHttpSaving" class="mr-2 h-4 w-4 animate-spin" />- {{ t("settings.mcpHttpSaveAndStart") }}+ {{ t("settings.mcpHttpApply") }}</Button></div></div>@@ -9977,10 +9976,9 @@ LIMIT 100;</pre<div v-else class="flex flex-col gap-3 rounded-md border border-dashed px-4 py-3 text-xs text-muted-foreground sm:flex-row sm:items-center sm:justify-between"><p>{{ t("settings.mcpHttpDisabledHint") }}</p><div class="flex shrink-0 justify-end gap-2">- <Button type="button" variant="outline" :disabled="mcpHttpLoading || mcpHttpSaving" @click="loadMcpHttpSettings">{{ t("settings.mcpHttpReload") }}</Button><Button type="button" :disabled="mcpHttpLoading || mcpHttpSaving" @click="saveMcpHttpSettings"><Loader2 v-if="mcpHttpSaving" class="mr-2 h-4 w-4 animate-spin" />- {{ t("settings.mcpHttpSaveAndStop") }}+ {{ t("settings.mcpHttpApply") }}</Button></div></div>diff --git a/apps/desktop/src/i18n/locales/az.ts b/apps/desktop/src/i18n/locales/az.tsindex cd4aa50538..b38e72b76d 100644--- a/apps/desktop/src/i18n/locales/az.ts+++ b/apps/desktop/src/i18n/locales/az.ts@@ -8150,7 +8150,7 @@ export default withEnglishFallback({mcpHttpReloadStatus: "Vəziyyəti yenidən yüklə",mcpHttpServiceTitle: "Streamable HTTP xidməti",mcpHttpStatusLabelRunning: "İşləyir",- mcpHttpStatusLabelPending: "Konfiqurasiya gözlənilir",+ mcpHttpStatusLabelNotRunning: "İşləmir",mcpHttpServiceDescription: "Standart olaraq deaktivdir. Aktivləşdirildikdə DBX Desktop xidməti işlədir; yuxarıdakı konfiqurasiya faktiki dinləyən xidmətə yalnız yadda saxlandıqdan sonra tətbiq edilir.",mcpHttpListenerTitle: "Dinləyici konfiqurasiyası",mcpHttpListenerHintPrefix: "Bu dəyəri saxlamağı tövsiyə edirik: ",@@ -8169,11 +8169,9 @@ export default withEnglishFallback({mcpHttpOriginsHintSuffix: ".",mcpHttpRemoteDisabledHint: "Uzaqdan giriş deaktiv olduqda icazə siyahıları lazım deyil.",mcpHttpUnsavedChangesHint: "Yuxarıdakı konfiqurasiya hələ yadda saxlanılmayıb; işləyən xidmət dərhal dəyişməyəcək.",- mcpHttpSaveHint: "Yadda saxlama xidməti başladır və ya yenidən başladır və aşağıdakı əlaqə təfərrüatlarını yeniləyir.",- mcpHttpReload: "Yenidən yüklə",- mcpHttpSaveAndStart: "Yadda saxla və xidməti başlat",+ mcpHttpSaveHint: "Yadda saxlama keçidə uyğun olaraq xidməti başladır, yenidən başladır və ya dayandırır və aşağıdakı əlaqə təfərrüatlarını yeniləyir.",+ mcpHttpApply: "Yadda saxla və tətbiq et",mcpHttpDisabledHint: "Dinləmə ünvanını, uzaqdan giriş icazə siyahılarını və müştəri əlaqəsi təfərrüatlarını tənzimləmək üçün xidməti aktivləşdirin.",- mcpHttpSaveAndStop: "Yadda saxla və xidməti dayandır",mcpHttpConnectionInfoTitle: "Aktiv müştəri əlaqəsinin təfərrüatları",mcpHttpServiceNotRunning: "Xidmət işləmir",mcpHttpRunningConfigBadge: "İşləyən konfiqurasiya",diff --git a/apps/desktop/src/i18n/locales/en.ts b/apps/desktop/src/i18n/locales/en.tsindex e988222a1e..6aa3554b74 100644--- a/apps/desktop/src/i18n/locales/en.ts+++ b/apps/desktop/src/i18n/locales/en.ts@@ -8834,7 +8834,7 @@ export default {mcpHttpReloadStatus: "Reload status",mcpHttpServiceTitle: "Streamable HTTP service",mcpHttpStatusLabelRunning: "Running",- mcpHttpStatusLabelPending: "Pending configuration",+ mcpHttpStatusLabelNotRunning: "Not running",mcpHttpServiceDescription: "Off by default. When enabled, DBX Desktop hosts the service; the configuration above is applied to the actual listening service only after saving.",mcpHttpListenerTitle: "Listener configuration",mcpHttpListenerHintPrefix: "We recommend keeping ",@@ -8853,11 +8853,9 @@ export default {mcpHttpOriginsHintSuffix: ".",mcpHttpRemoteDisabledHint: "While remote access is off, the allowlists are not needed.",mcpHttpUnsavedChangesHint: "The configuration above is not saved yet; the running service will not change immediately.",- mcpHttpSaveHint: "Saving starts or restarts the service and updates the connection details below.",- mcpHttpReload: "Reload",- mcpHttpSaveAndStart: "Save and start service",+ mcpHttpSaveHint: "Saving starts, restarts, or stops the service according to the toggle and updates the connection details below.",+ mcpHttpApply: "Save and apply",mcpHttpDisabledHint: "Enable the service to configure the listen address, remote access allowlists, and client connection details.",- mcpHttpSaveAndStop: "Save and stop service",mcpHttpConnectionInfoTitle: "Active client connection details",mcpHttpServiceNotRunning: "The service is not running",mcpHttpRunningConfigBadge: "Running config",diff --git a/apps/desktop/src/i18n/locales/es.ts b/apps/desktop/src/i18n/locales/es.tsindex 2c29e5d46d..809a8a5871 100644--- a/apps/desktop/src/i18n/locales/es.ts+++ b/apps/desktop/src/i18n/locales/es.ts@@ -8143,7 +8143,7 @@ export default withEnglishFallback({mcpHttpReloadStatus: "Recargar estado",mcpHttpServiceTitle: "Servicio Streamable HTTP",mcpHttpStatusLabelRunning: "En ejecución",- mcpHttpStatusLabelPending: "Pendiente de aplicar",+ mcpHttpStatusLabelNotRunning: "No ejecutándose",mcpHttpServiceDescription: "Desactivado por defecto. Al activarlo, DBX Desktop aloja el servicio; la configuración de arriba se aplica al servicio de escucha real solo después de guardar.",mcpHttpListenerTitle: "Configuración de escucha",mcpHttpListenerHintPrefix: "Se recomienda mantener ",@@ -8162,11 +8162,9 @@ export default withEnglishFallback({mcpHttpOriginsHintSuffix: ".",mcpHttpRemoteDisabledHint: "Con el acceso remoto desactivado, las listas blancas no son necesarias.",mcpHttpUnsavedChangesHint: "La configuración de arriba aún no se ha guardado; el servicio en ejecución no cambiará de inmediato.",- mcpHttpSaveHint: "Al guardar se inicia o reinicia el servicio y se actualiza la información de conexión de abajo.",- mcpHttpReload: "Recargar",- mcpHttpSaveAndStart: "Guardar e iniciar servicio",+ mcpHttpSaveHint: "Al guardar, el servicio se inicia, reinicia o detiene según el interruptor y se actualiza la información de conexión de abajo.",+ mcpHttpApply: "Guardar y aplicar",mcpHttpDisabledHint: "Activa el servicio para configurar la dirección de escucha, las listas blancas de acceso remoto y la información de conexión del cliente.",- mcpHttpSaveAndStop: "Guardar y detener servicio",mcpHttpConnectionInfoTitle: "Información de conexión del cliente aplicada",mcpHttpServiceNotRunning: "El servicio no está en ejecución",mcpHttpRunningConfigBadge: "Configuración en ejecución",diff --git a/apps/desktop/src/i18n/locales/it.ts b/apps/desktop/src/i18n/locales/it.tsindex c9927e707f..057c3b9e02 100644--- a/apps/desktop/src/i18n/locales/it.ts+++ b/apps/desktop/src/i18n/locales/it.ts@@ -8068,7 +8068,7 @@ export default withEnglishFallback({mcpHttpReloadStatus: "Ricarica stato",mcpHttpServiceTitle: "Servizio Streamable HTTP",mcpHttpStatusLabelRunning: "In esecuzione",- mcpHttpStatusLabelPending: "In attesa di applicazione",+ mcpHttpStatusLabelNotRunning: "Non in esecuzione",mcpHttpServiceDescription: "Disattivato per impostazione predefinita. Se attivato, DBX Desktop ospita il servizio; la configurazione sopra viene applicata al servizio in ascolto solo dopo il salvataggio.",mcpHttpListenerTitle: "Configurazione di ascolto",mcpHttpListenerHintPrefix: "Si consiglia di mantenere ",@@ -8087,11 +8087,9 @@ export default withEnglishFallback({mcpHttpOriginsHintSuffix: ".",mcpHttpRemoteDisabledHint: "Con l'accesso remoto disattivato, gli elenchi consentiti non sono necessari.",mcpHttpUnsavedChangesHint: "La configurazione sopra non è ancora salvata; il servizio in esecuzione non cambierà subito.",- mcpHttpSaveHint: "Il salvataggio avvia o riavvia il servizio e aggiorna le informazioni di connessione sotto.",- mcpHttpReload: "Ricarica",- mcpHttpSaveAndStart: "Salva e avvia servizio",+ mcpHttpSaveHint: "Il salvataggio avvia, riavvia o arresta il servizio in base all'interruttore e aggiorna le informazioni di connessione sotto.",+ mcpHttpApply: "Salva e applica",mcpHttpDisabledHint: "Attiva il servizio per configurare indirizzo di ascolto, elenchi di accesso remoto e informazioni di connessione del client.",- mcpHttpSaveAndStop: "Salva e ferma servizio",mcpHttpConnectionInfoTitle: "Informazioni di connessione del client applicate",mcpHttpServiceNotRunning: "Il servizio non è in esecuzione",mcpHttpRunningConfigBadge: "Configurazione in esecuzione",diff --git a/apps/desktop/src/i18n/locales/ja.ts b/apps/desktop/src/i18n/locales/ja.tsindex 79b3342e2a..302911cfb8 100644--- a/apps/desktop/src/i18n/locales/ja.ts+++ b/apps/desktop/src/i18n/locales/ja.ts@@ -8065,7 +8065,7 @@ export default withEnglishFallback({mcpHttpReloadStatus: "状態を再読み込み",mcpHttpServiceTitle: "Streamable HTTP サービス",mcpHttpStatusLabelRunning: "実行中",- mcpHttpStatusLabelPending: "設定待ち",+ mcpHttpStatusLabelNotRunning: "未実行",mcpHttpServiceDescription: "既定では無効です。有効にすると DBX Desktop がサービスをホストし、保存後には上記の設定が実際のリスニングサービスに適用されます。",mcpHttpListenerTitle: "リスニング設定",mcpHttpListenerHintPrefix: "「",@@ -8084,11 +8084,9 @@ export default withEnglishFallback({mcpHttpOriginsHintSuffix: ")。",mcpHttpRemoteDisabledHint: "リモートアクセスが無効の場合、ホワイトリストの設定は不要です。",mcpHttpUnsavedChangesHint: "上記の設定は未保存のため、実行中のサービスはすぐには変更されません。",- mcpHttpSaveHint: "保存するとサービスを開始または再起動し、下記の接続情報を更新します。",- mcpHttpReload: "再読み込み",- mcpHttpSaveAndStart: "保存してサービスを開始",+ mcpHttpSaveHint: "保存するとトグルの状態に応じてサービスを開始、再起動、または停止し、下記の接続情報を更新します。",+ mcpHttpApply: "保存して適用",mcpHttpDisabledHint: "サービスを有効にすると、リスニングアドレス、リモートアクセスのホワイトリスト、クライアント接続情報を設定できます。",- mcpHttpSaveAndStop: "保存してサービスを停止",mcpHttpConnectionInfoTitle: "適用済みのクライアント接続情報",mcpHttpServiceNotRunning: "サービスは実行されていません",mcpHttpRunningConfigBadge: "実行中の設定",diff --git a/apps/desktop/src/i18n/locales/ko.ts b/apps/desktop/src/i18n/locales/ko.tsindex 9912182de8..db13a10e59 100644--- a/apps/desktop/src/i18n/locales/ko.ts+++ b/apps/desktop/src/i18n/locales/ko.ts@@ -7852,7 +7852,7 @@ export default withEnglishFallback({mcpHttpReloadStatus: "상태 다시 불러오기",mcpHttpServiceTitle: "Streamable HTTP 서비스",mcpHttpStatusLabelRunning: "실행 중",- mcpHttpStatusLabelPending: "적용 대기 중",+ mcpHttpStatusLabelNotRunning: "실행되지 않음",mcpHttpServiceDescription: "기본적으로 꺼져 있습니다. 활성화하면 DBX Desktop이 서비스를 호스팅하며, 저장 후에야 위 설정이 실제 수신 서비스에 적용됩니다.",mcpHttpListenerTitle: "수신 설정",mcpHttpListenerHintPrefix: "",@@ -7871,11 +7871,9 @@ export default withEnglishFallback({mcpHttpOriginsHintSuffix: ").",mcpHttpRemoteDisabledHint: "원격 접근이 꺼져 있으면 화이트리스트를 구성할 필요가 없습니다.",mcpHttpUnsavedChangesHint: "위 설정이 아직 저장되지 않아 실행 중인 서비스는 즉시 변경되지 않습니다.",- mcpHttpSaveHint: "저장하면 서비스를 시작하거나 재시작하고 아래 접속 정보를 갱신합니다.",- mcpHttpReload: "다시 불러오기",- mcpHttpSaveAndStart: "저장하고 서비스 시작",+ mcpHttpSaveHint: "저장하면 토글 상태에 따라 서비스를 시작, 재시작 또는 중지하고 아래 접속 정보를 갱신합니다.",+ mcpHttpApply: "저장하고 적용",mcpHttpDisabledHint: "서비스를 활성화하면 수신 주소, 원격 접근 화이트리스트, 클라이언트 접속 정보를 구성할 수 있습니다.",- mcpHttpSaveAndStop: "저장하고 서비스 중지",mcpHttpConnectionInfoTitle: "적용된 클라이언트 접속 정보",mcpHttpServiceNotRunning: "서비스가 실행 중이 아닙니다",mcpHttpRunningConfigBadge: "실행 설정",diff --git a/apps/desktop/src/i18n/locales/pt-BR.ts b/apps/desktop/src/i18n/locales/pt-BR.tsindex f0a7665ea4..3735f58f1c 100644--- a/apps/desktop/src/i18n/locales/pt-BR.ts+++ b/apps/desktop/src/i18n/locales/pt-BR.ts@@ -8069,7 +8069,7 @@ export default withEnglishFallback({mcpHttpReloadStatus: "Recarregar status",mcpHttpServiceTitle: "Serviço Streamable HTTP",mcpHttpStatusLabelRunning: "Em execução",- mcpHttpStatusLabelPending: "Pendente de aplicação",+ mcpHttpStatusLabelNotRunning: "Não está em execução",mcpHttpServiceDescription: "Desativado por padrão. Quando ativado, o DBX Desktop hospeda o serviço; a configuração acima só é aplicada ao serviço de escuta real após salvar.",mcpHttpListenerTitle: "Configuração de escuta",mcpHttpListenerHintPrefix: "Recomendamos manter ",@@ -8088,11 +8088,9 @@ export default withEnglishFallback({mcpHttpOriginsHintSuffix: ".",mcpHttpRemoteDisabledHint: "Com o acesso remoto desativado, as listas de permissão não são necessárias.",mcpHttpUnsavedChangesHint: "A configuração acima ainda não foi salva; o serviço em execução não mudará imediatamente.",- mcpHttpSaveHint: "Ao salvar, o serviço é iniciado ou reiniciado e as informações de conexão abaixo são atualizadas.",- mcpHttpReload: "Recarregar",- mcpHttpSaveAndStart: "Salvar e iniciar serviço",+ mcpHttpSaveHint: "Ao salvar, o serviço é iniciado, reiniciado ou parado conforme o interruptor, e as informações de conexão abaixo são atualizadas.",+ mcpHttpApply: "Salvar e aplicar",mcpHttpDisabledHint: "Ative o serviço para configurar endereço de escuta, listas de acesso remoto e informações de conexão do cliente.",- mcpHttpSaveAndStop: "Salvar e parar serviço",mcpHttpConnectionInfoTitle: "Informações de conexão do cliente em vigor",mcpHttpServiceNotRunning: "O serviço não está em execução",mcpHttpRunningConfigBadge: "Configuração em execução",diff --git a/apps/desktop/src/i18n/locales/ru.ts b/apps/desktop/src/i18n/locales/ru.tsindex 15d81d3cdb..82899f403c 100644--- a/apps/desktop/src/i18n/locales/ru.ts+++ b/apps/desktop/src/i18n/locales/ru.ts@@ -9348,7 +9348,7 @@ export default withEnglishFallback({mcpHttpReloadStatus: "Состояние перезагрузки",mcpHttpServiceTitle: "Служба Streamable HTTP",mcpHttpStatusLabelRunning: "Работает",- mcpHttpStatusLabelPending: "Ожидает настройки",+ mcpHttpStatusLabelNotRunning: "Не запущено",mcpHttpServiceDescription: "По умолчанию отключена. При включении DBX Desktop размещает службу; приведённая выше конфигурация применяется к фактической службе прослушивания только после сохранения.",mcpHttpListenerTitle: "Конфигурация прослушивания",mcpHttpListenerHintPrefix: "Рекомендуем оставить ",@@ -9367,11 +9367,9 @@ export default withEnglishFallback({mcpHttpOriginsHintSuffix: ".",mcpHttpRemoteDisabledHint: "Пока удалённый доступ отключён, списки разрешённых не нужны.",mcpHttpUnsavedChangesHint: "Приведённая выше конфигурация ещё не сохранена; работающая служба не изменится немедленно.",- mcpHttpSaveHint: "Сохранение запускает или перезапускает службу и обновляет сведения о подключении ниже.",- mcpHttpReload: "Перезагрузить",- mcpHttpSaveAndStart: "Сохранить и запустить службу",+ mcpHttpSaveHint: "Сохранение запускает, перезапускает или останавливает службу в соответствии с переключателем и обновляет сведения о подключении ниже.",+ mcpHttpApply: "Сохранить и применить",mcpHttpDisabledHint: "Включите службу, чтобы настроить адрес прослушивания, списки разрешённых для удалённого доступа и сведения о подключении клиента.",- mcpHttpSaveAndStop: "Сохранить и остановить службу",mcpHttpConnectionInfoTitle: "Сведения о подключении активного клиента",mcpHttpServiceNotRunning: "Служба не запущена",mcpHttpRunningConfigBadge: "Работающая конфигурация",diff --git a/apps/desktop/src/i18n/locales/tr.ts b/apps/desktop/src/i18n/locales/tr.tsindex 4da500bf4d..cb26a868b8 100644--- a/apps/desktop/src/i18n/locales/tr.ts+++ b/apps/desktop/src/i18n/locales/tr.ts@@ -8048,7 +8048,7 @@ export default withEnglishFallback({mcpHttpReloadStatus: "Durumu yeniden yükle",mcpHttpServiceTitle: "Streamable HTTP servisi",mcpHttpStatusLabelRunning: "Çalışıyor",- mcpHttpStatusLabelPending: "Yapılandırma bekliyor",+ mcpHttpStatusLabelNotRunning: "Çalışmıyor",mcpHttpServiceDescription: "Varsayılan olarak kapalı. Etkinleştirildiğinde servisi DBX Masaüstü barındırır; yukarıdaki yapılandırma yalnızca kaydedildikten sonra çalışan servise uygulanır.",mcpHttpListenerTitle: "Dinleyici yapılandırması",mcpHttpListenerHintPrefix: "Şunu korumanızı öneririz: ",@@ -8067,11 +8067,9 @@ export default withEnglishFallback({mcpHttpOriginsHintSuffix: ".",mcpHttpRemoteDisabledHint: "Uzaktan erişim kapalıyken izin listelerine gerek yoktur.",mcpHttpUnsavedChangesHint: "Yukarıdaki yapılandırma henüz kaydedilmedi; çalışan servis hemen değişmeyecek.",- mcpHttpSaveHint: "Kaydetmek servisi başlatır veya yeniden başlatır ve aşağıdaki bağlantı ayrıntılarını günceller.",- mcpHttpReload: "Yeniden yükle",- mcpHttpSaveAndStart: "Kaydet ve servisi başlat",+ mcpHttpSaveHint: "Kaydetmek, anahtara göre servisi başlatır, yeniden başlatır veya durdurur ve aşağıdaki bağlantı ayrıntılarını günceller.",+ mcpHttpApply: "Kaydet ve uygula",mcpHttpDisabledHint: "Dinleme adresini, uzaktan erişim izin listelerini ve istemci bağlantı ayrıntılarını yapılandırmak için servisi etkinleştirin.",- mcpHttpSaveAndStop: "Kaydet ve servisi durdur",mcpHttpConnectionInfoTitle: "Etkin istemci bağlantı ayrıntıları",mcpHttpServiceNotRunning: "Servis çalışmıyor",mcpHttpRunningConfigBadge: "Çalışan yapılandırma",diff --git a/apps/desktop/src/i18n/locales/zh-CN.ts b/apps/desktop/src/i18n/locales/zh-CN.tsindex ca989e83ae..1aa44ce536 100644--- a/apps/desktop/src/i18n/locales/zh-CN.ts+++ b/apps/desktop/src/i18n/locales/zh-CN.ts@@ -8800,7 +8800,7 @@ export default withEnglishFallback({mcpHttpReloadStatus: "重新加载状态",mcpHttpServiceTitle: "Streamable HTTP 服务",mcpHttpStatusLabelRunning: "运行中",- mcpHttpStatusLabelPending: "待应用配置",+ mcpHttpStatusLabelNotRunning: "未运行",mcpHttpServiceDescription: "默认关闭。启用后由 DBX Desktop 托管服务;保存后才会将上方配置应用到实际监听服务。",mcpHttpListenerTitle: "监听配置",mcpHttpListenerHintPrefix: "推荐保留 ",@@ -8819,11 +8819,9 @@ export default withEnglishFallback({mcpHttpOriginsHintSuffix: "。",mcpHttpRemoteDisabledHint: "未开启远程访问时,白名单无需配置。",mcpHttpUnsavedChangesHint: "上方配置尚未保存,当前运行服务不会立即改变。",- mcpHttpSaveHint: "保存后会启动或重启服务,并更新下方接入信息。",- mcpHttpReload: "重新加载",- mcpHttpSaveAndStart: "保存并启动服务",+ mcpHttpSaveHint: "保存后会根据开关状态启动、重启或停止服务,并更新下方接入信息。",+ mcpHttpApply: "保存并应用",mcpHttpDisabledHint: "启用服务后可配置监听地址、远程访问白名单和客户端接入信息。",- mcpHttpSaveAndStop: "保存并停止服务",mcpHttpConnectionInfoTitle: "已生效的客户端接入信息",mcpHttpServiceNotRunning: "服务当前未运行",mcpHttpRunningConfigBadge: "运行配置",diff --git a/apps/desktop/src/i18n/locales/zh-TW.ts b/apps/desktop/src/i18n/locales/zh-TW.tsindex 960470dd9d..a78d68feed 100644--- a/apps/desktop/src/i18n/locales/zh-TW.ts+++ b/apps/desktop/src/i18n/locales/zh-TW.ts@@ -7431,7 +7431,7 @@ export default withEnglishFallback({mcpHttpReloadStatus: "重新載入狀態",mcpHttpServiceTitle: "Streamable HTTP 服務",mcpHttpStatusLabelRunning: "執行中",- mcpHttpStatusLabelPending: "待套用設定",+ mcpHttpStatusLabelNotRunning: "未執行",mcpHttpServiceDescription: "預設關閉。啟用後由 DBX Desktop 託管服務;儲存後才會將上方設定套用到實際監聽服務。",mcpHttpListenerTitle: "監聽設定",mcpHttpListenerHintPrefix: "建議保留 ",@@ -7450,11 +7450,9 @@ export default withEnglishFallback({mcpHttpOriginsHintSuffix: "。",mcpHttpRemoteDisabledHint: "未開啟遠端存取時,白名單無需設定。",mcpHttpUnsavedChangesHint: "上方設定尚未儲存,目前執行服務不會立即改變。",- mcpHttpSaveHint: "儲存後會啟動或重新啟動服務,並更新下方接入資訊。",- mcpHttpReload: "重新載入",- mcpHttpSaveAndStart: "儲存並啟動服務",+ mcpHttpSaveHint: "儲存後會依開關狀態啟動、重新啟動或停止服務,並更新下方接入資訊。",+ mcpHttpApply: "儲存並套用",mcpHttpDisabledHint: "啟用服務後可設定監聽位址、遠端存取白名單和用戶端接入資訊。",- mcpHttpSaveAndStop: "儲存並停止服務",mcpHttpConnectionInfoTitle: "已生效的用戶端接入資訊",mcpHttpServiceNotRunning: "服務目前未執行",mcpHttpRunningConfigBadge: "執行設定",diff --git a/crates/dbx-mcp/src/http_auth.rs b/crates/dbx-mcp/src/http_auth.rsindex 908ca140a4..53ce38c9fa 100644--- a/crates/dbx-mcp/src/http_auth.rs+++ b/crates/dbx-mcp/src/http_auth.rs@@ -326,6 +326,7 @@ mod tests {assert!(!auth.host_is_allowed(&uri, &headers));assert!(parse_host_rule("https://dbx.example.test").is_err());assert!(parse_host_rule("[email protected]:4224").is_err());+ assert!(parse_host_rule("[::1]").is_ok());}#[test]diff --git a/crates/dbx-mcp/src/runtime.rs b/crates/dbx-mcp/src/runtime.rsindex 27edd94d53..7bc0a82119 100644--- a/crates/dbx-mcp/src/runtime.rs+++ b/crates/dbx-mcp/src/runtime.rs@@ -108,9 +108,13 @@ impl RuntimeConfig {}let token = http_token_from_environment()?;- let auth = HttpAuth::new(token, allowed_origins.clone(), is_loopback)?;- let allowed_hosts =- if is_loopback { vec!["localhost".into(), "127.0.0.1".into(), "::1".into()] } else { allowed_hosts };+ let allowed_hosts = if is_loopback {+ // HTTP Host authorities require brackets around IPv6 literals.+ vec!["localhost".into(), "127.0.0.1".into(), "[::1]".into()]+ } else {+ allowed_hosts+ };+ let auth = HttpAuth::new_with_hosts(Some(token), allowed_hosts.clone(), allowed_origins.clone(), is_loopback)?;Ok(Self { transport, http: Some(HttpRuntimeConfig { bind_addr, path, auth, allowed_hosts }) })}diff --git a/docs/content/docs/mcp.cn.mdx b/docs/content/docs/mcp.cn.mdxindex b64cdda195..805a6bf6af 100644--- a/docs/content/docs/mcp.cn.mdx+++ b/docs/content/docs/mcp.cn.mdx@@ -255,7 +255,7 @@ Desktop 可以选择直接托管 Streamable HTTP MCP 服务。该服务**默认本机 MCP 客户端的接入步骤:1. 打开 **设置 → MCP → HTTP 服务**,开启 **Streamable HTTP 服务**。除非确实需要让其他设备访问,否则保持默认本机回环地址。-2. 点击 **保存并启动服务**。修改地址、端口或路径后保存,会通过重启服务来应用新配置。+2. 点击 **保存并应用**。该按钮会保存配置,并根据开关状态启动、重启或停止服务;修改地址、端口或路径时会自动重启服务。3. 将页面展示的服务地址和 Bearer Token 复制到 MCP 客户端。不同客户端的字段名称可能不同,但核心配置如下:@@ -383,7 +383,7 @@ DBX 在 **设置 → MCP** 中保存一份权威策略,并在每次请求时<Accordion title="npm 没有安装当前平台包">不要使用 `--no-optional`,重新安装 `@dbx-app/mcp-server`,并用 `node -p 'process.platform + "-" + process.arch'` 检查平台。Alpine Linux 默认使用 musl,目前不在 Linux 发布包支持范围内。</Accordion><Accordion title="找不到 dbx.db">将 `DBX_DATA_DIR` 设置为包含 `dbx.db` 的目录。Windows 便携版通常是 `DBX.exe` 旁边的 `data` 目录。</Accordion><Accordion title="提示 DBX 未运行">只有 `dbx_open_table` 和 `dbx_execute_and_show` 需要桌面端运行;本地查询工具可以在 DBX 关闭时执行。</Accordion>- <Accordion title="Desktop HTTP 客户端提示 ERR_CONNECTION_REFUSED">进入 **设置 → MCP → HTTP 服务**,确认服务已开启并点击 **保存并启动服务**。客户端应使用页面展示的地址、路径和当前 Bearer Token。默认的 `127.0.0.1` 只接受同一台电脑上的连接。</Accordion>+ <Accordion title="Desktop HTTP 客户端提示 ERR_CONNECTION_REFUSED">进入 **设置 → MCP → HTTP 服务**,确认服务已开启并点击 **保存并应用**。客户端应使用页面展示的地址、路径和当前 Bearer Token。默认的 `127.0.0.1` 只接受同一台电脑上的连接。</Accordion><Accordion title="Desktop 提示 HTTP 地址已被占用">已有其他进程监听了所选地址和端口。请在 **设置 → MCP → HTTP 服务** 中改用未被占用的端口,再保存配置以重启服务。不要让两个 DBX Desktop 实例使用相同 HTTP 端点。</Accordion><Accordion title="请求返回 DATABASE_OUT_OF_SCOPE">该连接虽然已暴露给 MCP,但请求的数据库不在它的 MCP 数据库范围内。请在 **设置 → MCP** 中添加精确的数据库名称,或在合适时将该连接设为全部数据库。指定范围时,应先调用 `dbx_list_databases`,再使用返回的名称。</Accordion><Accordion title="之前可见的工具现在被拒绝">该工具已不在 **设置 → MCP** 的选中范围内,或当前权限策略不允许它。修改工具 allowlist 后请刷新 MCP 客户端的工具列表;服务端同样会拒绝缓存的旧工具调用。</Accordion>diff --git a/docs/content/docs/mcp.mdx b/docs/content/docs/mcp.mdxindex 4ea5bf8460..b6dcd1304e 100644--- a/docs/content/docs/mcp.mdx+++ b/docs/content/docs/mcp.mdx@@ -255,7 +255,7 @@ Desktop can optionally host its own Streamable HTTP MCP endpoint. It is **off byTo connect a local MCP client:1. Open **Settings → MCP → HTTP Service**, turn on **Streamable HTTP Service**, and keep the default loopback address unless another device genuinely needs access.-2. Click **Save and start service**. Saving a changed address, port, or path applies the configuration by restarting the service.+2. Click **Save and apply**. The button saves the configuration and starts, restarts, or stops the service according to the toggle; changing the address, port, or path restarts the service automatically.3. Copy the displayed service address and bearer token into the MCP client.Use the generated values in an HTTP-capable MCP client. The transport-specific field names differ between clients, but the essential configuration is:@@ -383,7 +383,7 @@ Updated servers do not let `DBX_MCP_ALLOW_WRITES` or `DBX_MCP_ALLOW_DANGEROUS_SQ<Accordion title="The optional platform package was not installed">Reinstall without `--no-optional`, then verify the platform with `node -p 'process.platform + "-" + process.arch'`. The current platform must appear in the supported platform table.</Accordion><Accordion title="dbx.db cannot be found">Set `DBX_DATA_DIR` to the folder containing `dbx.db`. For Windows portable builds, this is normally the `data` folder beside `DBX.exe`.</Accordion><Accordion title="DBX is not running">Only `dbx_open_table` and `dbx_execute_and_show` require the desktop app. Local query tools can run without DBX open.</Accordion>- <Accordion title="A Desktop HTTP client gets ERR_CONNECTION_REFUSED">In **Settings → MCP → HTTP Service**, turn on the service and click **Save and start service**. Confirm that the client uses the displayed address, path, and current bearer token. The default `127.0.0.1` address accepts connections only from the same computer.</Accordion>+ <Accordion title="A Desktop HTTP client gets ERR_CONNECTION_REFUSED">In **Settings → MCP → HTTP Service**, turn on the service and click **Save and apply**. Confirm that the client uses the displayed address, path, and current bearer token. The default `127.0.0.1` address accepts connections only from the same computer.</Accordion><Accordion title="Desktop says the HTTP address is already in use">Another process is listening on the selected address and port. Choose an unused port in **Settings → MCP → HTTP Service**, then save the configuration to restart the service. Do not run two DBX Desktop instances with the same HTTP endpoint.</Accordion><Accordion title="A request returns DATABASE_OUT_OF_SCOPE">The connection is exposed, but the requested database is not in its MCP database scope. Add the exact database name in **Settings → MCP**, or change that connection's scope to all databases if appropriate. For a specified scope, call `dbx_list_databases` first and then use one of the returned names.</Accordion><Accordion title="A previously visible tool is rejected">The tool is no longer selected in **Settings → MCP** or the current policy does not permit it. Refresh the MCP client's tool list after changing the allowlist; the server rejects stale tool calls as well.</Accordion>diff --git a/docs/mcp-management-layout-redesign.md b/docs/mcp-management-layout-redesign.mdindex 4453d89bc2..cb264c2eaa 100644--- a/docs/mcp-management-layout-redesign.md+++ b/docs/mcp-management-layout-redesign.md@@ -114,7 +114,7 @@ Tab 图标使用 `ShieldCheck`,说明文本保持简短:查询超时等运行级设置也放在“接入方式”下的“运行参数”区域;权限管理只负责资源范围、数据库范围、操作权限和工具可用性。-HTTP 的保存动作固定在配置内容底部,使用“保存并启动/保存并停止”;不要让每个字段单独触发保存。+HTTP 的保存动作固定在配置内容底部,使用单一的“保存并应用”按钮;它根据启用开关启动、重启或停止服务,不让每个字段单独触发保存。### 客户端配置的归属diff --git a/src-tauri/src/commands/mcp_http_server.rs b/src-tauri/src/commands/mcp_http_server.rsindex d24ee01392..676e2435e4 100644--- a/src-tauri/src/commands/mcp_http_server.rs+++ b/src-tauri/src/commands/mcp_http_server.rs@@ -217,11 +217,22 @@ impl McpHttpServerState {let ip = settings.host.parse::<IpAddr>().map_err(|_| "MCP HTTP host must be an IP address".to_string())?;let bind_addr = SocketAddr::new(ip, settings.port);let allowed_hosts = if ip.is_loopback() {- vec!["localhost".to_string(), "127.0.0.1".to_string(), "::1".to_string()]+ // IPv6 authorities must be bracketed when they are parsed as HTTP+ // Host rules. The parser still normalizes the host to `::1` for+ // request matching, so this accepts both loopback address forms.+ vec!["localhost".to_string(), "127.0.0.1".to_string(), "[::1]".to_string()]} else {settings.allowed_hosts.clone()};- let auth = HttpAuth::new(token, settings.allowed_origins.clone(), ip.is_loopback())?;+ // Validate the Host rules before replacing the current listener. This+ // keeps invalid configuration errors on the save/start call instead+ // of reporting success and failing later inside the server task.+ let auth = HttpAuth::new_with_hosts(+ Some(token),+ allowed_hosts.clone(),+ settings.allowed_origins.clone(),+ ip.is_loopback(),+ )?;Ok(HttpRuntimeConfig::new(bind_addr, settings.path.clone(), auth, allowed_hosts))}