ai.com.mcp

hapi-mcp

HAPI MCP Server

HAPI MCP server: Dynamically exposes OpenAPI REST APIs as MCP tools for AI assistants

Hosted
Streamable HTTPofficialinfra

Deployment

Hosted
streamable-httphttps://{HAPI_FQDN}:{HAPI_PORT}/mcp

Package Details

docker.io/hapimcp/hapi-cli:0.6.0

TransportStreamable HTTP
Runtimedocker

Runtime Arguments

Named
-pRequired
Port mapping for the host to container (e.g., '3030:3030'). Adjust second port if changing internal container port (HAPI_PORT)
-v
Volume mapping for HAPI configuration directory

Package Arguments

Positional
serveRequired
Command to start the HAPI MCP server
petstore
The name of the project/API to serve (e.g., 'petstore'). Optional when using HAPI_OPENAPI environment variable
Named
--port
The port to listen on inside the container
--headless
Run in headless mode (serve MCP-only, no business logic)
--mcp
The server provides REST API's business logic AND also exposes them as MCP tools
--dev
Enable development mode with verbose logging
--url
The full URL for the backend API server (overrides OpenAPI spec servers). Uses OAS server URL if not provided
--openapi
OpenAPI spec file path or URL to use instead of loading from HAPI_HOME
--cors
Comma-separated list of allowed origins for CORS (e.g., 'http://localhost:3000,https://example.com')
--filename
Comma-separated list of OAS configuration files to apply (can be URLs)
--cert
Path to SSL certificate file for HTTPS. Volume mount required if using Docker. https://docs.mcp.com.ai/components/hapi-server/hapi-cli#running-with-tls-https
--key
Path to SSL key file for HTTPS. Volume mount required if using Docker

Environment Variables

HAPI_FQDN(str)
Default:localhost

Fully Qualified Domain Name for the HAPI server (used in MCP tool URLs)

HAPI_HOME(str)
Default:/app/.hapi

Directory path for HAPI configuration and specs. Should be mounted as a volume in Docker

PROJECT_NAME(str)

The name of the project/API (alternative to positional argument)

HAPI_OPENAPI(str)

OpenAPI spec URL or path (alternative to --openapi flag)

HAPI_URL(str)

Backend API base URL (alternative to --url flag)

HAPI_PORT(num)
Default:3030

Server port (alternative to --port flag) - this is the internal container port

HAPI_HEADLESS(bool)
Default:true

Enable headless mode (alternative to --headless flag)

HAPI_MCP(bool)
Default:true

Enable MCP mode (alternative to --mcp flag)

HAPI_DEV(bool)

Enable development mode (alternative to --dev flag)

HAPI_CORS(str)

Comma-separated allowed CORS origins (alternative to --cors flag)

HAPI_CONFIG_FILES(str)

Comma-separated configuration files (alternative to --filename flag)

NODE_ENV(str)
Default:production

Node environment (development, production). 'development' enables verbose logging and debugging features.