TA

tyktechnologies/api-to-mcp

Developer tools

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

51 stars 21 forks 품질 70 트렌드 0MIT

tyktechnologies/api-to-mcp는 MCP 서버 후보가 https://github.com/tyktechnologies/api-to-mcp.에서 수입되었습니다

개요

tyktechnologies/api-to-mcp는 MCP 서버 후보가 https://github.com/tyktechnologies/api-to-mcp.에서 수입되었습니다

개요(AI 번역)

OpenAPI/Swagger 명세에서 MCP (모델 Context Protocol) 서버를 창조하는 공구는, AI 조수를 당신의 API와 상호 작용하는 가능하게 합니다. ** 특정 API 또는 서비스에 대한 자체 브랜드 및 사용자 정의 MCPs**를 선택하십시오.

개요

이 프로젝트는 OpenAPI 사양을 MCP 도구로 변환하는 동적 MCP 서버를 만듭니다. 그것은 모델 Context 프로토콜을 통해 AI 조수와 REST API의 원활한 통합을 가능하게, AI-accessible 도구로 모든 API를 돌.

특징

  • 파일 또는 HTTP/HTTPS URL에서 OpenAPI specs의 동적 로딩
  • 파일 또는 HTTP/HTTPS URL에서 로드된 OpenAPI 오버레이 지원
  • MCP 툴에 OpenAPI 작업의 사용자 정의 매핑
  • glob 패턴을 사용하여 작업의 고급 필터링 operationId 및 URL 경로
  • 형식 보전 및 위치 메타데이터와 포괄적인 매개 변수 처리
  • API 인증 처리
  • OpenAPI 메타데이터 (제목, 버전, 설명) MCP 서버 구성
  • Hierarchical description fallbacks (운영 설명 → 작동 요약 → 경로 요약)
  • 환경변수와 CLI를 통한 사용자 정의 HTTP 헤더 지원
  • API 요청 추적 및 식별을위한 X-MCP 헤더

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.

README

원문 README의 일부입니다. 원문 보기.

OpenAPI to MCP Server

A tool that creates MCP (Model Context Protocol) servers from OpenAPI/Swagger specifications, enabling AI assistants to interact with your APIs. Create your own branded and customized MCPs for specific APIs or services.

Overview

This project creates a dynamic MCP server that transforms OpenAPI specifications into MCP tools. It enables seamless integration of REST APIs with AI assistants via the Model Context Protocol, turning any API into an AI-accessible tool.

Features

  • Dynamic loading of OpenAPI specs from file or HTTP/HTTPS URLs
  • Support for OpenAPI Overlays loaded from files or HTTP/HTTPS URLs
  • Customizable mapping of OpenAPI operations to MCP tools
  • Advanced filtering of operations using glob patterns for both operationId and URL paths
  • Comprehensive parameter handling with format preservation and location metadata
  • API authentication handling
  • OpenAPI metadata (title, version, description) used to configure the MCP server
  • Hierarchical description fallbacks (operation description → operation summary → path summary)
  • Custom HTTP headers support via environment variables and CLI
  • X-MCP header for API request tracking and identification
  • Support for custom x-mcp extensions at the path level to override tool names and descriptions

Using with AI Assistants

This tool creates an MCP server that allows AI assistants to interact with APIs defined by OpenAPI specifications. The primary way to use it is by configuring your AI assistant to run it directly as an MCP tool.

Setting Up in Claude Desktop

  1. Ensure you have Node.js installed on your computer

  2. Open Claude Desktop and navigate to Settings > Developer

  3. Edit the configuration file (or it will be created if it doesn’t exist):

    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%\Claude\claude_desktop_config.json
  4. Add this configuration (customize as needed):

{
  "mcpServers": {
    "api-tools": {
      "command": "npx",
      "args": [
        "-y",
        "@tyk-technologies/api-to-mcp@latest",
        "--spec",
        "https://petstore3.swagger.io/api/v3/openapi.json"
      ],
      "enabled": true
    }
  }
}
  1. Restart Claude Desktop
  2. You should now see a hammer icon in the chat input box. Click it to access your API tools.

Customizing the Configuration

You can adjust the args array to customize your MCP server with various options:

{
  "mcpServers": {
    "my-api": {
      "command": "npx",
      "args": [
        "-y",
        "@tyk-technologies/api-to-mcp@latest",
        "--spec",
        "./path/to/your/openapi.json",
        "--overlays",
        "./path/to/overlay.json,https://example.com/api/overlay.json",
        "--whitelist",
        "getPet*,POST:/users/*",
        "--targetUrl",
        "https://api.example.com"
      ],
GitHub에서 전체 README 보기

설치

npx -y @tyk-technologies/api-to-mcp@latest --spec https://petstore3.swagger.io/api/v3/openapi.json
MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →

설정

{ "mcpServers": { "api-tools": { "command": "npx", "args": [ "-y", "@tyk-technologies/api-to-mcp@latest", "--spec", "https://petstore3.swagger.io/api/v3/openapi.json" ], "enabled": true } } }