Skip to main content
Glama

Swagger MCP | OpenAPI/Swagger MCP Tool


An OpenAPI/Swagger document mcp tool built on FastMCP, providing clean and efficient document querying and analysis capabilities.

基于 FastMCP 构建的 OpenAPI/Swagger MCP server, 更好更准确的编写前端代码和调用接口。

🚀 Quick Start | 快速开始

Method 1: Local Run | 本地运行

# Install dependencies
git clone https://github.com/username/swagger-mcp.git
cd swagger-mcp
pip install -r requirements.txt

export SWAGGER_URI="https://petstore.swagger.io/v2/swagger.json"

# Run server
fastmcp run swagger_mcp/server.py

# Or run directly
python swagger_mcp/server.py

Method 2: Docker | Docker 方式

docker run --env SWAGGER_URI=https://petstore.swagger.io/v2/swagger.json \
  --add-host="host.docker.internal:host-gateway" -p 8000:8000 \
  yangyaofei/swagger-mcp

🔧 Cursor IDE Integration | Cursor IDE 集成

Configuration | 配置

Add the following MCP configuration in Cursor 在 Cursor 中添加以下 MCP 配置:

{
  "mcpServers": {
    "swagger-mcp": {
      "url": "http://127.0.0.1:8000/mcp"
    }
  }
}

🛠️ Available Tools | 可用工具

Tool Name

Description

load_swagger

Load OpenAPI/Swagger documents

get_swagger_info

Get document basic information

list_apis

List all API endpoints

get_api_details

Get specific API details

search_apis

Search API endpoints

list_schemas

List all data models

get_schema_details

Get specific model details

🛠️ 可用工具

工具名称

功能描述

load_swagger

加载 OpenAPI/Swagger 文档

get_swagger_info

获取文档基本信息

list_apis

列出所有 API 端点

get_api_details

获取特定 API 详情

search_apis

搜索 API 端点

list_schemas

列出所有数据模型

get_schema_details

获取特定模型详情


Developed by Vibe Coding 🚀

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

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

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
    Enables AI assistants to load, parse, and query OpenAPI/Swagger documentation from URLs with intelligent search across endpoints, schemas, and authentication methods. Provides 10 specialized tools for comprehensive API exploration including path details, operation lookups, and multi-criteria search capabilities.
    Last updated
    4
  • A
    license
    -
    quality
    D
    maintenance
    Exposes Swagger/OpenAPI API documentation to AI models, enabling exploration, search, and interaction with endpoints, schemas, and execution of API calls.
    Last updated
    49
    2
    MIT

View all related MCP servers

Related MCP Connectors

  • Deploy production REST APIs from JSON schemas in seconds. Manage projects, schemas, and deployments.

  • Query your Google Sheets as structured JSON: list sheets and tabs, read schemas, filter rows.

  • Gateway between LLM agents and world data through eight tools and a bundled endpoint catalog.

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/yangyaofei/swagger-mcp'

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