mcp-openapi-server

This repository provides an OpenAPI MCP server, enabling Large Language Models to interact with REST APIs defined by OpenAPI specifications through the Model Context Protocol. It simplifies API discovery and

81
11

OpenAPI MCP Server

This repository hosts an OpenAPI MCP server, enabling Large Language Models to interact with REST APIs defined by OpenAPI specifications through the Model Context Protocol (MCP). It allows LLMs to discover and utilize REST APIs.

Quick Start

To use this server, configure it within Claude Desktop by modifying the claude_desktop_config.json file. Add the provided JSON configuration snippet, replacing placeholder environment variables like API_BASE_URL, OPENAPI_SPEC_PATH, and API_HEADERS with your actual API details.

Development Tools

The project offers several tools: npm run build builds the TypeScript source, npm run clean removes build artifacts, npm run typecheck performs type checking, npm run dev watches for changes and rebuilds, npm run inspect-watch runs the inspector with auto-reload, and npm run lint executes ESLint.

Configuration

The server is configurable via environment variables (API_BASE_URL, OPENAPI_SPEC_PATH, API_HEADERS, SERVER_NAME, SERVER_VERSION) or command-line arguments.

Development Workflow

Start the development environment with npm run inspect-watch, modify TypeScript files in src/, and the server will automatically rebuild. Use the MCP Inspector UI to test changes.

Debugging

Debug logs are outputted to stderr. In development mode, logs appear in the terminal running inspect-watch.

Contributing

Fork the repository, create a feature branch, make changes, run npm run typecheck and npm run lint, and submit a pull request.

License

MIT

Repository

IV
ivo-toby

ivo-toby/mcp-openapi-server

Created

December 5, 2024

Updated

March 27, 2025

Language

JavaScript

Category

Developer Tools