"use client"; import { Check, Copy } from "lucide-react"; import Link from "next/link"; import { useState } from "react"; import { Button } from "@/components/ui/button"; import { Label } from "@/components/ui/label"; export function MCPSection() { const backendUrl = process.env.NEXT_PUBLIC_BACKEND_URL || (typeof window !== "undefined" ? window.location.origin : ""); const endpoint = `${backendUrl}/api/v1/mcp/`; const clientConfig = JSON.stringify( { mcpServers: { dograh: { url: endpoint, headers: { "X-API-Key": "YOUR_API_KEY" }, }, }, }, null, 2, ); const claudeCliCommand = `claude mcp add --transport http dograh ${endpoint} \\ --header "X-API-Key: YOUR_API_KEY"`; const [endpointCopied, setEndpointCopied] = useState(false); const [configCopied, setConfigCopied] = useState(false); const [cliCopied, setCliCopied] = useState(false); const handleCopy = async ( value: string, setter: (v: boolean) => void, ) => { await navigator.clipboard.writeText(value); setter(true); setTimeout(() => setter(false), 2000); }; return (
Connect an AI agent (Claude Desktop, Cursor, etc.) to this URL over Streamable HTTP. Requires an API key in the X-API-Key header.{" "} Get your API key
{endpoint}
Run this in your terminal to register Dograh as an MCP server with Claude Code.
{claudeCliCommand}
Paste this into your MCP client's config file (e.g. Claude
Desktop's{" "}
claude_desktop_config.json
) and replace{" "}
YOUR_API_KEY
.
{clientConfig}