
rustho/openapi-to-mcp
Developer tools이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기
기존 Swagger/OpenAPI specs에서 AI-friendly 인터페이스를 생성한다. 이 도구는 API를 Model Control Protocol (MCP) 형식으로 변환합니다. 대형 언어를 통해 도구 및 환경을 제어하는 데 사용됩니다.
개요
기존 Swagger/OpenAPI specs에서 AI-friendly 인터페이스를 생성한다. 이 도구는 대형 언어 모델을 통해 도구 및 환경을 제어하는 데 사용되는 Model Control Protocol (MCP) 형식으로 API를 변환합니다. 이 도구는 OpenAPI/Swagger 사양을 Model Control Protocol (MCP) 형식으로 변환하여 API와 상호 작용할 수있는 AI 에이전트를 쉽게 만들 수 있습니다. 2개의 패키지를 포함하는 monorepo입니다: - 패키지/코어: 메인 OpenAPI-to-MCP CLI 도구 및 라이브러리 - 패키지/플레이어: 브라우저에서 도구 테스트 웹 응용 프로그램 - 범용 mcp 생성.
개요(AI 번역)
기존 Swagger/OpenAPI specs에서 AI-friendly 인터페이스를 생성한다. 이 도구는 대형 언어 모델을 통해 도구 및 환경을 제어하는 데 사용되는 Model Control Protocol (MCP) 형식으로 API를 변환합니다.
개요
이 도구는 OpenAPI/Swagger 사양을 Model Control Protocol (MCP) 형식으로 변환하여 API와 상호 작용할 수있는 AI 에이전트를 쉽게 만들 수 있습니다.
프로젝트 구조
2개의 패키지를 포함하는 monorepo입니다:
packages/core: OpenAPI-to-MCP CLI 도구 및 라이브러리packages/playground: 브라우저에서 도구를 테스트하기위한 웹 응용 프로그램
특징
- OpenAPI/Swagger 파일에서 범용 mcp.json 생성
- 적당한 GET endpoints에서 자동 압축 상태 스키마
- 다수 체재에 수출:
- 상태 정보와 신속한 지침
- getState 동작을 가진 JSON 작업 템플릿
- getState 함수(OpenAI 호환)를 가진 기능 스키마
- Claude Desktop과 호환되는 ♨ MCP 서버 TypeScript 파일
- API 상호 작용을 위한 분기 독립 실행자 (LangChain/Web compatible)
- README와 - 플러그 앤 플레이 핸들러 파일
- argsSchema 및 Toolloader를 가진 12.0 LangChain 공구
이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.
README
원문 README의 일부입니다. 원문 보기.
OpenAPI-to-MCP
Generate AI-friendly interfaces from your existing Swagger/OpenAPI specs.
This tool converts APIs into Model Control Protocol (MCP) format — used to control tools and environments via large language models.
Overview
This tool converts OpenAPI/Swagger specifications into Model Control Protocol (MCP) format, making it easy to create AI agents that can interact with your APIs.
Project Structure
This is a monorepo containing two packages:
packages/core: The main OpenAPI-to-MCP CLI tool and librarypackages/playground: A web application for testing the tool in your browser
Features
- 📥 Generate universal mcp.json from OpenAPI/Swagger files
- 🔄 Auto-extract state schema from suitable GET endpoints
- 📤 Export to multiple formats:
- 📜 Prompt instructions with state information
- 🧱 JSON action templates with getState action
- 🔧 Function schemas with getState function (OpenAI compatible)
- 🚀 MCP server TypeScript file compatible with Claude Desktop
- 🔌 Standalone executor for API interaction (LangChain/Web compatible)
- 📂 Plug-and-play handler files with README
- 🔗 LangChain tools with argsSchema and toolloader
- 🔌 OpenAI plugin manifest with deployment instructions
- 🧪 Simulation mode for testing without backend changes
Use Cases
- Build Claude Desktop-compatible tools in seconds — Generate an MCP server that works directly with Claude
- Turn any OpenAPI spec into LangChain/AutoGPT tools — Use the executor or LangChain tools for AI interfaces in any framework
- Power AI interfaces for existing microservices — No backend changes required, works with existing APIs
- Create ChatGPT plugins effortlessly — Generate OpenAI plugin manifests with proper schemas
- Prototype AI agents with minimal setup — Use simulation mode to test AI interaction with your API
- Create custom handler logic — Extend handlers with preprocessing, caching, or business logic
Installation
# Install globally
npm install -g openapi-to-mcp
# Or use directly with npx
npx openapi-to-mcp
Usage
# Basic usage - generates all outputs
openapi-to-mcp path/to/swagger.yaml
# Specify output directory
openapi-to-mcp path/to/swagger.yaml -o ./custom-output
# Generate only specific formats
openapi-to-mcp path/to/swagger.yaml --prompt --functions
# Generate MCP server for Claude Desktop
openapi-to-mcp path/to/swagger.yaml --server --api-url https://your-api.com
# Generate standalone executor for any framework
openapi-to-mcp path/to/swagger.yaml --executor --api-url https://your-api.com
# Generate individual handler files for customization
openapi-to-mcp path/to/swagger.yaml --handlers --api-url https://your-api.com
# Generate LangChain tools for your API
openapi-to-mcp path/to/swagger.yaml --langchain --api-url https://your-api.com
# Generate OpenAI plugin manifest files
openapi-to-mcp path/to/swagger.yaml --openai-plugin --api-url https://your-api.com
설치
npx openapi-to-mcp <swagger-file>