OpenAPI MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@OpenAPI MCP Serversearch for 'login' in the API spec"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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 specapi_execute: call one operation byoperationId(ormethod + path)session: store and read session variables (token, ids, etc.)
Requirements
Node.js 18+ installed
Related MCP server: OpenAPI MCP Server
Install
npm installRun
npm run devServer endpoints:
http://localhost:3000/http://localhost:3000/healthhttp://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 executionPORT: HTTP server port (default3000)
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)urlheader on MCP requestauthorization: optional auth header used when fetching the spec URL
Example:
POST /mcp?url=api.example.com/openapi.json
authorization: Bearer YOUR_TOKENUse 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:
MCP URL query (recommended): configure
.../mcp?url=...in your MCP client.
https://your-domain/mcp?url=https://your-api.com/openapi.jsonPer request override: pass
urlinapi_searchorapi_executearguments.
{
"name": "api_search",
"arguments": {
"query": "users list",
"url": "api.example.com/openapi.json"
}
}Typical usage flow
Find operations:
{
"name": "api_search",
"arguments": {
"query": "login auth token",
"limit": 10
}
}Execute operation:
{
"name": "api_execute",
"arguments": {
"operationId": "auth_login",
"body": {
"email": "user@example.com",
"password": "secret"
},
"extractVariables": {
"token": "$.data.token"
}
}
}Reuse stored session token automatically (or inspect with
sessiontool):
{
"name": "session",
"arguments": {
"action": "getVariables"
}
}Note: only auth/token data is stored in session; OpenAPI URL is not read from session anymore.
Related MCP Connectors
Query, browse, and automate OmegaAI workspaces from any MCP client. Streamable HTTP with OAuth 2.0.
Read-only MCP server over the APIs.io catalog — discover APIs, providers, tags & artifacts.
MCP server for AI access to Swagger by SmartBear.
Host your MCP tool over streamable HTTP in one command.
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceMCP server providing token-efficient access to OpenAPI/Swagger specs via MCP Resources for client-side exploration.116 npm76MIT
- FlicenseNot gradedqualityDmaintenanceDynamically creates an MCP server from any OpenAPI schema, enabling seamless integration with tools like Prompteus and Claude.4-
- AlicenseNot gradedqualityBmaintenanceDynamically converts any OpenAPI v3 specification into a fully-functional Model Context Protocol (MCP) server.7Mozilla Public 2.0
- AlicenseNot gradedqualityCmaintenanceRuntime MCP server that dynamically bridges any OpenAPI 3.x spec to MCP tools.6 npmMIT