Skip to main content
Glama

hypertool-mcp

claude-code.tsโ€ข1.79 kB
/** * Transformer for Claude Code configuration format */ import { ConfigTransformer, MCPConfig, ValidationResult, } from "../types/index.js"; export class ClaudeCodeTransformer implements ConfigTransformer { /** * Convert from Claude Code format to standard MCP format */ toStandard(claudeConfig: any): MCPConfig { const mcpConfig: MCPConfig = { mcpServers: {} }; // Claude Code now uses root-level mcpServers if ( claudeConfig.mcpServers && typeof claudeConfig.mcpServers === "object" ) { Object.assign(mcpConfig.mcpServers, claudeConfig.mcpServers); } return mcpConfig; } /** * Convert from standard MCP format to Claude Code format * This preserves the existing Claude Code configuration structure */ fromStandard(standardConfig: MCPConfig, existingConfig?: any): any { // If we have an existing config, preserve all non-mcpServers fields if (existingConfig) { return { ...existingConfig, mcpServers: standardConfig.mcpServers || {}, }; } // If no existing config, create minimal structure with mcpServers at root return { mcpServers: standardConfig.mcpServers || {}, }; } /** * Validate Claude Code configuration format */ validate(config: any): ValidationResult { const errors: string[] = []; if (!config || typeof config !== "object") { errors.push("Configuration must be an object"); return { valid: false, errors }; } // Claude Code uses root-level mcpServers if (config.mcpServers && typeof config.mcpServers !== "object") { errors.push("mcpServers must be an object"); } return { valid: errors.length === 0, errors: errors.length > 0 ? errors : undefined, }; } }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/toolprint/hypertool-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server