New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

mcp-swagger-parser

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mcp-swagger-parser

Enterprise-grade OpenAPI/Swagger specification parser for Model Context Protocol (MCP) projects

latest
Source
npmnpm
Version
1.7.0
Version published
Maintainers
1
Created
Source

mcp-swagger-parser

OpenAPI/Swagger specification parser for MCP projects

🎯 Overview

A TypeScript library for parsing, validating, and extracting information from OpenAPI/Swagger specifications. This library is designed to be the foundation for the MCP Swagger Server ecosystem.

✨ Features

  • 📝 Multi-format support: JSON, YAML, URL, and file inputs
  • 🔍 Comprehensive validation: OpenAPI 2.0 and 3.x specification validation
  • 🛠️ Information extraction: Endpoints, schemas, security schemes, and metadata
  • 🎯 Type-safe: Full TypeScript support with comprehensive type definitions
  • Performance optimized: Efficient parsing and processing
  • 🧪 Well-tested: High test coverage with unit and integration tests

📦 Installation

npm install mcp-swagger-parser

🚀 Quick Start

import { OpenApiParser } from 'mcp-swagger-parser';

const parser = new OpenApiParser();

// Parse from URL
const spec = await parser.parseFromUrl('https://petstore.swagger.io/v2/swagger.json');

// Parse from file
const spec = await parser.parseFromFile('./api.yaml');

// Parse from text
const spec = await parser.parseFromText(yamlContent, 'yaml');

// Extract information
console.log('API Info:', spec.info);
console.log('Endpoints:', spec.metadata.endpointCount);

📚 Documentation

  • API Reference - Complete API documentation
  • Examples - Usage examples and tutorials
  • Migration Guide - Migration from other parsers

🤝 Contributing

This package is part of the MCP Swagger Server monorepo. Please see the main repository for contribution guidelines.

📄 License

MIT License - see LICENSE for details.

Status: 🚧 In Development | Part of MCP Swagger Server v1.0.0

Keywords

openapi

FAQs

Package last updated on 06 Mar 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts