Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

refactor(frontend): improve MCP settings page layout and clarity (#18501)

p0ny7c4ee0a60151
diff --git a/frontend/src/locales/en-US.json b/frontend/src/locales/en-US.json
index dd6b3e35ae..8d534daa62 100644
--- a/frontend/src/locales/en-US.json
+++ b/frontend/src/locales/en-US.json
@@ -531,14 +531,23 @@
"mcp": {
"title": "MCP Integration",
"description": "Connect AI assistants to Bytebase using the Model Context Protocol.",
+ "auth": {
+ "title": "Authentication Required",
+ "description": "OAuth authentication is required on first connection. Ensure you have appropriate Bytebase permissions."
+ },
+ "general-config": {
+ "title": "Option 1: JSON Configuration"
+ },
+ "quick-start": {
+ "title": "Option 2: CLI Commands",
+ "description": "Alternatively, use one of these CLI commands."
+ },
"setup": {
- "add-to-config": "Add to your MCP configuration",
- "run-command": "Run this command",
- "oauth-note": "On first use, you'll be prompted to authorize access."
+ "add-to-config": "Add this JSON to your MCP client configuration file."
},
"first-prompt": {
"title": "Your First Prompt",
- "description": "Once connected, try asking your AI assistant",
+ "description": "Once connected, try asking your AI assistant:",
"example": "List all projects in my Bytebase instance"
}
},
diff --git a/frontend/src/locales/es-ES.json b/frontend/src/locales/es-ES.json
index db610c5569..070acb8685 100644
--- a/frontend/src/locales/es-ES.json
+++ b/frontend/src/locales/es-ES.json
@@ -531,14 +531,23 @@
"mcp": {
"title": "Integración MCP",
"description": "Conecte asistentes de IA a Bytebase usando el Model Context Protocol.",
+ "auth": {
+ "title": "Autenticación requerida",
+ "description": "Se requiere autenticación OAuth en la primera conexión. Asegúrese de tener los permisos apropiados en Bytebase."
+ },
+ "general-config": {
+ "title": "Opción 1: Configuración JSON"
+ },
+ "quick-start": {
+ "title": "Opción 2: Comandos CLI",
+ "description": "Alternativamente, use uno de estos comandos CLI."
+ },
"setup": {
- "add-to-config": "Agregar a su configuración MCP",
- "run-command": "Ejecute este comando",
- "oauth-note": "En el primer uso, se le pedirá que autorice el acceso."
+ "add-to-config": "Agregue este JSON a su archivo de configuración del cliente MCP."
},
"first-prompt": {
"title": "Tu primer prompt",
- "description": "Una vez conectado, intente preguntar a su asistente de IA",
+ "description": "Una vez conectado, intente preguntar a su asistente de IA:",
"example": "Listar todos los proyectos en mi instancia de Bytebase"
}
},
diff --git a/frontend/src/locales/ja-JP.json b/frontend/src/locales/ja-JP.json
index 635be138e6..c74342bcda 100644
--- a/frontend/src/locales/ja-JP.json
+++ b/frontend/src/locales/ja-JP.json
@@ -531,14 +531,23 @@
"mcp": {
"title": "MCP 統合",
"description": "Model Context Protocol を使用して、AI アシスタントを Bytebase に接続します。",
+ "auth": {
+ "title": "認証が必要",
+ "description": "初回接続時に OAuth 認証が必要です。適切な Bytebase 権限があることを確認してください。"
+ },
+ "general-config": {
+ "title": "方法 1:JSON 設定"
+ },
+ "quick-start": {
+ "title": "方法 2:CLI コマンド",
+ "description": "または、以下の CLI コマンドを使用してください。"
+ },
"setup": {
- "add-to-config": "MCP 設定に追加",
- "run-command": "このコマンドを実行",
- "oauth-note": "初回使用時に、アクセスの承認を求められます。"
+ "add-to-config": "この JSON を MCP クライアント設定ファイルに追加してください。"
},
"first-prompt": {
"title": "最初のプロンプト",
- "description": "接続後、AI アシスタントに聞いてみてください",
+ "description": "接続後、AI アシスタントに聞いてみてください:",
"example": "Bytebase インスタンス内のすべてのプロジェクトをリストする"
}
},
diff --git a/frontend/src/locales/vi-VN.json b/frontend/src/locales/vi-VN.json
index 9899e0c878..17405ce5d8 100644
--- a/frontend/src/locales/vi-VN.json
+++ b/frontend/src/locales/vi-VN.json
@@ -531,14 +531,23 @@
"mcp": {
"title": "Tích hợp MCP",
"description": "Kết nối trợ lý AI với Bytebase bằng Model Context Protocol.",
+ "auth": {
+ "title": "Yêu cầu xác thực",
+ "description": "Xác thực OAuth được yêu cầu khi kết nối lần đầu. Đảm bảo bạn có quyền Bytebase phù hợp."
+ },
+ "general-config": {
+ "title": "Cách 1: Cấu hình JSON"
+ },
+ "quick-start": {
+ "title": "Cách 2: Lệnh CLI",
+ "description": "Hoặc sử dụng một trong các lệnh CLI sau."
+ },
"setup": {
- "add-to-config": "Thêm vào cấu hình MCP",
- "run-command": "Chạy lệnh này",
- "oauth-note": "Khi sử dụng lần đầu, bạn sẽ được yêu cầu cấp quyền truy cập."
+ "add-to-config": "Thêm JSON này vào tệp cấu hình MCP client của bạn."
},
"first-prompt": {
"title": "Prompt đầu tiên của bạn",
- "description": "Sau khi kết nối, hãy thử hỏi trợ lý AI của bạn",
+ "description": "Sau khi kết nối, hãy thử hỏi trợ lý AI của bạn:",
"example": "Liệt kê tất cả các dự án trong phiên bản Bytebase của tôi"
}
},
diff --git a/frontend/src/locales/zh-CN.json b/frontend/src/locales/zh-CN.json
index 1b1e8a2cf2..60a22de8b8 100644
--- a/frontend/src/locales/zh-CN.json
+++ b/frontend/src/locales/zh-CN.json
@@ -531,14 +531,23 @@
"mcp": {
"title": "MCP 集成",
"description": "使用模型上下文协议将 AI 助手连接到 Bytebase。",
+ "auth": {
+ "title": "需要身份验证",
+ "description": "首次连接需要 OAuth 身份验证。请确保您拥有相应的 Bytebase 权限。"
+ },
+ "general-config": {
+ "title": "方式一:JSON 配置"
+ },
+ "quick-start": {
+ "title": "方式二:CLI 命令",
+ "description": "或者使用以下 CLI 命令。"
+ },
"setup": {
- "add-to-config": "添加到您的 MCP 配置",
- "run-command": "运行此命令",
- "oauth-note": "首次使用时,系统会提示您授权访问。"
+ "add-to-config": "将此 JSON 添加到您的 MCP 客户端配置文件。"
},
"first-prompt": {
"title": "您的第一个提示",
- "description": "连接后,尝试向 AI 助手提问",
+ "description": "连接后,尝试向 AI 助手提问:",
"example": "列出我的 Bytebase 实例中的所有项目"
}
},
diff --git a/frontend/src/views/SettingWorkspaceMCP.vue b/frontend/src/views/SettingWorkspaceMCP.vue
index 0f15be0e3e..a0e895b743 100644
--- a/frontend/src/views/SettingWorkspaceMCP.vue
+++ b/frontend/src/views/SettingWorkspaceMCP.vue
@@ -9,15 +9,28 @@
</div>
<!-- Warning if external URL not configured -->
- <MissingExternalURLAttention />
+ <MissingExternalURLAttention />
- <!-- General JSON Config (always visible) -->
+ <!-- Authentication Notice -->
+ <NAlert type="info" :show-icon="true">
+ <template #header>
+ {{ $t("settings.mcp.auth.title") }}
+ </template>
+ {{ $t("settings.mcp.auth.description") }}
+ </NAlert>
+
+ <!-- Section 1: General Config -->
<div class="flex flex-col gap-y-3">
- <div class="flex items-center gap-x-2">
- <span class="text-sm text-control-light">
+ <div class="flex flex-col gap-y-1">
+ <div class="flex items-center gap-x-2">
+ <h3 class="text-base font-medium">
+ {{ $t("settings.mcp.general-config.title") }}
+ </h3>
+ <CopyButton :content="generalConfig" />
+ </div>
+ <p class="text-sm text-control-light">
{{ $t("settings.mcp.setup.add-to-config") }}
- </span>
- <CopyButton :content="generalConfig" />
+ </p>
</div>
<NInput
type="textarea"
@@ -28,46 +41,49 @@
/>
</div>
- <!-- CLI Quick Commands Tabs -->
- <div class="flex flex-col gap-y-2">
- <NTabs type="line" animated>
- <!-- Claude Code -->
+ <!-- Section 2: Quick Start CLI Commands -->
+ <div class="flex flex-col gap-y-3">
+ <div class="flex flex-col gap-y-1">
+ <div class="flex items-center gap-x-2">
+ <h3 class="text-base font-medium">
+ {{ $t("settings.mcp.quick-start.title") }}
+ </h3>
+ <CopyButton :content="activeTabContent" />
+ </div>
+ <p class="text-sm text-control-light">
+ {{ $t("settings.mcp.quick-start.description") }}
+ </p>
+ </div>
+ <NTabs v-model:value="activeTab" type="line" animated>
<NTabPane
v-for="tab in tabs"
:key="tab.id"
:name="tab.id"
:tab="tab.title"
>
- <div class="flex flex-col gap-y-2 pt-3">
- <div class="flex items-center gap-x-2">
- <span class="text-sm text-control-light">
- {{ $t("settings.mcp.setup.run-command") }}
- </span>
- <CopyButton :content="tab.content" />
- </div>
- <NInput
- :value="tab.content"
- readonly
- class="font-mono text-sm"
- />
- </div>
+ <NInput
+ :value="tab.content"
+ readonly
+ class="font-mono text-sm mt-3"
+ />
</NTabPane>
</NTabs>
- <p class="text-sm text-control-light">
- {{ $t("settings.mcp.setup.oauth-note") }}
- </p>
</div>
- <!-- Your First Prompt -->
- <div class="flex flex-col gap-y-1">
- <span class="text-sm text-control-light">
- {{ $t("settings.mcp.first-prompt.title") }}
- </span>
- <div class="flex items-center gap-x-2 text-sm text-control-light">
- {{ $t("settings.mcp.first-prompt.description") }}
- <CopyButton :content="$t('settings.mcp.first-prompt.example')" />
+ <!-- Section 3: Your First Prompt -->
+ <div class="flex flex-col gap-y-3">
+ <div class="flex flex-col gap-y-1">
+ <div class="flex items-center gap-x-2">
+ <h3 class="text-base font-medium">
+ {{ $t("settings.mcp.first-prompt.title") }}
+ </h3>
+ <CopyButton :content="$t('settings.mcp.first-prompt.example')" />
+ </div>
+ <p class="text-sm text-control-light">
+ {{ $t("settings.mcp.first-prompt.description") }}
+ </p>
</div>
- <code class="mt-1 text-sm bg-gray-100 px-3 py-2 rounded">
+ <code class="text-sm bg-gray-100 px-3 py-2 rounded">
{{ $t("settings.mcp.first-prompt.example") }}
</code>
</div>
@@ -75,12 +91,13 @@
</template>
<script lang="ts" setup>
-import { NInput, NTabPane, NTabs } from "naive-ui";
-import { computed } from "vue";
+import { NAlert, NInput, NTabPane, NTabs } from "naive-ui";
+import { computed, ref } from "vue";
import { CopyButton, MissingExternalURLAttention } from "@/components/v2";
import { useActuatorV1Store } from "@/store";
const actuatorStore = useActuatorV1Store();
+const activeTab = ref("claude-code");
const hasExternalUrl = computed(() => {
return !actuatorStore.needConfigureExternalUrl;
@@ -150,4 +167,9 @@ const tabs = computed(
];
}
);
+
+const activeTabContent = computed(() => {
+ const tab = tabs.value.find((t) => t.id === activeTab.value);
+ return tab?.content ?? "";
+});
</script>