Parses various MCP import strings into structured entries.
// Source: https://github.com/NousResearch/hermes-agent | License: MIT | Copyright 2025 Nous Research
// Provided via justclaw.it.com; keep this notice with the code.
// Paste-anything MCP import: turns whatever a README tells the user to copy —
// an mcp.json snippet, a bare `npx`/`docker` command, a `claude mcp add` line,
// a plain server URL, or a Cursor install deeplink — into named mcp.json
// entries. Pure and side-effect free; the MCP tab merges the result into the
// editor draft. Returns null when nothing recognizable is in the text.
import { isServerShape, normalizeEntry } from '@/lib/mcp-servers'
export interface McpImportEntry {
config: Record<string, unknown>
name: string
}
const isRecord = (value: unknown): value is Record<string, unknown> =>
!!value && typeof value
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key