Track MCP LogoTrack MCP
Track MCP LogoTrack MCP

The world's largest repository of Model Context Protocol servers. Discover, explore, and submit MCP tools.

Product

  • Categories
  • Top MCP
  • New & Updated
  • Submit MCP

Company

  • About

Legal

  • Privacy Policy
  • Terms of Service
  • Cookie Policy

© 2026 TrackMCP. All rights reserved.

Built with ❤️ by Krishna Goyal

    Openapi2mcp

    **Automatically generate FAST Model-Context-Protocol (MCP) servers from OpenAPI/Swagger specs.**

    0 stars
    Python
    Updated Jun 3, 2025

    Table of Contents

    • Installation
    • Usage / Commands
    • generate
    • check
    • version
    • Examples
    • Project Structure
    • License

    Table of Contents

    • Installation
    • Usage / Commands
    • generate
    • check
    • version
    • Examples
    • Project Structure
    • License

    Documentation

    openapi2mcp

    A tool to convert OpenAPI 3.x specifications to FastMCP servers.

    Installation

    bash
    poetry install

    Usage / Commands

    openapi2mcp provides a command-line interface to generate and manage MCP server code from OpenAPI specifications.

    generate

    Generates the MCP server Python code from an OpenAPI specification file.

    Syntax:

    bash
    openapi2mcp generate [OPTIONS]

    Options:

    • -i, --input-file PATH: Path to the OpenAPI specification file (JSON or YAML). (Required)
    • -o, --output-file PATH: Path to the output Python file for the generated MCP server. (Required)
    • -t, --transport [stdio|google_pubsub]: The transport mechanism for the MCP server. (Default: stdio)
    • --llms-txt-file PATH: Optional path to generate an llms.txt file, which provides a description of the generated tools and resources for language models. If not specified, llms.txt will be created in the same directory as the output server file.
    • --mount TEXT: Optional mount path for resources (e.g., /myapi/v1). (Default: "")

    Example:

    bash
    openapi2mcp generate --input-file examples/example_openapi.yaml --output-file generated_server.py --transport stdio --mount "/api"

    This command will parse examples/example_openapi.yaml, generate an MCP server file named generated_server.py using the stdio transport, and set the resource mount path to /api. It will also generate an llms.txt file in the same directory as generated_server.py.

    check

    Checks a generated MCP server Python file for basic code validity, including syntax and presence of key MCP patterns.

    Syntax:

    bash
    openapi2mcp check --server-file PATH

    Options:

    • --server-file PATH: Path to the generated MCP server Python file to check. (Required)

    Example:

    bash
    openapi2mcp check --server-file generated_server.py

    version

    Displays the version of the openapi2mcp tool.

    Syntax:

    bash
    openapi2mcp version

    Example:

    bash
    openapi2mcp version

    Examples

    See example implementations:

    • HTTP Server
    • SSE Server
    • STDIO Server
    • Sample OpenAPI spec

    Project Structure

    • openapi2mcp/parser.py: OpenAPI specification parser
    • openapi2mcp/generator.py: FastMCP server code generator
    • openapi2mcp/cli.py: Command-line interface

    License

    MIT - See LICENSE

    Similar MCP

    Based on tags & features

    • CH

      Chuk Mcp Linkedin

      Python00
    • PU

      Pursuit Mcp

      Python00
    • HE

      Hello Mcp

      Python00
    • GR

      Gradle Mcp

      Python00

    Trending MCP

    Most active this week

    • PL

      Playwright Mcp

      TypeScript·
      22.1k
    • SE

      Serena

      Python·
      14.5k
    • MC

      Mcp Playwright

      TypeScript·
      4.9k
    • MC

      Mcp Server Cloudflare

      TypeScript·
      3.0k
    View All MCP Servers

    Similar MCP

    Based on tags & features

    • CH

      Chuk Mcp Linkedin

      Python00
    • PU

      Pursuit Mcp

      Python00
    • HE

      Hello Mcp

      Python00
    • GR

      Gradle Mcp

      Python00

    Trending MCP

    Most active this week

    • PL

      Playwright Mcp

      TypeScript·
      22.1k
    • SE

      Serena

      Python·
      14.5k
    • MC

      Mcp Playwright

      TypeScript·
      4.9k
    • MC

      Mcp Server Cloudflare

      TypeScript·
      3.0k