openapi-mcp-generator

harsha-iiiv
256
A tool that converts OpenAPI specifications to MCP server

Overview

openapi-mcp-generator Introduction

openapi-mcp-generator is a CLI tool that converts OpenAPI specifications into Model Context Protocol (MCP) servers, enabling seamless interaction between AI agents and existing REST APIs.

How to Use

To use openapi-mcp-generator, install it globally via npm with 'npm install -g openapi-mcp-generator'. Then, generate an MCP server by running 'openapi-mcp-generator --input path/to/openapi.json --output path/to/output/dir'.

Key Features

Key features include OpenAPI 3.0 support, proxy behavior for REST API calls, authentication support (API keys, Bearer tokens, Basic auth, OAuth2), Zod validation for input, fully typed TypeScript output, multiple transport methods, project scaffolding, and built-in HTML test clients.

Where to Use

openapi-mcp-generator can be used in various fields such as software development, API management, and AI integration, particularly where REST APIs need to be adapted for MCP clients.

Use Cases

Use cases include generating MCP servers for existing REST APIs, enabling AI agents to interact with APIs, and creating test environments for API interactions.

Content