makomori
MCP Servermakomoripublic

openapi fetch mcp

A CLI tool that converts OpenAPI endpoints into Model Context Protocol (MCP) tools, allowing seamless API integration with MCP-compatible clients.

Repository Info

4
Stars
0
Forks
4
Watchers
0
Issues
TypeScript
Language
-
License

About This Server

A CLI tool that converts OpenAPI endpoints into Model Context Protocol (MCP) tools, allowing seamless API integration with MCP-compatible clients.

Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.

Documentation

openapi-fetch-mcp

A CLI tool to register OpenAPI endpoints as Model Context Protocol (MCP) tools. You can make API requests through an MCP client such as Cursor.

https://github.com/user-attachments/assets/b8f7e7f9-ca8f-475a-84fc-609e03c7ae96

Features

  • Fetches OpenAPI YAML from a URL or local file (Currently, only YAML format is supported)
  • Registers each GET endpoint as an MCP tool (This library only supports GET requests for safety reasons)
  • Supports custom headers and environment variable configuration

Cursor MCP setting

When using a local OpenAPI spec

    "openapi-fetch-mcp": {
      "command": "npx",
      "args": ["openapi-fetch-mcp"],
      "env": {
        "API_URL": "https://your-api-url.com",
        "CUSTOM_HEADERS": "{\"X-Your-Api-Key\":\"xxxxxxxxx\"}",
        "OPENAPI_FILE_PATH": "/FULL_PATH_TO_OPEN_API_YAML_FILE"
      }
    }

When using a remote OpenAPI spec

    "openapi-fetch-mcp": {
      "command": "npx",
      "args": ["openapi-fetch-mcp"],
      "env": {
        "API_URL": "https://your-api-url.com",
        "CUSTOM_HEADERS": "{\"X-Your-Api-Key\":\"xxxxxxxxx\"}",
        "OPENAPI_URL": "https://your-open-api-url.com"
      }
    }

Environment Variables

  • OPENAPI_URL: URL to the OpenAPI YAML file (optional if using OPENAPI_FILE_PATH)
  • OPENAPI_FILE_PATH: Path to the local OpenAPI YAML file (optional if using OPENAPI_URL)
  • API_URL: Base URL for the API server
  • CUSTOM_HEADERS: (optional) JSON string for custom headers, e.g. '{"Authorization":"Bearer ..."}'

Example (Using PokeAPI)

    "openapi-fetch-mcp": {
      "command": "npx",
      "args": ["openapi-fetch-mcp"],
      "env": {
        "OPENAPI_URL": "https://raw.githubusercontent.com/PokeAPI/pokeapi/refs/heads/master/openapi.yml",
        "API_URL": "https://pokeapi.co"
      }
    }

License

MIT

Author

makomori

日本語

Quick Start

1

Clone the repository

git clone https://github.com/makomori/openapi-fetch-mcp
2

Install dependencies

cd openapi-fetch-mcp
npm install
3

Follow the documentation

Check the repository's README.md file for specific installation and usage instructions.

Repository Details

Ownermakomori
Repoopenapi-fetch-mcp
LanguageTypeScript
License-
Last fetched8/10/2025

Recommended MCP Servers

💬

Discord MCP

Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.

integrationsdiscordchat
🔗

Knit MCP

Connect AI agents to 200+ SaaS applications and automate workflows.

integrationsautomationsaas
🕷️

Apify MCP Server

Deploy and interact with Apify actors for web scraping and data extraction.

apifycrawlerdata
🌐

BrowserStack MCP

BrowserStack MCP Server for automated testing across multiple browsers.

testingqabrowsers

Zapier MCP

A Zapier server that provides automation capabilities for various apps.

zapierautomation