/** * Landing-page APIs for MCP server endpoints. * * Exports the hooks a CLI-discovered `landing.tsx` uses to read server data, * the client install links it and other pages can show, and the built-in * HTML page used when a project has no `landing.tsx`. This module does not * import React. * * @packageDocumentation */ export { getInstallTargets } from "./install-targets.js"; export type { ChatGPTInstallTarget, ClaudeCodeInstallTarget, CursorInstallTarget, InspectorInstallTarget, InstallTargets, InstallTargetServer, VSCodeInsidersInstallTarget, VSCodeInstallTarget, } from "./install-targets.js"; export { __setLandingData, __withLandingData, useInstallTargets, usePromptList, useResourceList, useServerInfo, useToolList, } from "./landing-data.js"; export type { LandingData, LandingDataKey, LandingServerInfo, } from "./landing-data.js"; /** A tool shown in the landing page's primitives list. */ export interface LandingPageTool { /** Protocol-facing tool name. */ name: string; /** Optional human-readable tool title. */ title?: string; /** Optional tool description. */ description?: string; } /** A prompt shown in the landing page's primitives list. */ export interface LandingPagePrompt { /** Protocol-facing prompt name. */ name: string; /** Optional human-readable prompt title. */ title?: string; /** Optional prompt description. */ description?: string; } /** A static resource shown in the landing page's primitives list. */ export interface LandingPageResource { /** Resource URI. */ uri: string; /** Optional protocol-facing resource name. */ name?: string; /** Optional human-readable resource title. */ title?: string; /** Optional resource description. */ description?: string; } /** * Document head fields a `landing.tsx` sets with `export const metadata`. * * Every field is optional. A missing field keeps the default the server * derives from its name, title, description, and favicon branding. * * @example * ```tsx * import type { LandingMetadata } from "mcp-use/landing"; * * export const metadata: LandingMetadata = { * title: "Acme for Claude and Cursor", * description: "Connect Acme to your AI client in one step.", * icon: "acme.svg", * image: "og.png", * }; * ``` */ export interface LandingMetadata { /** Page ``, also used for the Open Graph and Twitter titles. */ title?: string; /** Meta description, also used for the Open Graph and Twitter descriptions. */ description?: string; /** * Browser tab icon: an absolute URL, or a path relative to the project's * `public/` directory, such as `"icon.svg"`. Replaces the favicon from * server branding on this page. */ icon?: string; /** * Link-preview image for Open Graph and Twitter cards: an absolute URL, or * a path relative to the project's `public/` directory. Setting it switches * the Twitter card to `summary_large_image`. */ image?: string; } /** Inputs used to render the v1-compatible MCP server landing page. */ export interface LandingPageOptions { /** Protocol-facing server name. */ name: string; /** Optional human-readable server title used as the page heading. */ title?: string; /** Server version shown beside the heading. */ version: string; /** Absolute public URL of the MCP endpoint. */ url: string; /** URL of an available Inspector; omission uses the hosted Manufact Inspector. */ inspectorUrl?: string; /** Optional server description. */ description?: string; /** Optional tools shown in the primitives list. */ tools?: readonly LandingPageTool[]; /** Optional prompts shown in the primitives list. */ prompts?: readonly LandingPagePrompt[]; /** Optional static resources shown in the primitives list. */ resources?: readonly LandingPageResource[]; /** Optional absolute URL for the icon displayed above the server heading. */ iconUrl?: string; /** MIME type for the favicon link tag when known. */ iconType?: string; } /** * Generates an HTML landing page with connection instructions * for Claude Code, Cursor, VS Code, ChatGPT, and Manufact Inspector. * * @param options - Server identity, endpoint, icon, and primitive metadata. * @returns HTML landing page with connection instructions. * * @example * ```ts * import { generateLandingPage } from "mcp-use/landing"; * * const html = generateLandingPage({ * name: "weather", * version: "1.0.0", * url: "https://example.com/mcp", * }); * ``` */ export declare function generateLandingPage(options: LandingPageOptions): string;