OpenAPI MCP Server

OpenAPI MCP Server

A server that implements the Model Context Protocol (MCP) with StreamableHTTP transport, enabling standardized interaction with model services through a RESTful API interface.

Category
Visit Server

README

OpenAPI MCP Server

A Model Context Protocol (MCP) server with StreamableHTTP transport implementation for handling OpenAPI specifications and model service interactions

Overview

This server provides a standardized way to interact with model services through a RESTful API interface. It implements the Model Context Protocol (MCP) and is designed to be easily configurable. Simply set up your .env file, and the server is ready to run.

It implements the Model Context Protocol (MCP) specification and supports OpenAPI documentation.

Features

  • OpenAPI 3.0.0 compliant API documentation
  • Model service API documentation retrieval
  • Model service invocation with parameter handling
  • TypeScript implementation for type safety

Prerequisites

  • Node.js (v20 or higher)
  • npm (v6 or higher)

Quick Start

  1. Clone the repository:

    git clone https://github.com/oneWalker/openapi-mcp-server.git
    cd openapi-mcp-server
    
  2. Install dependencies:

    npm install
    
  3. Configure your environment: Create a .env file in the project root and add your configuration. See the Configuration section for details.

  4. Run the server:

    npm run build
    npm run start
    

Installation

  1. Clone the repository
  2. Install dependencies:
npm install

Development

Building the Project

npm run build

Running in Development Mode

npm run watch

Starting the Server

npm  run start

Configuration

Create a .env file in the root of the project to configure the server.

# The base URL for the original API server
BASE_SERVER_URL= https://api.example.com

# The path to the OpenAPI specification file (can be a local file or a URL).
OPENAPI_PATH=./example.yaml or ./example.json # example.yaml is just for demo

# The port for the MCP server to run on
PORT=8000

API Endpoints

Get Model Service API Documentation

GET /api/model/services/{ID}

Retrieves the API documentation for a specific model service.

Parameters:

  • ID (path, required): Model service ID
  • authorization (header, required): Bearer token for authentication

Call Model Service

POST /api/model/services/

Invokes a specific model service with provided parameters.

Parameters:

  • id (path, required): Model service ID

Request Body:

{
  "id": "123"
}

Project Structure

openapi-mcp-server/
├── src/              # Source code
├── build/            # Compiled JavaScript files
├── example.yaml # OpenAPI specification
├── package.json      # Project configuration
└── tsconfig.json     # TypeScript configuration

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

Please see the CONTRIBUTING.md file for details on our code of conduct, and the process for submitting pull requests to us.

Reporting Issues

We use GitHub Issues to track public bugs. Report a bug by opening a new issue; it's that easy!

Dependencies

  • openapi-mcp-generator: OpenAPI specification generator
    • Note: This project requires a pending fix from the openapi-mcp-generator library. See this pull request.
  • @modelcontextprotocol/sdk: MCP SDK for protocol implementation
  • express: Web framework
  • dotenv: Environment variable management
  • got: HTTP client

Development Dependencies

  • TypeScript
  • @types/express
  • @types/node

License

MIT License - See LICENSE file for details

Authors

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured