import * as react from 'react'; import { ReactNode, CSSProperties, ComponentType, SVGProps } from 'react'; export { D as DEFAULT_MCPB_ENTRY_POINT, b as MCPB_MANIFEST_VERSION, c as MCPB_MIN_NODE, M as McpbManifestInput, a as McpbTool, d as buildMcpbManifest, e as buildMcpbProxyStub } from '../mcpb-BXOrsRnv.cjs'; /** The MCP hosts we know how to generate an install affordance for. */ type ConnectorClient = "claude-web" | "claude-desktop" | "cursor" | "vscode" | "manual"; /** A remote MCP server to generate install artifacts for. */ interface ConnectorServer { /** Human-readable server name, e.g. `"Decksmith"`. */ name: string; /** The remote MCP endpoint, e.g. `"https://decksmith.dev/mcp"`. */ url: string; } /** * Claude's Connectors page — the manual "Add custom connector" flow. * * Claude exposes no install deeplink, so a button can only copy the URL and * open this page for a paste. Override per-app if Claude moves it (it has * historically lived at both `/settings/connectors` and `/customize/connectors`). */ declare const CLAUDE_CONNECTORS_URL = "https://claude.ai/settings/connectors"; /** Base64-encode a JSON value, working in both the browser and Node. */ declare function encodeBase64Json(value: unknown): string; /** * Cursor install deeplink for a remote (HTTP) MCP server. * * `cursor://anysphere.cursor-deeplink/mcp/install?name=&config=`, * where `config` is base64 of `{"url":""}` — the HTTP shape, with no * `type`/`transport` keys (those are for the stdio examples in the docs). The * base64 is intentionally NOT percent-encoded, matching Cursor's own install * links. Docs: https://cursor.com/docs/context/mcp/install-links */ declare function buildCursorDeeplink(server: ConnectorServer): string; /** * VS Code install deeplink for a remote (HTTP) MCP server. * * `vscode://mcp/install?` — URL-ENCODED JSON (not base64), the * opposite encoding from Cursor and an easy one to mix up. The payload is * `{ "name", "url" }`; for VS Code Insiders pass `{ insiders: true }`. */ declare function buildVscodeDeeplink(server: ConnectorServer, opts?: { insiders?: boolean; }): string; /** A normalized server key for a config file (`My App` → `my-app`). */ declare function slugifyServerName(name: string): string; /** The `claude_desktop_config.json` object for a manual install. */ interface ManualMcpConfig { mcpServers: Record; } /** * The `claude_desktop_config.json` (or any stdio MCP client config) entry for a * remote server, wrapping it with `npx -y mcp-remote ` — the standard * stdio→HTTP bridge, since stdio clients can't take an HTTP URL directly. * Requires Node 18+ on the user's machine. */ declare function buildManualConfig(server: ConnectorServer): ManualMcpConfig; /** Pretty-printed JSON snippet of {@link buildManualConfig}, for a copy box. */ declare function buildManualConfigSnippet(server: ConnectorServer): string; /** How a given client's button behaves — drives the default UI. */ type ConnectorMechanism = "copy-open" | "download" | "deeplink" | "snippet"; /** Display metadata for a client, so consumers don't redraw the marks. */ interface ConnectorTargetMeta { id: ConnectorClient; /** Default button label. */ label: string; mechanism: ConnectorMechanism; /** One-line tooltip explaining what the button does. */ hint: string; } declare const CONNECTOR_TARGETS: Record; /** * Resolve the navigable href for a deeplink client (cursor / vscode), or null * for clients whose mechanism isn't a plain navigation. */ declare function connectorHref(client: ConnectorClient, server: ConnectorServer, opts?: { insiders?: boolean; }): string | null; interface ConnectorButtonsProps { /** Human-readable server name, e.g. `"Decksmith"`. */ serverName: string; /** The remote MCP endpoint, e.g. `"https://decksmith.dev/mcp"`. */ mcpUrl: string; /** * Which client buttons to render, in order. Defaults to * `["claude-web", "cursor", "vscode", "manual"]` — plus `"claude-desktop"` * when {@link mcpbDownloadUrl} is set. A `"claude-desktop"` entry with no * `mcpbDownloadUrl` is skipped (there's nothing to download). */ clients?: ConnectorClient[]; /** URL of a prebuilt `.mcpb` bundle; enables the Claude Desktop button. */ mcpbDownloadUrl?: string; /** Override Claude's Connectors page (it has moved before). */ claudeConnectorsUrl?: string; /** Target VS Code Insiders instead of stable. */ vscodeInsiders?: boolean; /** Fired when a value is copied to the clipboard (URL or snippet). */ onCopy?: (target: ConnectorClient) => void; /** Fired when any button is activated (after its side effect). */ onAction?: (target: ConnectorClient) => void; /** Per-client label override. */ labels?: Partial>; className?: string; style?: CSSProperties; } /** * Per-client "Add to " buttons for a remote MCP server, each with the * right (and subtly different) install behavior baked in — see {@link * ./targets}. Brand glyphs, copy/feedback states, and the manual-config popover * are owned here so a consumer just passes a name + URL. * * Needs the package stylesheet for its default look: * `import "@particle-academy/agent-integrations/styles.css"`. */ declare function ConnectorButtons({ serverName, mcpUrl, clients, mcpbDownloadUrl, claudeConnectorsUrl, vscodeInsiders, onCopy, onAction, labels, className, style, }: ConnectorButtonsProps): react.JSX.Element; type GlyphProps = SVGProps; declare function ClaudeMark(props: GlyphProps): react.JSX.Element; declare function CursorMark(props: GlyphProps): react.JSX.Element; declare function VscodeMark(props: GlyphProps): react.JSX.Element; declare function DesktopMark(props: GlyphProps): react.JSX.Element; declare function WrenchMark(props: GlyphProps): react.JSX.Element; /** Glyph component for a given client. */ declare const CONNECTOR_GLYPHS: Record>; export { CLAUDE_CONNECTORS_URL, CONNECTOR_GLYPHS, CONNECTOR_TARGETS, ClaudeMark, ConnectorButtons, type ConnectorButtonsProps, type ConnectorClient, type ConnectorMechanism, type ConnectorServer, type ConnectorTargetMeta, CursorMark, DesktopMark, type ManualMcpConfig, VscodeMark, WrenchMark, buildCursorDeeplink, buildManualConfig, buildManualConfigSnippet, buildVscodeDeeplink, connectorHref, encodeBase64Json, slugifyServerName };