Skip to main content
Glama

OpenAPI MCP Server

OpenAPI MCP 서버

OpenAPI 엔드포인트를 MCP 리소스로 노출하는 모델 컨텍스트 프로토콜(MCP) 서버입니다. 이 서버를 통해 대규모 언어 모델(Large Language Models)이 MCP 프로토콜을 통해 OpenAPI 사양에 정의된 REST API를 검색하고 상호 작용할 수 있습니다.

개요

이 MCP 서버는 두 가지 전송 방법을 지원합니다.

  1. Stdio Transport (기본값): 표준 입출력을 통해 MCP 연결을 관리하는 Claude Desktop과 같은 AI 시스템과 직접 통합하기 위한 것입니다.
  2. 스트리밍 가능한 HTTP 전송 : HTTP를 통해 서버에 연결하여 웹 클라이언트와 기타 HTTP 지원 시스템이 MCP 프로토콜을 사용할 수 있도록 합니다.

사용자를 위한 빠른 시작

옵션 1: Claude Desktop(Stdio Transport)과 함께 사용

이 저장소를 복제할 필요는 없습니다. Claude Desktop에서 이 MCP 서버를 사용하도록 설정하기만 하면 됩니다.

  1. Claude Desktop 구성 파일을 찾거나 만드세요.
    • macOS의 경우: ~/Library/Application Support/Claude/claude_desktop_config.json
  2. 다음 구성을 추가합니다.

지엑스피1

  1. 환경 변수를 실제 API 구성으로 바꾸세요.
    • API_BASE_URL : API의 기본 URL
    • OPENAPI_SPEC_PATH : OpenAPI 사양에 대한 URL 또는 경로
    • API_HEADERS : API 인증 헤더에 대한 쉼표로 구분된 키:값 쌍

옵션 2: HTTP 클라이언트와 함께 사용(HTTP 전송)

HTTP 클라이언트와 함께 서버를 사용하려면:

  1. 설치가 필요 없습니다! npx를 사용하여 패키지를 직접 실행하세요.
npx @ivotoby/openapi-mcp-server \ --api-base-url https://api.example.com \ --openapi-spec https://api.example.com/openapi.json \ --headers "Authorization:Bearer token123" \ --transport http \ --port 3000
  1. HTTP 요청을 사용하여 서버와 상호 작용합니다.
# Initialize a session (first request) curl -X POST http://localhost:3000/mcp \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","id":0,"method":"initialize","params":{"client":{"name":"curl-client","version":"1.0.0"},"protocol":{"name":"mcp","version":"2025-03-26"}}}' # The response includes a Mcp-Session-Id header that you must use for subsequent requests # and the InitializeResult directly in the POST response body. # Send a request to list tools # This also receives its response directly on this POST request. curl -X POST http://localhost:3000/mcp \ -H "Content-Type: application/json" \ -H "Mcp-Session-Id: your-session-id" \ -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' # Open a streaming connection for other server responses (e.g., tool execution results) # This uses Server-Sent Events (SSE). curl -N http://localhost:3000/mcp -H "Mcp-Session-Id: your-session-id" # Example: Execute a tool (response will arrive on the GET stream) # curl -X POST http://localhost:3000/mcp \ # -H "Content-Type: application/json" \ # -H "Mcp-Session-Id: your-session-id" \ # -d '{"jsonrpc":"2.0","id":2,"method":"tools/execute","params":{"name":"yourToolName", "arguments": {}}}' # Terminate the session when done curl -X DELETE http://localhost:3000/mcp -H "Mcp-Session-Id: your-session-id"

운송 유형

Stdio 전송(기본값)

stdio 전송은 표준 입출력(SIO)을 통해 MCP 연결을 관리하는 Claude Desktop과 같은 AI 시스템과 직접 통합되도록 설계되었습니다. 이는 가장 간단한 설정이며 네트워크 구성이 필요하지 않습니다.

사용 시기 : Claude Desktop이나 stdio 기반 MCP 통신을 지원하는 다른 시스템과 통합할 때.

스트리밍 가능한 HTTP 전송

HTTP 전송은 HTTP를 통해 MCP 서버에 접속할 수 있도록 하여 웹 애플리케이션 및 기타 HTTP 지원 클라이언트가 MCP 프로토콜과 상호 작용할 수 있도록 합니다. 세션 관리, 스트리밍 응답 및 표준 HTTP 메서드를 지원합니다.

주요 특징 :

  • Mcp-Session-Id 헤더를 사용한 세션 관리
  • initializetools/list 요청에 대한 HTTP 응답은 POST에서 동기적으로 전송됩니다.
  • 다른 서버-클라이언트 메시지(예: tools/execute 결과, 알림)는 SSE(Server-Sent Events)를 사용하여 GET 연결을 통해 스트리밍됩니다.
  • POST/GET/DELETE 메서드 지원

사용 시기 : stdio가 아닌 HTTP를 통해 통신하는 웹 클라이언트나 시스템에 MCP 서버를 노출해야 하는 경우입니다.

구성 옵션

서버는 환경 변수나 명령줄 인수를 통해 구성할 수 있습니다.

