@abhishekkumar00019/swagger-mcp
@abhishekkumar00019/swagger-mcp
Swagger 2.0 또는 OpenAPI 3.x 사양을 즉시 호출 가능한 MCP 도구로 변환하는 동적 Model Context Protocol (MCP) 서버입니다.
OpenAPI/Swagger JSON 또는 YAML 사양 URL을 지정하면 모든 API 엔드포인트가 자동으로 Claude, Copilot, ChatGPT, Cursor, Windsurf 및 기타 MCP 지원 클라이언트를 위한 대화형 도구가 됩니다.
✨ 기능
🔄 동적 도구 생성 — 시작 시 Swagger 2.0 및 OpenAPI 3.x 사양을 자동으로 파싱합니다.
🛠️ 제로 보일러플레이트 — 사양 URL만 제공하면 모든 엔드포인트가 즉시 MCP 도구로 노출됩니다.
🔐 유연한 인증 지원 — 환경 변수 또는 CLI 플래그를 통해 Bearer 토큰, API 키, Basic Auth를 간편하게 구성할 수 있습니다.
🌐 스마트 Base URL 해석 — config → 사양 서버 정의 → 사양 원본 URL 순서로 base URL을 자동으로 유도합니다.
🔁 핫 리로딩 —
_swagger_mcp_reload도구를 사용하여 런타임에 사양을 실시간으로 다시 가져와 다시 파싱합니다.📝 풍부한 스키마 및 설명 — OpenAPI 매개변수와 요청 본문을 정확한 LLM 도구 호출을 위한 엄격한 JSON 스키마로 변환합니다.
⏱️ 구성 가능한 타임아웃 및 사용자 정의 헤더 — 사용자 정의 요청 헤더와 요청 타임아웃 임계값을 쉽게 설정할 수 있습니다.
Related MCP server: Swagger to MCP
🚀 빠른 시작
옵션 A: npx로 직접 실행 (설치 불필요)
SWAGGER_MCP_SPEC_URL=https://petstore.swagger.io/v2/swagger.json npx @abhishekkumar00019/swagger-mcp옵션 B: 전역 NPM 설치
npm install -g @abhishekkumar00019/swagger-mcp
SWAGGER_MCP_SPEC_URL=https://petstore.swagger.io/v2/swagger.json swagger-mcp옵션 C: 로컬 저장소 설정
저장소 클론 및 의존성 설치:
git clone https://github.com/itachiuchihadev/swagger-mcp.git cd swagger-mcp npm install프로젝트 빌드:
npm run build로컬에서 실행:
SWAGGER_MCP_SPEC_URL=https://petstore.swagger.io/v2/swagger.json node dist/index.js
⚙️ MCP 클라이언트 구성
다음은 npx @abhishekkumar00019/swagger-mcp를 사용하는 인기 MCP 클라이언트용 샘플 구성입니다.
1. Claude Desktop
claude_desktop_config.json에 추가하세요:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"swagger-mcp": {
"command": "npx",
"args": ["-y", "@abhishekkumar00019/swagger-mcp"],
"env": {
"SWAGGER_MCP_SPEC_URL": "https://petstore.swagger.io/v2/swagger.json",
"SWAGGER_MCP_BEARER_TOKEN": "your-api-token-here"
}
}
}
}2. Claude Code (CLI)
Claude Code CLI를 통해 직접 추가하세요:
claude mcp add swagger-mcp -- npx -y @abhishekkumar00019/swagger-mcp --spec-url https://petstore.swagger.io/v2/swagger.json또는 프로젝트 루트의 .mcp.json에 추가하세요:
{
"mcpServers": {
"swagger-mcp": {
"command": "npx",
"args": ["-y", "@abhishekkumar00019/swagger-mcp"],
"env": {
"SWAGGER_MCP_SPEC_URL": "https://petstore.swagger.io/v2/swagger.json"
}
}
}
}3. GitHub Copilot / VS Code
워크스페이스 또는 전역 VS Code 설정의 .vscode/mcp.json에 추가하세요:
{
"server": {
"swagger-mcp": {
"command": "npx",
"args": ["-y", "@abhishekkumar00019/swagger-mcp"],
"env": {
"SWAGGER_MCP_SPEC_URL": "https://petstore.swagger.io/v2/swagger.json",
"SWAGGER_MCP_API_KEY": "your-api-key"
}
}
}
}4. Cursor
.cursor/mcp.json에 추가하거나 Cursor 설정 → 기능 → MCP에서 구성하세요:
{
"mcpServers": {
"swagger-mcp": {
"command": "npx",
"args": ["-y", "@abhishekkumar00019/swagger-mcp"],
"env": {
"SWAGGER_MCP_SPEC_URL": "https://petstore.swagger.io/v2/swagger.json"
}
}
}
}5. Windsurf
~/.codeium/windsurf/mcp_config.json에 추가하세요:
{
"mcpServers": {
"swagger-mcp": {
"command": "npx",
"args": ["-y", "@abhishekkumar00019/swagger-mcp"],
"env": {
"SWAGGER_MCP_SPEC_URL": "https://petstore.swagger.io/v2/swagger.json"
}
}
}
}6. Roo Code / Cline (VS Code 확장 프로그램)
cline_mcp_settings.json(또는 roo_code_mcp_settings.json)에 추가하세요:
{
"mcpServers": {
"swagger-mcp": {
"command": "npx",
"args": ["-y", "@abhishekkumar00019/swagger-mcp"],
"env": {
"SWAGGER_MCP_SPEC_URL": "https://petstore.swagger.io/v2/swagger.json"
}
}
}
}7. ChatGPT 및 OpenAI (Custom GPTs / Assistants / API)
OpenAPI 사양 직접 가져오기 (네이티브 Custom GPT Actions): ChatGPT Custom GPT는 OpenAPI 사양을 기본적으로 지원합니다. 중간 서버 없이 Custom GPT Builder의 Actions 섹션에 Swagger/OpenAPI JSON/YAML 사양 URL을 직접 가져올 수 있습니다.
MCP HTTP/SSE 게이트웨이를 통한 연결:
HTTP/SSE 브리지(예: supergateway 또는 mcp-remote 사용)를 통해 ChatGPT 또는 OpenAI 에이전트를 이 MCP 서버에 연결하는 경우 SSE 프록시와 함께 swagger-mcp를 시작하세요:
npx supergateway --stdio "npx -y @abhishekkumar00019/swagger-mcp --spec-url https://petstore.swagger.io/v2/swagger.json" --port 80008. Zed Editor
~/.config/zed/settings.json에 추가하세요:
{
"context_servers": {
"swagger-mcp": {
"command": {
"path": "npx",
"args": ["-y", "@abhishekkumar00019/swagger-mcp"]
},
"env": {
"SWAGGER_MCP_SPEC_URL": "https://petstore.swagger.io/v2/swagger.json"
}
}
}
}🔧 구성 참조
모든 구성 매개변수는 환경 변수 또는 CLI 인수를 통해 제공할 수 있습니다. SWAGGER_MCP_SPEC_URL만 필수 매개변수입니다.
환경 변수 | CLI 인수 | 필수 | 기본값 | 설명 |
|
| 예 | — | Swagger/OpenAPI 사양 URL |
|
| 아니요 | 자동 유도 | 대상 API base URL 재정의 |
|
| 아니요 | — |
|
|
| 아니요 | — | API 키 헤더 값 |
|
| 아니요 |
| API 키용 사용자 정의 헤더 이름 |
|
| 아니요 | — | Basic Auth 사용자 이름 |
|
| 아니요 | — | Basic Auth 비밀번호 |
|
| 아니요 |
| HTTP 요청 타임아웃(밀리초) |
|
| 아니요 |
| JSON 문자열 형식의 추가 HTTP 헤더 |
🔑 인증 예시
여러 인증 방법을 동시에 설정할 수 있습니다:
# Bearer Token
SWAGGER_MCP_BEARER_TOKEN=sk-your-token-here
# API Key (Custom Header)
SWAGGER_MCP_API_KEY=your-api-key
SWAGGER_MCP_API_KEY_HEADER=X-Custom-Key
# Basic Auth
SWAGGER_MCP_BASIC_USER=admin
SWAGGER_MCP_BASIC_PASS=secret123[!NOTE] Bearer와 Basic Auth가 모두 지정된 경우 Basic Auth가
Authorization헤더를 덮어씁니다. 여러 헤더가 필요한 경우 Bearer 토큰과 API 키 헤더를 함께 사용하세요.
🏷️ 도구 이름 지정 전략
OpenAPI 사양의 엔드포인트는 다음 우선순위에 따라 MCP 도구로 변환됩니다:
우선순위 | 소스 | 예시 |
1순위 | 사양에 정의된 |
|
2순위 | 태그 + 메서드 + 경로 |
|
3순위 | 메서드 + 경로 |
|
🧰 기본 제공 메타 도구
도구 | 설명 |
| Swagger 사양을 실시간으로 다시 가져와 파싱합니다. 서버를 재시작하지 않고 API를 개발하거나 업데이트할 때 유용합니다. |
📁 프로젝트 구조
swagger-mcp/
├── package.json
├── tsconfig.json
├── src/
│ ├── index.ts # Entry point & CLI argument parser
│ ├── server.ts # MCP server initialization & tool registration
│ ├── swagger-parser.ts # OpenAPI 2.0/3.x spec fetcher & parser
│ ├── tool-builder.ts # Converts OpenAPI operations -> JSON Schema tools
│ ├── request-handler.ts # Proxies MCP tool calls to HTTP endpoints
│ ├── auth.ts # Authentication header builder
│ ├── config.ts # Environment & CLI configuration manager
│ └── types.ts # Shared TypeScript interfaces
└── dist/ # Compiled JavaScript output📄 라이선스
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Point Gecko at an OpenAPI spec; get first-call-correct, auth-hidden agent tools.
MCP server for AI access to Swagger by SmartBear.
The OpenRouter for tools. One MCP connection gives any AI agent 254 hosted tools, pay per call.
Pay-per-use tool marketplace for AI agents. Search, price-check, and call APIs via MCP.
Related MCP Servers
- -licenseNot gradedqualityNot gradedmaintenanceDynamically generates MCP tools from Swagger/OpenAPI specifications by extracting swagger.json files at runtime. Enables natural language interaction with any REST API that has Swagger documentation.-
- AlicenseNot gradedqualityNot gradedmaintenanceAutomatically converts Swagger/OpenAPI specifications into dynamic MCP tools, enabling interaction with any REST API through natural language by loading specs from local files or URLs.-
- FlicenseNot gradedqualityDmaintenanceDynamically converts any API with an OpenAPI v3 specification into MCP tools for AI assistants. It supports multiple authentication methods including OAuth2, Bearer tokens, and API keys for flexible integration.-
- AlicenseNot gradedqualityCmaintenanceConverts any OpenAPI/Swagger API specification into MCP tools that AI assistants can use to interact with the API.377MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/itachiuchihadev/swagger_mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server