Think of this as a universal adapter that turns any OpenAPI spec into MCP tools your AI assistant can call. Point it at a Swagger URL like Petstore or LinkedIn's API docs, and it dynamically generates tools for every endpoint. Run it headless to proxy an existing REST API, or use the full HAPI server for greenfield projects. The CLI makes it dead simple to serve a spec locally, deploy to Cloudflare Workers, or spin up a Docker container. It handles authentication, CORS, and TLS out of the box. Reach for this when you want Claude to interact with REST APIs without writing custom integration code for each one.
HAPI_FQDNdefault: localhostFully Qualified Domain Name for the HAPI server (used in MCP tool URLs)
HAPI_HOMEdefault: /app/.hapiDirectory path for HAPI configuration and specs. Should be mounted as a volume in Docker
PROJECT_NAMEThe name of the project/API (alternative to positional argument)
HAPI_OPENAPIOpenAPI spec URL or path (alternative to --openapi flag)
HAPI_URLBackend API base URL (alternative to --url flag)
HAPI_PORTdefault: 3030Server port (alternative to --port flag) - this is the internal container port
HAPI_HEADLESSdefault: trueEnable headless mode (alternative to --headless flag)
HAPI_MCPdefault: trueEnable MCP mode (alternative to --mcp flag)
HAPI_DEVEnable development mode (alternative to --dev flag)
HAPI_CORSComma-separated allowed CORS origins (alternative to --cors flag)
HAPI_CONFIG_FILESComma-separated configuration files (alternative to --filename flag)
NODE_ENVdefault: productionNode environment (development, production). 'development' enables verbose logging and debugging features.