"use client"; import { useMemo, useState } from "react"; import { IconCheck, IconChevronDown, IconClipboard, IconPlugConnected, IconCode, IconTools, } from "@tabler/icons-react"; import { Button } from "@kandev/ui/button"; import { Card, CardContent, CardHeader, CardTitle } from "@kandev/ui/card"; import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "@kandev/ui/collapsible"; import { Separator } from "@kandev/ui/separator"; import { SettingsSection } from "@/components/settings/settings-section"; import { getBackendConfig } from "@/lib/config"; import { buildAuggieCliCommand, buildAuggieConfig, buildClaudeCodeCliCommand, buildClaudeCodeConfig, buildCodexCliCommand, buildCodexConfig, buildCopilotCliConfig, buildCursorConfig, buildOpenCodeConfig, } from "@/lib/settings/external-mcp-snippets"; import { EXTERNAL_MCP_TOOL_GROUPS, countExternalMcpTools } from "@/lib/settings/external-mcp-tools"; export function ExternalMcpSettings() { const baseUrl = useMemo(() => getBackendConfig().apiBaseUrl.replace(/\/$/, ""), []); const streamableUrl = `${baseUrl}/mcp`; const sseUrl = `${baseUrl}/mcp/sse`; const [copied, setCopied] = useState(null); function handleCopy(text: string) { if (typeof navigator === "undefined") return; navigator.clipboard .writeText(text) .then(() => { setCopied(text); setTimeout(() => setCopied(null), 2000); }) .catch(() => { // Best-effort: clipboard may be unavailable in non-secure contexts. }); } return (

External MCP

Use this if you want to manage Kandev from coding agents that run outside{" "} Kandev (e.g. Claude Code, Cursor, or Codex on your host), or from{" "} passthrough agents running inside Kandev.
Agents launched inside Kandev in their normal mode already have the Kandev MCP wired in automatically, no setup needed.

} title="Endpoints" description="Loopback-only: requests from anything other than 127.0.0.1 / ::1 are rejected. No authentication is required because the endpoint is only reachable from this machine." > Streamable HTTP

Recommended for Claude Code, Cursor, and Codex.

Server-Sent Events (SSE)

Compatibility transport for older MCP clients.

); } function ToolsPreview() { const [open, setOpen] = useState(false); const total = countExternalMcpTools(); return ( {EXTERNAL_MCP_TOOL_GROUPS.map((group) => (

{group.title}

{group.description}

    {group.tools.map((tool) => (
  • {tool.name} — {tool.description}
  • ))}
))}
); } function SnippetsSection({ streamableUrl, copied, onCopy, }: { streamableUrl: string; copied: string | null; onCopy: (text: string) => void; }) { return ( } title="Configuration snippets" description="Paste these into your agent's global MCP configuration." > ); } function UrlRow({ url, copied, onCopy, }: { url: string; copied: string | null; onCopy: (text: string) => void; }) { const isCopied = copied === url; return (
{url}
); } function SnippetCard({ title, subtitle, snippet, copied, onCopy, extraSnippet, extraSnippetLabel, }: { title: string; subtitle: string; snippet: string; copied: string | null; onCopy: (text: string) => void; extraSnippet?: string; extraSnippetLabel?: string; }) { return ( {title}

{subtitle}

{extraSnippet ? (
{extraSnippetLabel ? (

{extraSnippetLabel}

) : null}
) : null}
); } function SnippetBlock({ snippet, copied, onCopy, }: { snippet: string; copied: string | null; onCopy: (text: string) => void; }) { const isCopied = copied === snippet; return (
        {snippet}
      
); }