환경 변수

  • API_BASE_URL - API 엔드포인트의 기본 URL
  • OPENAPI_SPEC_PATH - OpenAPI 사양에 대한 경로 또는 URL
  • API_HEADERS - API 헤더에 대한 쉼표로 구분된 키:값 쌍
  • SERVER_NAME - MCP 서버의 이름(기본값: "mcp-openapi-server")
  • SERVER_VERSION - 서버 버전(기본값: "1.0.0")
  • TRANSPORT_TYPE - 사용할 전송 유형: "stdio" 또는 "http"(기본값: "stdio")
  • HTTP_PORT - HTTP 전송을 위한 포트(기본값: 3000)
  • HTTP_HOST - HTTP 전송을 위한 호스트(기본값: "127.0.0.1")
  • ENDPOINT_PATH - HTTP 전송을 위한 엔드포인트 경로(기본값: "/mcp")

명령줄 인수

npx @ivotoby/openapi-mcp-server \ --api-base-url https://api.example.com \ --openapi-spec https://api.example.com/openapi.json \ --headers "Authorization:Bearer token123,X-API-Key:your-api-key" \ --name "my-mcp-server" \ --version "1.0.0" \ --transport http \ --port 3000 \ --host 127.0.0.1 \ --path /mcp

보안 고려 사항

  • HTTP 전송은 DNS 재바인딩 공격을 방지하기 위해 Origin 헤더를 검증합니다.
  • 기본적으로 HTTP 전송은 localhost(127.0.0.1)에만 바인딩됩니다.
  • 다른 호스트에 노출하는 경우 추가 인증을 구현하는 것을 고려하세요.

디버깅

디버그 로그를 보려면:

  1. Claude Desktop에서 stdio 전송을 사용하는 경우:
    • Claude Desktop 로그에 로그가 나타납니다.
  2. HTTP 전송을 사용하는 경우:
    npx @ivotoby/openapi-mcp-server --transport http 2>debug.log

개발자를 위한

개발 도구

  • npm run build - TypeScript 소스를 빌드합니다.
  • npm run clean - 빌드 아티팩트 제거
  • npm run typecheck - TypeScript 유형 검사를 실행합니다.
  • npm run lint - ESLint 실행
  • npm run dev - 소스 파일을 감시하고 변경 사항을 다시 빌드합니다.
  • npm run inspect-watch - 변경 사항에 대한 자동 다시 로드와 함께 검사기를 실행합니다.

개발 워크플로

  1. 저장소를 복제합니다
  2. 종속성 설치: npm install
  3. 개발 환경 시작: npm run inspect-watch
  4. src/ 에 있는 TypeScript 파일을 변경하세요.
  5. 서버가 자동으로 재구축되고 다시 시작됩니다.

기여하다

  1. 저장소를 포크하세요
  2. 기능 브랜치 생성
  3. 변경 사항을 만드세요
  4. 테스트 및 린팅 실행: npm run typecheck && npm run lint
  5. 풀 리퀘스트 제출

특허

MIT

-
security - not tested
A
license - permissive license
-
quality - not tested

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.

모델 컨텍스트 프로토콜을 통해 대규모 언어 모델이 OpenAPI 사양에 정의된 REST API를 검색하고 상호 작용할 수 있도록 하는 서버입니다.

  1. 개요
    1. 사용자를 위한 빠른 시작
      1. 옵션 1: Claude Desktop(Stdio Transport)과 함께 사용
      2. 옵션 2: HTTP 클라이언트와 함께 사용(HTTP 전송)
    2. 운송 유형
      1. Stdio 전송(기본값)
      2. 스트리밍 가능한 HTTP 전송
    3. 구성 옵션
      1. 환경 변수
      2. 명령줄 인수
    4. 보안 고려 사항
      1. 디버깅
        1. 개발자를 위한
          1. 개발 도구
          2. 개발 워크플로
          3. 기여하다
        2. 특허

          Related MCP Servers

          • -
            security
            A
            license
            -
            quality
            An MCP server that exposes HTTP methods defined in an OpenAPI specification as tools, enabling interaction with APIs via the Model Context Protocol.
            Last updated 5 months ago
            2
            Python
            MIT License
          • -
            security
            F
            license
            -
            quality
            A server based on Model Context Protocol that parses Swagger/OpenAPI documents and generates TypeScript types and API client code for different frameworks (Axios, Fetch, React Query).
            Last updated 4 months ago
            21
            1
            TypeScript
          • A
            security
            F
            license
            A
            quality
            A Model Context Protocol server that enables large language models to interact with Apache Superset databases through REST API, supporting database queries, table lookups, field information retrieval, and SQL execution.
            Last updated 3 months ago
            4
            3
            TypeScript
          • -
            security
            A
            license
            -
            quality
            A Model Context Protocol server that provides standardized interfaces for interacting with Ollama API, offering JSON responses, error handling, and intelligent guidance for LLM-based API calls.
            Last updated 4 months ago
            Python
            MIT License
            • Linux
            • Apple

          View all related MCP servers

          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/ivo-toby/mcp-openapi-server'

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