Skip to main content
Glama

mcpify

모든 API를 MCP 서버로 변환하세요. 단 하나의 명령어로. 코드 없이.

npm License: MIT CI

npx mcpify https://petstore3.swagger.io/api/v3/openapi.json
✓ mcpify: Petstore v1.0.0 — 19 tools
  base: https://petstore3.swagger.io/api/v3
  transport: stdio

이게 전부입니다. 이제 AI 에이전트가 전체 Petstore API에 액세스할 수 있습니다. 설치할 SDK도, 작성할 접착 코드도, 배포할 서버도 필요 없습니다.

OpenAPI 사양을 지정하기만 하면 → 완벽하게 작동하는 MCP 서버를 얻을 수 있습니다.


왜 사용하는가

에이전트를 구축하는 모든 팀은 같은 벽에 부딪힙니다. 모델이 API를 호출해야 하는데, 각각을 연결하려면 며칠씩 걸리는 맞춤형 MCP 서버 코드, 스키마 변환, 인증 배관 작업이 필요하기 때문입니다.

mcpify는 이를 단 하나의 명령어로 압축합니다. OpenAPI 사양은 이미 엔드포인트, 매개변수, 스키마, 인증 등 모든 것을 설명하고 있습니다. 우리는 이를 런타임에 MCP 서버로 변환하며, 코드 생성 단계나 유지 관리해야 할 소스 파일이 없습니다.

Related MCP server: mcpify

설치

npx를 사용하여 필요할 때마다 사용하세요 (권장):

npx mcpify <spec>

또는 전역으로 설치하세요:

npm install -g mcpify

Node.js 18 이상이 필요합니다.

사용법

호스팅된 사양에서 사용

npx mcpify https://api.example.com/openapi.json

로컬 파일에서 사용 (JSON 또는 YAML)

npx mcpify ./spec.yaml

단일 curl 명령에서 사용

npx mcpify --curl "curl -H 'Authorization: Bearer xxx' https://api.github.com/user/repos"

모든 curl 명령에서 단일 도구 MCP 서버를 생성합니다. 본문(Body)은 파싱되어 입력 스키마로 변환됩니다.

서버를 실행하지 않고 도구 목록 확인

npx mcpify list ./spec.json

독립형, 직접 수정 가능한 프로젝트 생성

npx mcpify generate ./spec.json ./my-mcp
cd my-mcp && npm install && npm start

캐싱, 사용자 지정 인증 흐름, 후처리 등 동작을 변경하고 싶을 때 사용하세요.

인증

실행하기 전에 환경 변수를 설정하세요. mcpify는 사양의 securitySchemes를 읽고 자동으로 일치시킵니다.

# HTTP bearer schemes
export MCPIFY_BEARER_TOKEN=xxx

# apiKey schemes (header or query, as the spec says)
export MCPIFY_API_KEY=xxx

# HTTP basic
export MCPIFY_BASIC_AUTH=user:password

# Per-scheme override (use the scheme's name from the spec)
export MCPIFY_AUTH_<SCHEME_NAME>=xxx

# Free-form extra headers on every request
export MCPIFY_HEADERS='{"X-Trace-Id":"abc","X-Internal":"1"}'

대규모 사양 필터링

Stripe의 전체 OpenAPI는 약 600개의 엔드포인트로 구성되어 있습니다. 대부분의 에이전트는 이 모든 것이 필요하지 않으며, 대부분의 클라이언트는 그렇게 많은 도구를 처리할 수 없습니다. 다음과 같이 줄이세요:

# Only the customers tag
npx mcpify ./stripe.json --tag customers

# Only operations whose tool name matches a regex
npx mcpify ./stripe.json --filter "^createCustomer|^getCustomer"

# Hard cap
npx mcpify ./stripe.json --max-tools 30

Claude Desktop과 함께 사용

~/.config/claude/claude_desktop_config.json (Linux/macOS) 또는 %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "petstore": {
      "command": "npx",
      "args": ["-y", "mcpify", "https://petstore3.swagger.io/api/v3/openapi.json"]
    },
    "github": {
      "command": "npx",
      "args": ["-y", "mcpify", "--curl",
        "curl -H 'Authorization: Bearer ghp_xxx' https://api.github.com/user/repos"]
    }
  }
}

Cursor / Cline / Claude Code와 함께 사용

같은 방식입니다. command와 args로 MCP 서버를 구성할 수 있는 곳이라면 어디든 작동합니다. mcpify는 stdio를 사용합니다.

# Claude Code:
claude mcp add petstore -- npx -y mcpify https://petstore3.swagger.io/api/v3/openapi.json

프로그래밍 방식 API

import { loadOpenApiSpec, parseOpenApi, serve } from "mcpify";

const raw = await loadOpenApiSpec("./spec.yaml");
const spec = parseOpenApi(raw);
await serve(spec, {
  baseUrl: "https://staging.example.com",
  filterTag: "users",
});

작동 원리

┌─────────────────┐    ┌─────────────────┐    ┌─────────────────┐
│   OpenAPI spec  │ ─→ │ mcpify  runtime │ ─→ │   MCP client    │
│  (JSON / YAML)  │    │  (stdio server) │    │ (Claude/Cursor) │
└─────────────────┘    └─────────────────┘    └─────────────────┘
                            │
                            ↓ tool call
                       ┌─────────┐
                       │  fetch  │ → your API
                       └─────────┘
  1. 사양 역참조 ($ref 해결).

  2. 각 작업을 MCP 도구로 변환: 경로/쿼리/헤더 매개변수는 입력 속성이 되고, 요청 본문은 중첩된 body 속성이 됩니다.

  3. 도구 호출 시 URL을 구성하고, 환경 변수에서 인증 정보를 첨부하여 요청을 보내고 응답을 반환합니다.

코드 생성 없음. 재시작 루프 없음. 사양이 진실의 원천(source of truth)입니다.

제한 사항

  • 스트리밍 응답 본문 — 현재 버퍼링되며 64KB로 제한됩니다.

  • OAuth2 흐름 — 자동으로 실행되지 않음; MCPIFY_BEARER_TOKEN을 통해 미리 가져온 토큰을 제공하세요.

  • 파일 업로드 (multipart/form-data) — 아직 지원되지 않습니다.

  • 웹훅 / 콜백 — 범위 밖입니다.

  • Swagger 2.0 — 부분 지원; 최상의 결과를 위해 먼저 OpenAPI 3로 변환하세요.

위의 모든 사항에 대한 PR을 환영합니다.

개발

git clone https://github.com/qualuo/mcpify
cd mcpify
npm install
npm run build
npm test

라이선스

MIT

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Automatically converts Swagger/OpenAPI specifications into MCP servers, enabling AI agents to interact with any REST API through natural language by exposing endpoints as AI-friendly tools.
    3
    -
  • A
    license
    Not graded
    quality
    C
    maintenance
    Converts any OpenAPI specification into an MCP server, allowing AI assistants to interact with REST APIs through natural language.
    9 npm
    1
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Turns any OpenAPI REST or GraphQL API into an MCP server, allowing AI assistants like Claude to interact with APIs without writing code.
    8 npm
    MIT