Skip to content

Build your personal knowledge base with Trilium Notes

feat(options/llm): improve layout for MCP card

Elian Doran5995ec468d09
diff --git a/apps/client/src/translations/en/translation.json b/apps/client/src/translations/en/translation.json
index 5605e5bed9..9ab342229f 100644
--- a/apps/client/src/translations/en/translation.json
+++ b/apps/client/src/translations/en/translation.json
@@ -2336,10 +2336,10 @@
"api_key_placeholder": "Enter your API key",
"cancel": "Cancel",
"mcp_title": "MCP (Model Context Protocol)",
- "mcp_enabled": "Enable MCP server",
+ "mcp_enabled": "MCP server",
"mcp_enabled_description": "Expose a Model Context Protocol (MCP) endpoint so that AI coding assistants (e.g. Claude Code, GitHub Copilot) can read and modify your notes. The endpoint is only accessible from localhost.",
"mcp_endpoint_title": "Endpoint URL",
- "mcp_endpoint_description": "Add this URL to your AI assistant's MCP configuration:",
+ "mcp_endpoint_description": "Add this URL to your AI assistant's MCP configuration",
"tools": {
"search_notes": "Search notes",
"get_note": "Get note",
diff --git a/apps/client/src/widgets/type_widgets/options/llm.tsx b/apps/client/src/widgets/type_widgets/options/llm.tsx
index 1c24c6abfa..d4ed23fb9b 100644
--- a/apps/client/src/widgets/type_widgets/options/llm.tsx
+++ b/apps/client/src/widgets/type_widgets/options/llm.tsx
@@ -4,8 +4,9 @@ import dialog from "../../../services/dialog";
import { t } from "../../../services/i18n";
import ActionButton from "../../react/ActionButton";
import Button from "../../react/Button";
-import FormCheckbox from "../../react/FormCheckbox";
+import FormToggle from "../../react/FormToggle";
import { useTriliumOption, useTriliumOptionBool } from "../../react/hooks";
+import OptionsRow from "./components/OptionsRow";
import OptionsSection from "./components/OptionsSection";
import AddProviderModal, { type LlmProviderConfig, PROVIDER_TYPES } from "./llm/AddProviderModal";
@@ -77,26 +78,23 @@ function McpSettings() {
return (
<OptionsSection title={t("llm.mcp_title")}>
- <p className="form-text">{t("llm.mcp_enabled_description")}</p>
- <FormCheckbox
- name="mcp-enabled"
- label={t("llm.mcp_enabled")}
- currentValue={mcpEnabled}
- onChange={setMcpEnabled}
- />
+ <OptionsRow name="mcp-enabled" label={t("llm.mcp_enabled")} description={t("llm.mcp_enabled_description")}>
+ <FormToggle
+ switchOnName="" switchOffName=""
+ currentValue={mcpEnabled}
+ onChange={setMcpEnabled}
+ />
+ </OptionsRow>
{mcpEnabled && (
- <>
- <hr />
- <h5>{t("llm.mcp_endpoint_title")}</h5>
- <p className="form-text">{t("llm.mcp_endpoint_description")}</p>
+ <OptionsRow name="mcp-endpoint" label={t("llm.mcp_endpoint_title")} description={t("llm.mcp_endpoint_description")}>
<input
type="text"
className="form-control"
value={endpointUrl}
readOnly
/>
- </>
+ </OptionsRow>
)}
</OptionsSection>
);