Skip to main content

Installation

Requirements

  • Node.js >=20.11 (declared in engines).

Install

npm install @powerduck/openapi-mcp-server

Yarn:

yarn add @powerduck/openapi-mcp-server

pnpm:

pnpm add @powerduck/openapi-mcp-server

CLI

The package registers the openapi-mcp binary.

# global install
npm install -g @powerduck/openapi-mcp-server

# or run without installing
npx openapi-mcp --help

The CLI has a single serve command (see Quickstart).

ESM / CommonJS

Dual builds with bundled type declarations. No extra @types/* are required:

// ESM
import { buildMcpServer, startStdioServer } from "@powerduck/openapi-mcp-server";

// CommonJS
const { buildMcpServer, startStdioServer } = require("@powerduck/openapi-mcp-server");

Subpath export

ImportContents
@powerduck/openapi-mcp-serverCore library: spec loading, tool/prompt/resource generation, request execution, MCP server builder, stdio and HTTP transports.
@powerduck/openapi-mcp-server/serverThe admin HTTP server and auth middleware (startAdminServer, createAuthMiddleware).

Dependencies

These are installed automatically with the package:

  • @modelcontextprotocol/sdk — MCP protocol implementation.
  • @powerduck/openapi-parser — OpenAPI validation, dereferencing and upgrade.
  • express and cors — admin HTTP server and CORS.
  • axios — upstream HTTP client for tool execution.
  • commander — CLI framework.
  • js-yaml — YAML parsing.
  • multer — spec upload handling.
  • terser — minification of embedded Web UI assets.

Verify

npx openapi-mcp --help

Next steps