Skip to main content
Glama
gujord

OpenAPI to Model Context Protocol (MCP)

by gujord

OpenAPI에서 모델 컨텍스트 프로토콜(MCP)로

라이센스: MIT 레포 크기마지막 커밋미해결 문제파이썬 버전

OpenAPI-MCP 프록시는 OpenAPI 사양을 MCP 도구로 변환하여 AI 에이전트가 사용자 정의 래퍼 없이 외부 API에 액세스할 수 있도록 합니다!

오픈API-MCP

AI 에이전트와 외부 API 간의 격차 해소

OpenAPI to Model Context Protocol(MCP) 프록시 서버는 OpenAPI 사양을 표준화된 MCP 도구 , 리소스프롬프트동적으로 변환하여 AI 에이전트와 외부 API 간의 격차를 해소합니다. 이를 통해 맞춤형 API 래퍼가 필요 없어 통합이 간소화됩니다.


유용하다고 생각되면 GitHub에서 ⭐를 눌러주세요!


Related MCP server: OpenAPI to MCP

주요 특징

  • FastMCP Transport: stdio 에 최적화되어 있으며, 인기 있는 LLM 오케스트레이터와 함께 바로 사용할 수 있습니다.

  • OpenAPI 통합: OpenAPI 작업을 구문 분석하고 호출 가능한 도구로 등록합니다.

  • 리소스 등록: OpenAPI 구성 요소 스키마를 정의된 URI가 있는 리소스 객체로 자동 변환합니다.

  • 프롬프트 생성: LLM이 API를 사용하도록 안내하기 위해 API 작업을 기반으로 상황에 맞는 프롬프트를 생성합니다.

  • OAuth2 지원: 클라이언트 자격 증명 흐름을 통해 머신 인증을 처리합니다.

  • JSON-RPC 2.0 지원: 완벽하게 호환되는 요청/응답 구조입니다.

  • 자동 메타데이터: OpenAPI 사양에서 도구 이름, 요약 및 스키마를 파생합니다.

  • 정리된 도구 이름: MCP 이름 제약 조건과의 호환성을 보장합니다.

  • 유연한 매개변수 구문 분석: 쿼리 문자열(앞에 "?"가 있음)과 다양한 JSON 변형(점과 숫자 값이 포함된 키 포함)을 지원합니다.

  • 향상된 매개변수 처리: 매개변수를 올바른 데이터 유형으로 자동 변환합니다.

  • 확장된 도구 메타데이터: 자세한 매개변수 정보와 응답 스키마가 포함되어 있습니다.

빠른 시작

설치

지엑스피1

LLM 오케스트레이터 구성

Claude Desktop , Cursor , Windsurf 의 경우 아래 스니펫을 사용하고 경로를 적절히 조정하세요.

{
  "mcpServers": {

    "petstore3": {
      "command": "full_path_to_openapi_mcp/venv/bin/python",
      "args": ["full_path_to_openapi_mcp/src/server.py"],
      "env": {
        "SERVER_NAME": "petstore3",
        "OPENAPI_URL": "https://petstore3.swagger.io/api/v3/openapi.json"
      },
      "transport": "stdio"
    }

  }
}

다음 파일에 이 구성을 적용하세요.

  • 커서: ~/.cursor/mcp.json

  • 윈드서핑: ~/.codeium/windsurf/mcp_config.json

  • Claude 데스크톱: ~/Library/Application Support/Claude/claude_desktop_config.json

full_path_to_openapi_mcp 실제 설치 경로로 바꾸세요.

환경 구성

변하기 쉬운

설명

필수의

기본

OPENAPI_URL

OpenAPI 사양에 대한 URL

-

SERVER_NAME

MCP 서버 이름

아니요

openapi_proxy_server

OAUTH_CLIENT_ID

OAuth 클라이언트 ID

아니요

-

OAUTH_CLIENT_SECRET

OAuth 클라이언트 비밀번호

아니요

-

OAUTH_TOKEN_URL

OAuth 토큰 엔드포인트 URL

아니요

-

OAUTH_SCOPE

OAuth 범위

아니요

api

