Skip to main content
Glama
kadykov

OpenAPI Schema Explorer

config.ts1.01 kB
/** * Configuration management for the OpenAPI Explorer MCP server */ import { OutputFormat } from './services/formatters.js'; /** Server configuration */ export interface ServerConfig { /** Path to OpenAPI specification file */ specPath: string; /** Output format for responses */ outputFormat: OutputFormat; } /** Load server configuration from command line arguments */ export function loadConfig(specPath?: string, options?: { outputFormat?: string }): ServerConfig { if (!specPath) { throw new Error( 'OpenAPI spec path is required. Usage: npx mcp-openapi-schema-explorer <path-to-spec> [--output-format json|yaml]' ); } const format = options?.outputFormat || 'json'; if (format !== 'json' && format !== 'yaml' && format !== 'json-minified') { throw new Error('Invalid output format. Supported formats: json, yaml, json-minified'); } return { specPath, // Cast is safe here due to the validation above outputFormat: format as OutputFormat, }; }

Latest Blog Posts

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/kadykov/mcp-openapi-schema-explorer'

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