Get the FREE Ultimate OpenClaw Setup Guide →

openapi-spec

OpenAPIのファイルをうまい具合に取得して、パースしてMCP Protocolに則り吐き出してくれるくん

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio a-zara-n-openapi-spec-mcp-server node /path/to/openapi-mcp-server/build/index.js \
  --env PORT="3000 (or your desired port)" \
  --env DB_PATH="path/to/data/openapi/openapi.db" \
  --env OPENAPI_DIR="path/to/data/openapi"

How to use

This MCP server provides tooling to analyze, validate, and manage OpenAPI specifications. It exposes a suite of 17 tools organized into six categories—OpenAPI management, server information, path analysis, schema inspection, security, and responses—allowing you to load OpenAPI files, inspect paths and parameters, validate against the OpenAPI standard, and work with reusable components like schemas and responses. Clients (including MCP-enabled assistants) can interact with the server using the MCP tool-call protocol, issuing commands such as openapi_set_server_info to load specs, mcp_openapi_list_paths to enumerate endpoints, and mcp_openapi_get_path_info to explore a specific operation in detail. Start by loading your OpenAPI files into the data/openapi directory, then use the tool suite to query structure, validations, and metadata, enabling richer, context-aware conversations about your API definitions.

How to install

Prerequisites:

  • Node.js 18+ and npm
  • Git

Setup steps:

  1. Clone the repository:
git clone <repository-url>
cd openapi-mcp-server
  1. Install dependencies:
npm install
  1. Build the project:
npm run build
  1. Prepare data directory:
mkdir -p data/openapi
  1. Add your OpenAPI files to data/openapi (YAML/JSON) or subdirectories as needed.
  2. Start in development or production mode as described in the server's README, or integrate with a client using the MCP config above.

Notes:

  • Ensure the required environment variables (PORT, DB_PATH, OPENAPI_DIR) are set if you deploy using the provided mcp_config.

Additional notes

Tips and troubleshooting:

  • If the server won't start, check that the port is not in use and that dependencies are installed (npm install).
  • OpenAPI files must be valid YAML/JSON; validation is performed before loading specs into storage.
  • The SQLite database at data/openapi.db stores relationships between specs, paths, and components; ensure the data directory is writable.
  • For development debugging, enable verbose logging in the server configuration if supported by your deployment.
  • When adding new tools, follow the repository's tool structure to maintain consistency (tool.ts, handler.ts, validation.ts, types.ts, index.ts).

Related MCP Servers

Sponsor this space

Reach thousands of developers