Enables configuration of the MCP server through environment variables loaded from a .env file, allowing customization of server settings such as base URL, OpenAPI specification path, and port number.
Provides the web framework foundation for the MCP server, enabling RESTful API endpoints for model service documentation retrieval and invocation.
Integrated for issue tracking and contribution management, with specific links to report bugs and submit pull requests to the project repository.
Serves as the runtime environment for the MCP server, with specific version requirements (v20 or higher) to ensure compatibility and performance.
Used for package management and running scripts for building and starting the server, with version requirements (v6 or higher) specified.
Provides type safety for the MCP server implementation, enhancing code reliability and developer experience.
Supports OpenAPI specifications in YAML format, allowing the MCP server to process and serve API documentation from YAML files.
OpenAPI MCP Server
A Quick Way to Create an MCP Server with StreamableHTTP
transport implementation from OpenAPI docs.
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
- Clone the repository:
- Install dependencies:
- Configure your environment:
Create a
.env
file in the project root and add your configuration. See the Configuration section for details. - Run the server:
Installation
- Clone the repository
- Install dependencies:
Development
Building the Project
Running in Development Mode
Starting the Server
Configuration
Create a .env
file in the root of the project to configure the server.
API Endpoints
Get Model Service API Documentation
Retrieves the API documentation for a specific model service.
Parameters:
ID
(path, required): Model service IDauthorization
(header, required): Bearer token for authentication
Call Model Service
Invokes a specific model service with provided parameters.
Parameters:
id
(path, required): Model service ID
Request Body:
Project Structure
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.
- Note: This project requires a pending fix from the
@modelcontextprotocol/sdk
: MCP SDK for protocol implementationexpress
: Web frameworkdotenv
: Environment variable managementgot
: HTTP client
Development Dependencies
TypeScript
@types/express
@types/node
License
MIT License - See LICENSE file for details
Authors
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
A server that implements the Model Context Protocol (MCP) with StreamableHTTP transport, enabling standardized interaction with model services through a RESTful API interface.
Related MCP Servers
- AsecurityAlicenseAqualityA Model Context Protocol (MCP) server that provides JSON-RPC functionality through OpenRPC.Last updated -2733JavaScriptApache 2.0
- -securityAlicense-qualityMCP Server simplifies the implementation of the Model Context Protocol by providing a user-friendly API to create custom tools and manage server workflows efficiently.Last updated -43TypeScriptMIT License
- -securityAlicense-qualityMCP Server provides a simpler API to interact with the Model Context Protocol by allowing users to define custom tools and services to streamline workflows and processes.Last updated -132TypeScriptMIT License
- -securityAlicense-qualityAn MCP server that exposes HTTP methods defined in an OpenAPI specification as tools, enabling interaction with APIs via the Model Context Protocol.Last updated -2PythonMIT License