Swagger Explorer MCP

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Integrations

  • Enables the analysis and exploration of Swagger/OpenAPI specifications, including examining API endpoints, schemas, and response formats

스웨거 익스플로러 MCP

Claude를 통해 Swagger/OpenAPI 사양을 탐색하고 분석하기 위한 MCP(Management Control Plane) 서버입니다.

빠른 시작

npx를 사용하여 전역적으로 설치하고 실행합니다.

지엑스피1

또는 환경 변수를 사용하여 설치합니다.

npx -y @johnneerdael/swagger-mcp \ --env BASE_URL=/api \ --env AUTH_TOKEN=your-token \ --env PORT=3000

Claude Desktop 설치

  1. 클로드 데스크톱 열기
  2. 설정(기어 아이콘)을 클릭하세요
  3. "도구 및 통합"을 선택하세요
  4. "MCP 서버 추가"를 클릭하세요
  5. 다음을 입력하세요.
    Name: Swagger Explorer Command: npx -y @johnneerdael/swagger-mcp Arguments: --swagger-url=$SWAGGER_URL
  6. "설치"를 클릭하세요

Claude와 함께 사용

클로드와의 상호작용 사례는 다음과 같습니다.

기본 스웨거 탐색

Human: Can you explore the Swagger documentation at http://localhost:8080/docs? Claude: I'll help you explore that Swagger documentation using the Swagger Explorer MCP. Let me analyze the API endpoints and schemas for you: [Claude would then use the MCP to fetch and analyze the Swagger documentation]

특정 엔드포인트 분석

Human: What are the available response schemas for the /pets POST endpoint? Claude: I'll check the response schemas for that endpoint using the MCP. [Claude would use the MCP to fetch specific endpoint details]

스키마 분석

Human: Can you show me the detailed structure of the Pet schema? Claude: I'll retrieve the detailed schema information using the MCP. [Claude would use the MCP to analyze the schema structure]

특징

  1. 인증 지원
    • 베어러 토큰 인증
    • 환경 변수를 통해 구성 가능
  2. 사용자 정의 응답 형식
    • 최소 형식: null/빈 값 제거
    • 자세한 형식: 메타데이터 및 타임스탬프 포함
    • 원시 형식: 수정되지 않은 응답
  3. 스키마 분석
    • 자세한 부동산 탐색
    • 응답 스키마 분석
    • 스키마 관계
  4. API 탐색
    • 경로 목록
    • 메서드 필터링
    • 응답 형식 분석

구성

환경 변수:

  • BASE_URL : API의 기본 경로(기본값: '')
  • AUTH_TOKEN : 인증을 위한 전달 토큰
  • PORT : 서버 포트(기본값: 3000)
  • SWAGGER_URL : 기본 Swagger 문서 URL

API 엔드포인트

API 탐색

curl -X POST http://localhost:3000/api/explore \ -H "Authorization: Bearer your-token" \ -H "Content-Type: application/json" \ -d '{ "url": "http://your-swagger-url", "options": { "paths": true, "schemas": true } }'

스키마 세부 정보 가져오기

curl -X POST http://localhost:3000/api/schema-details \ -H "Authorization: Bearer your-token" \ -H "Content-Type: application/json" \ -d '{ "url": "http://your-swagger-url", "schemaName": "Pet" }'

응답 스키마 가져오기

curl -X POST http://localhost:3000/api/response-schemas \ -H "Authorization: Bearer your-token" \ -H "Content-Type: application/json" \ -d '{ "url": "http://your-swagger-url", "path": "/pets", "method": "post" }'

응답 형식

미니멀 포맷

{ "status": "success", "data": { // Only non-null values } }

자세한 형식

{ "status": "success", "timestamp": "2025-01-29T10:00:00.000Z", "data": { // Full response }, "metadata": { "version": "1.0", "format": "detailed" } }

일반적인 사용 사례

  1. API 문서 검토
    Human: Can you summarize all the available endpoints and their purposes?
  2. 스키마 검증
    Human: What fields are required for creating a new pet?
  3. 반응 분석
    Human: What are the possible error responses for the login endpoint?
  4. 통합 계획
    Human: How should I structure my request to create a new order?

문제 해결

  1. 연결 문제
    • Swagger URL에 액세스할 수 있는지 확인하세요.
    • 인증 토큰이 올바른지 확인하세요
    • 포트가 사용 중이 아닌지 확인하세요
  2. 권한 부여 오류
    • AUTH_TOKEN이 올바르게 설정되었는지 확인하세요
    • 베어러 토큰이 요청에 포함되어 있는지 확인하세요.
  3. 스키마를 찾을 수 없습니다
    • 스키마 이름이 정확히 일치하는지 확인하세요
    • Swagger 사양이 올바르게 로드되었는지 확인하세요.

보안 참고 사항

  1. AUTH_TOKEN이 설정된 경우 MCP는 인증을 요구합니다.
  2. 모든 요청은 디버깅을 위해 기록됩니다.
  3. 민감한 정보는 캐시되지 않습니다.
  4. 남용을 방지하기 위해 속도 제한이 적용됩니다.

개발

기여하거나 수정하려면:

  1. 저장소를 복제합니다
  2. 종속성 설치:
    npm install
  3. 짓다:
    npm run build
  4. 로컬로 실행:
    npm start

특허

MIT 라이선스 - 자세한 내용은 라이선스 파일을 참조하세요.

-
security - not tested
F
license - not found
-
quality - not tested

사용자가 Swagger/OpenAPI 사양을 탐색하고 분석할 수 있는 관리 제어 평면 서버로, 엔드포인트 탐색, 스키마 분석, 사용자 정의 응답 형식 지정과 같은 기능을 제공하며 Claude와 같은 도구와의 인증 및 통합을 지원합니다.

  1. Quick Start
    1. Installation for Claude Desktop
      1. Usage with Claude
        1. Basic Swagger Exploration
        2. Analyzing Specific Endpoints
        3. Schema Analysis
      2. Features
        1. Configuration
          1. API Endpoints
            1. Explore API
            2. Get Schema Details
            3. Get Response Schemas
          2. Response Formats
            1. Minimal Format
            2. Detailed Format
          3. Common Use Cases
            1. Troubleshooting
              1. Security Notes
                1. Development
                  1. License
                    ID: 1z0w1koqpv