OpenAPI MCP Server

OpenAPI MCP Server

Exposes an MCP server over HTTP that allows searching and executing OpenAPI operations from any OpenAPI spec URL, with session variable storage.

Category
Visit Server

README

OpenAPI MCP Server (Hono + Node.js)

This project exposes an MCP server over HTTP using Hono at /mcp.

It gives three tools:

  • api_search: find operations from an OpenAPI spec
  • api_execute: call one operation by operationId (or method + path)
  • session: store and read session variables (token, ids, etc.)

Requirements

  • Node.js 18+ installed

Install

npm install

Run

npm run dev

Server endpoints:

  • http://localhost:3000/
  • http://localhost:3000/health
  • http://localhost:3000/mcp

Configure environment (optional)

  • OPENAPI_SPEC_URL: OpenAPI JSON URL (default: https://ag.nischal-dahal.com.np/api-docs-json)
  • OPENAPI_SERVER_FILE_CACHE=1: optional, enable server-side file cache (disabled by default)
  • API_BASE_URL: override API base URL used for execution
  • PORT: HTTP server port (default 3000)

If the spec URL is temporarily unavailable (for example 502), the MCP server stays alive and returns a structured tool error with recovery hints instead of crashing.

Set OpenAPI URL via request headers (recommended)

You can provide spec configuration without session storage:

  • ?url= query param on MCP endpoint (recommended for static MCP config)
  • url header on MCP request
  • authorization: optional auth header used when fetching the spec URL

Example:

POST /mcp?url=api.example.com/openapi.json
authorization: Bearer YOUR_TOKEN

Use with an MCP client

Add an MCP server entry that points to this URL:

{
  "mcpServers": {
    "openapi-hono": {
      "url": "https://dx.lexicon.website/mcp?url=https://ag.nischal-dahal.com.np/api-docs-json"
    }
  }
}

Where to set the OpenAPI spec URL

You can set the spec URL in three ways:

  1. MCP URL query (recommended): configure .../mcp?url=... in your MCP client.
https://your-domain/mcp?url=https://your-api.com/openapi.json
  1. Per request override: pass url in api_search or api_execute arguments.
{
  "name": "api_search",
  "arguments": {
    "query": "users list",
    "url": "api.example.com/openapi.json"
  }
}

Typical usage flow

  1. Find operations:
{
  "name": "api_search",
  "arguments": {
    "query": "login auth token",
    "limit": 10
  }
}
  1. Execute operation:
{
  "name": "api_execute",
  "arguments": {
    "operationId": "auth_login",
    "body": {
      "email": "user@example.com",
      "password": "secret"
    },
    "extractVariables": {
      "token": "$.data.token"
    }
  }
}
  1. Reuse stored session token automatically (or inspect with session tool):
{
  "name": "session",
  "arguments": {
    "action": "getVariables"
  }
}

Note: only auth/token data is stored in session; OpenAPI URL is not read from session anymore.

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
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
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
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