작동 원리

  1. OpenAPI 사양 구문 분석: 필요한 경우 httpxPyYAML 사용하여 OpenAPI 사양을 로드합니다.

  2. 등록 작업: API 작업을 추출하고 적절한 입력 및 응답 스키마를 사용하여 MCP 호환 도구를 생성합니다.

  3. 리소스 등록: OpenAPI 구성 요소 스키마를 할당된 URI(예: /resource/{name} )를 사용하여 리소스 개체로 자동 변환합니다.

  4. 프롬프트 생성: LLM이 API 사용법을 이해하도록 돕기 위해 API 작업을 기반으로 상황에 맞는 프롬프트를 생성합니다.

  5. 인증: 클라이언트 자격 증명 흐름을 통해 OAuth2 인증을 지원합니다.

  6. 매개변수 처리: 매개변수를 필요한 데이터 유형으로 변환하고 유연한 쿼리 문자열 및 JSON 형식을 지원합니다.

  7. JSON-RPC 2.0 준수: 도구 상호작용을 위한 표준 통신 프로토콜을 보장합니다.

sequenceDiagram
    participant LLM as LLM (Claude/GPT)
    participant MCP as OpenAPI-MCP Proxy
    participant API as External API

    Note over LLM, API: Communication Process

    LLM->>MCP: 1. Initialize (initialize)
    MCP-->>LLM: Metadata, tools, resources, and prompts

    LLM->>MCP: 2. Request tools (tools_list)
    MCP-->>LLM: Detailed list of tools, resources, and prompts

    LLM->>MCP: 3. Call tool (tools_call)

    alt With OAuth2
        MCP->>API: Request OAuth2 token
        API-->>MCP: Access Token
    end

    MCP->>API: 4. Execute API call with proper formatting
    API-->>MCP: 5. API response (JSON)

    alt Type Conversion
        MCP->>MCP: 6. Convert parameters to correct data types
    end

    MCP-->>LLM: 7. Formatted response from API

    alt Dry Run Mode
        LLM->>MCP: Call with dry_run=true
        MCP-->>LLM: Display request information without executing call
    end

리소스 및 프롬프트

도구 외에도 프록시 서버는 이제 다음을 자동으로 등록합니다.

  • 리소스: OpenAPI 구성 요소 스키마에서 파생된 리소스 개체는 구조화된 데이터 처리를 위해 정의된 URI(예: /resource/{name} )로 등록됩니다.

  • 프롬프트: API 작업을 기반으로 상황에 맞는 프롬프트가 생성되어 LLM에 사용 지침을 제공하고, 사용 가능한 엔드포인트에 대한 이해를 높입니다.

이 확장된 메타데이터는 포괄적인 API 컨텍스트를 제공하여 통합을 개선합니다.

오픈API-MCP

기여하다

  • 이 저장소를 포크하세요.

  • 새로운 지점을 만듭니다.

  • 변경 사항을 명확하게 설명하여 풀 리퀘스트를 제출하세요.

특허

MIT 라이센스

유용하다고 생각되면 GitHub에서 ⭐를 눌러주세요!

A
license - permissive license
-
quality - not tested
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity
Issues opened vs closed

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • F
    license
    -
    quality
    D
    maintenance
    A dynamic proxy that converts OpenAPI Specification (OAS) endpoints into Message Communication Protocol (MCP) tools, allowing AI agents to use existing REST APIs as if they were native MCP tools without manual implementation.
    Last updated
    16
  • A
    license
    -
    quality
    F
    maintenance
    A standalone proxy that transforms any OpenAPI or Swagger-described REST API into an MCP server by mapping API operations to executable MCP tools. It enables AI clients to interact with existing web services through automated HTTP requests based on their official documentation.
    Last updated
    13
    16
    MIT
  • A
    license
    -
    quality
    D
    maintenance
    A universal MCP server that connects any REST API to AI assistants via OpenAPI or Postman specifications. It enables dynamic tool creation with GraphQL-style field selection and automatic schema inference for efficient data retrieval.
    Last updated
    47
    5
    Inno Setup
  • A
    license
    -
    quality
    B
    maintenance
    Turns any OpenAPI specification into a fully working MCP server with a single command, enabling AI agents to call APIs without writing any glue code.
    Last updated
    27
    MIT

View all related MCP servers

Related MCP Connectors

  • MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.

  • Self-hosted MCP gateway: turn any API, database or MCP server into AI connectors — no code.

  • Free public MCP for AI agents — 193 tools, 44 workflows. No API key.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/gujord/OpenAPI-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server