OpenAPI

Exposes OpenAPI-defined REST API endpoints as MCP resources for easy discovery and interaction by MCP clients.
  • typescript

0

GitHub Stars

typescript

Language

7 months ago

First Indexed

3 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "mcp-mirror-ivo-toby_mcp-openapi-server": {
      "command": "npx",
      "args": [
        "-y",
        "@ivotoby/openapi-mcp-server"
      ],
      "env": {
        "API_HEADERS": "Authorization:Bearer token123,X-API-Key:your-api-key",
        "SERVER_NAME": "mcp-openapi-server",
        "API_BASE_URL": "https://api.example.com",
        "SERVER_VERSION": "1.0.0",
        "OPENAPI_SPEC_PATH": "https://api.example.com/openapi.json"
      }
    }
  }
}

You can expose OpenAPI-defined REST APIs as MCP resources so large language models can discover and interact with them through the MCP protocol. This server turns your OpenAPI spec into a discoverable MCP endpoint, enabling secure, structured API access without manual integration work.

How to use

Set up your MCP client to connect to the OpenAPI MCP server you configure. The server runs as a local or remote MCP endpoint that presents your API operations as MCP resources. You can browse available operations, pass requests, and receive structured responses through the MCP interface, making it easier for models to locate and use your API without bespoke integration for each endpoint.

How to install

Prerequisites you need before installation: Node.js and npm (Node 14+ is commonly required for MCP tooling). Ensure you have an MCP-compatible client ready to connect to the server.

  1. Create or locate your MCP client configuration file in your environment. This example assumes a JSON-based MCP configuration file is used by your client to discover and connect to MCP servers.

  2. Add the OpenAPI MCP server configuration snippet to enable the server. Include the environment values that reflect your API setup.

{
  "mcpServers": {
    "openapi": {
      "command": "npx",
      "args": ["-y", "@ivotoby/openapi-mcp-server"],
      "env": {
        "API_BASE_URL": "https://api.example.com",
        "OPENAPI_SPEC_PATH": "https://api.example.com/openapi.json",
        "API_HEADERS": "Authorization:Bearer token123,X-API-Key:your-api-key"
      }
    }
  }
}

Configuration

Environment variables you can configure for the OpenAPI MCP server include the base API URL, the location of the OpenAPI specification, and any required headers for API authentication.

The following keys appear in the server configuration and should reflect your actual API setup.

{
  "mcpServers": {
    "openapi": {
      "command": "npx",
      "args": ["-y", "@ivotoby/openapi-mcp-server"],
      "env": {
        "API_BASE_URL": "https://api.example.com",
        "OPENAPI_SPEC_PATH": "https://api.example.com/openapi.json",
        "API_HEADERS": "Authorization:Bearer token123,X-API-Key:your-api-key"
      }
    }
  }
}

Development and testing

To test changes locally, you can run the server in development mode if your setup supports it, then use your MCP client’s testing tools to inspect available resources and validate request/response behavior.

Configuration details and options

The OpenAPI MCP server reads these environment values to connect to your API and locate the OpenAPI specification. You can also specify a server name and version to identify the MCP server in your client.

Troubleshooting

If you encounter connection failures, verify that the API_BASE_URL and OPENAPI_SPEC_PATH are accessible from the environment where the MCP server runs. Confirm that API_HEADERS contain valid authentication credentials and that any required CORS or network restrictions allow MCP calls to reach the API.

Notes

This MCP server focuses on exposing OpenAPI-defined operations as MCP resources so you can integrate or test API usage with minimal setup. Ensure you keep your API keys secure and rotate credentials as needed.

Available tools

Build

Compile TypeScript sources to JavaScript and prepare artifacts for runtime.

Clean

Remove build artifacts and reset the workspace to a clean state.

Typecheck

Run TypeScript type checking to catch type errors early.

Dev

Start a watch mode that rebuilds on source changes for rapid iteration.

Inspect-watch

Run the inspector with automatic reload to test MCP interactions as you develop.

Lint

Run ESLint to enforce code quality and consistency.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational