
vizioz/swagger-mcp
Developer tools이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기
vizioz/swagger-mcp는 [[T0]에서 가져온 MCP 서버 후보입니다.
개요
vizioz/swagger-mcp는 [[T0]에서 가져온 MCP 서버 후보입니다.
개요(AI 번역)
Swagger 사양에 연결되어 AI가 해당 서비스를 위한 MCP 서버를 생성하는 데 필요한 모든 모델을 구축하도록 돕는 MCP 서버입니다.
특징
- Swagger 사양을 다운로드하여 더 빠른 참조를 위해 로컬에 저장합니다.
- 모든 엔드포인트와 그 HTTP 메서드 및 설명 목록을 반환합니다
- 모든 모델 목록을 반환합니다
- 모델을 반환합니다
- 서비스 반환 후 종단 지점에 연결됨
- MCP 함수 정의를 반환합니다
- 완전한 스키마 정보를 포함한 완전한 MCP 도구 정의 생성
- 도구 설명에 AI 전용 지침 포함
선수 조건
- Node.js (v14 이상)
- NPM 또는 실
설치
-
저장소 복제:
-
의존성 설치:
-
.env.example파일을 기반으로.env파일 생성: -
.env파일을 업데이트합니다.
구성
.env 파일을 편집하여 애플리케이션을 구성하세요:
PORT: 서버가 실행될 포트 (기본값: 3000)NODE_ENV: 환경(개발, 생산, 테스트)LOG_LEVEL: 로깅 레벨 (정보, 오류, 디버그)
사용
애플리케이션 구축
애플리케이션 구축하기:
이 과정에서 TypeScript 코드가 MCP 서버로 사용할 준비가 된 상태로 컴파일됩니다
이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.
README
원문 README의 일부입니다. 원문 보기.
Swagger MCP
An MCP server that connects to a Swagger specification and helps an AI to build all the required models to generate a MCP server for that service.
Features
- Downloads a Swagger specification and stores it locally for faster reference.
- Returns a list of all the endpoints and their HTTP Methods and descriptions
- Returns a list of all the models
- Returns a model
- Returns service to connect to the end point
- Returns MCP function definitions
- Generates complete MCP tool definitions with full schema information
- Includes AI-specific instructions in tool descriptions
Prerequisites
- Node.js (v14 or higher)
- npm or yarn
Installation
- Clone the repository:
git clone https://github.com/readingdancer/swagger-mcp.git
cd swagger-mcp
- Install dependencies:
npm install
- Create a
.envfile based on the.env.examplefile:
cp .env.example .env
- Update the
.envfile.
Configuration
Edit the .env file to configure the application:
PORT: The port on which the server will run (default: 3000)NODE_ENV: The environment (development, production, test)LOG_LEVEL: Logging level (info, error, debug)
Usage
Building the application
Build the application:
npm run build
This will compile the TypeScript code ready to be used as an MCP Server
Running as an MCP Server
To run as an MCP server for integration with Cursor and other applications:
node build/index.js
You can also provide a Swagger URL via CLI argument:
node build/index.js --swagger-url="https://petstore.swagger.io/v2/swagger.json"
Or using the alternative format:
node build/index.js --swaggerUrl="https://petstore.swagger.io/v2/swagger.json"
Note: The CLI --swagger-url argument takes priority over the swaggerFilePath parameter in tool calls. If both are provided, the CLI argument will be used.
Using the MCP Inspector
To run the MCP inspector for debugging:
npm run inspector
Adding to Cursor
To add this MCP server to Cursor:
- Open Cursor Settings > Features > MCP
- Click “+ Add New MCP Server”
- Enter a name for the server (e.g., “Swagger MCP”)
- Select “stdio” as the transport type
- Enter the command to run the server:
- Basic:
node path/to/swagger-mcp/build/index.js - With Swagger URL:
node path/to/swagger-mcp/build/index.js --swagger-url="https://your-api-url/swagger.json"
- Basic:
- Click “Add”
The Swagger MCP tools will now be available to the Cursor Agent in Composer.
Tip: If you provide the --swagger-url CLI argument when configuring the server, you won’t need to provide swaggerFilePath in tool calls, making the tools easier to use.
Available Swagger MCP Tools
The following tools are available through the MCP server:
getSwaggerDefinition: Downloads a Swagger definition from a URLlistEndpoints: Lists all endpoints from the Swagger definition (optionalswaggerFilePath)
설치
This server does not publish a one-line install command.
Open the repository installation guide MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →