/** * Install links and commands that add an MCP server to common clients. * * The built-in landing page, `useInstallTargets()` and pages outside the * server, such as a docs site, all build them here so they cannot drift. * This module uses only web-standard globals and does not import React. */ /** Claude Code install target: a terminal command. */ export interface ClaudeCodeInstallTarget { /** Client name, suitable as a tab or button label. */ label: "Claude Code"; /** * `claude mcp add` command for a POSIX shell, with the server URL * single-quoted so shell metacharacters in it are not expanded. */ command: string; } /** Cursor install target: a deep link that opens Cursor's install prompt. */ export interface CursorInstallTarget { /** Client name, suitable as a tab or button label. */ label: "Cursor"; /** `cursor://` link carrying the server URL as base64-encoded JSON. */ deeplink: string; } /** VS Code install target: a deep link that opens VS Code's install prompt. */ export interface VSCodeInstallTarget { /** Client name, suitable as a tab or button label. */ label: "VS Code"; /** `vscode:` link carrying the server name, URL and HTTP transport. */ deeplink: string; } /** VS Code Insiders install target: a deep link to the Insiders build. */ export interface VSCodeInsidersInstallTarget { /** Client name, suitable as a tab or button label. */ label: "VS Code Insiders"; /** `vscode-insiders:` link carrying the server name, URL and transport. */ deeplink: string; } /** ChatGPT install target: manual steps, since ChatGPT has no deep link. */ export interface ChatGPTInstallTarget { /** Client name, suitable as a tab or button label. */ label: "ChatGPT"; /** * Plain-text steps in order, each a short heading, `": "`, and the * instruction. The import step includes the server URL. */ steps: readonly string[]; } /** Manufact Inspector target: a mounted Inspector or the hosted fallback. */ export interface InspectorInstallTarget { /** Tool name, suitable as a tab or button label. */ label: "Manufact Inspector"; /** Inspector URL supplied by the runtime, or the hosted URL with this server prefilled. */ url: string; } /** The server {@link getInstallTargets} builds install targets for. */ export interface InstallTargetServer { /** Absolute URL of the MCP endpoint. */ url: string; /** URL of an available Inspector; omission uses the hosted Manufact Inspector. */ inspectorUrl?: string; /** * Server name. Clients store it lowercased, with characters other than * letters, digits, `-` and `_` replaced by `_`. The built-in landing page * and `useInstallTargets()` pass the server's `title ?? name`. */ name: string; } /** * Install targets for one MCP server, keyed by client. * * Keys are in display order, so `Object.values()` gives Claude Code, Cursor, * VS Code, VS Code Insiders, ChatGPT, then Manufact Inspector. */ export interface InstallTargets { /** Claude Code terminal command. */ claudeCode: ClaudeCodeInstallTarget; /** Cursor deep link. */ cursor: CursorInstallTarget; /** VS Code deep link. */ vscode: VSCodeInstallTarget; /** VS Code Insiders deep link. */ vscodeInsiders: VSCodeInsidersInstallTarget; /** ChatGPT setup steps. */ chatgpt: ChatGPTInstallTarget; /** Mounted Inspector link when supplied, otherwise hosted Manufact Inspector. */ inspector: InspectorInstallTarget; } /** * Build the links and commands that add an MCP server to Claude Code, * Cursor, VS Code, VS Code Insiders, ChatGPT and Manufact Inspector. * * Runs in Node, edge runtimes and browsers. Values are not HTML-escaped: * JSX escapes them, but HTML built as a string must. * A supplied `inspectorUrl` is used as-is; otherwise the Inspector target is * hosted. Inspector availability is never inferred from the endpoint hostname. * * @param server - Endpoint URL and name of the server to install. * @returns One install target per client, in display order. * * @example * ```ts * import { getInstallTargets } from "mcp-use/landing"; * * const install = getInstallTargets({ * url: "https://acme.com/mcp", * name: "acme", * }); * install.claudeCode.command; * // claude mcp add --transport http "acme" 'https://acme.com/mcp' * ``` */ export declare function getInstallTargets(server: InstallTargetServer): InstallTargets;