Featured

Deploy OpenClaw in 60 seconds — 20% off logoDeploy OpenClaw in 60 seconds — 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free
6,000+ web scrapers for your AI agent, start free logo6,000+ web scrapers for your AI agent, start free

Apify gives your agent live web data: 6,000+ prebuilt scrapers and actors, MCP-ready. Sign up free with $5 in usage credits.

Try Apify free
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it — secured from day one.

Get it set up for you
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free
Reach 48,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here

Works with

Claude CodeClaude DesktopCursorVS CodeClineCodex CLIOpenClaw+ any MCP client

Install to Claude Code

This server doesn't publish a one-line install command. Follow the setup in the source repository.

Summary

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

README.md

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.

See related servers & alternatives →

Related MCP servers

Browse all →

Related guides

Hand-picked reading to help you choose and use Vector & Memory servers.