JUHE API Marketplace
abhishek-iiit avatar
MCP Server

Swagger MCP Server

A lightweight server that enables interaction with the Swagger Petstore API using the Model Context Protocol, allowing operations on pets, stores, and users through dynamically loaded OpenAPI specifications.

1
GitHub Stars
11/22/2025
Last Updated
No Configuration
Please check the documentation below.
  1. Home
  2. MCP Servers
  3. Swagger-MCP-server

README Documentation

Swagger-MCP-server

Swagger-MCP-server is a lightweight Model Context Protocol (MCP) server that interacts with the Swagger Petstore API using an OpenAPI 3.0 specification. The server dynamically loads API tools defined in openapi.json and exposes endpoints that mimic those of the Petstore API using the mcp.server.fastmcp module.


๐Ÿ“ฆ Features

  • โœ… Dynamic loading of OpenAPI 3.0 spec (Petstore).
  • ๐Ÿพ Full support for Petstore operations: Pets, Stores, Users.
  • โšก Built using FastAPI.
  • ๐Ÿ› ๏ธ Utilizes the mcp server CLI and dynamic tool registration.

๐Ÿš€ Installation Guide

  1. Clone the repository
git clone https://github.com/abhishek-iiit/Swagger-MCP-server.git
cd Swagger-MCP-server
  1. Create and activate a virtual environment
python3 -m venv .venv
source .venv/bin/activate
  1. Install dependencies
pip install -r requirements.txt

๐Ÿงช Running the Server

To start the server:

python main.py

This will start an MCP server that registers endpoints as defined in the openapi.json file and serves them via the Petstore API interface.

๐Ÿ“š API Endpoints

The server mirrors the Swagger Petstore API. It includes operations for:

Pets

  • Add a new pet
  • Update an existing pet
  • Find pets by status or tags
  • Get pet by ID
  • Delete a pet
  • Stores
  • Place an order
  • Get order by ID
  • Check inventory
  • Users
  • Create users
  • Login/logout
  • Get user by username
  • Update/delete user

๐Ÿ“ฆ Dependencies

Dependencies are listed in requirements.txt and include:

  • fastapi: High-performance API framework.
  • httpx: Async-compatible HTTP client.
  • mcp[cli]: Model Context Protocol server framework.
  • jsonschema: JSON Schema validation.

Install them via:

pip install -r requirements.txt

Quick Actions

View on GitHubView All Servers

Key Features

Model Context Protocol
Secure Communication
Real-time Updates
Open Source

Boost your projects with Wisdom Gate LLM API

Supporting GPT-5, Claude-4, DeepSeek v3, Gemini and more.

Enjoy a free trial and save 20%+ compared to official pricing.

Learn More
JUHE API Marketplace

Accelerate development, innovate faster, and transform your business with our comprehensive API ecosystem.

JUHE API VS

  • vs. RapidAPI
  • vs. API Layer
  • API Platforms 2025
  • API Marketplaces 2025
  • Best Alternatives to RapidAPI

For Developers

  • Console
  • Collections
  • Documentation
  • MCP Servers
  • Free APIs
  • Temp Mail Demo

Product

  • Browse APIs
  • Suggest an API
  • Wisdom Gate LLM
  • Global SMS Messaging
  • Temp Mail API

Company

  • What's New
  • Welcome
  • About Us
  • Contact Support
  • Terms of Service
  • Privacy Policy
Featured on Startup FameFeatured on Twelve ToolsFazier badgeJuheAPI Marketplace - Connect smarter, beyond APIs | Product Huntai tools code.marketDang.ai
Copyright ยฉ 2025 - All rights reserved