UNPKG

@toolprint/hypertool-mcp

Version:

HyperTool MCP proxy server for routing requests between clients and multiple underlying MCP servers

73 lines • 2.37 kB
import { MCPConfig, ServerConfig, ServerEntry, ParseResult, ParserOptions } from "../types/config.js"; /** * MCP Configuration Parser * Reads and validates .mcp.json configuration files */ export declare class MCPConfigParser { private options; constructor(options?: ParserOptions); /** * Parse an MCP configuration file * @param filePath Path to the .mcp.json file * @returns ParseResult with the parsed configuration or errors */ parseFile(filePath: string): Promise<ParseResult>; /** * Parse MCP configuration content * @param content JSON content to parse * @param basePath Base path for resolving relative paths * @returns ParseResult with the parsed configuration or errors */ parseContent(content: string, basePath?: string): ParseResult; /** * Validate the basic structure of the configuration * * NOTE: Allow empty server configurations for initial setup */ private validateStructure; /** * Parse and validate a single server configuration */ private parseServerConfig; /** * Parse and validate stdio server configuration */ private parseStdioConfig; /** * Parse and validate HTTP server configuration */ private parseHttpConfig; /** * Parse and validate SSE server configuration */ private parseSSEConfig; /** * Parse and validate extension configuration */ private parseExtensionConfig; /** * Parse and validate DXT extension configuration */ private parseDxtExtensionConfig; /** * Resolve a command path, checking PATH and relative/absolute paths */ private resolveCommandPath; /** * Get a list of server names from a configuration */ static getServerNames(config: MCPConfig): string[]; /** * Get a specific server entry (server or extension configuration) */ static getServerEntry(config: MCPConfig, serverName: string): ServerEntry | undefined; /** * Get a specific server configuration (excluding extensions) */ static getServerConfig(config: MCPConfig, serverName: string): ServerConfig | undefined; /** * Validate server name uniqueness and catch common naming issues */ private validateServerNameUniqueness; } //# sourceMappingURL=mcpConfigParser.d.ts.map