← Index

HAPI MCP Server

ai.com.mcp/hapi-mcp·v0.6.0·Other
Quality Score
84
/100

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

§01  Install
Remote endpoint

Streamable HTTP / SSE endpoint. Add to any MCP client that supports remote servers.

https://{HAPI_FQDN}:{HAPI_PORT}/mcp
Claude Desktop (Docker)
{
  "mcpServers": {
    "hapi-mcp": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "docker.io/hapimcp/hapi-cli:0.6.0"
      ],
      "env": {
        "HAPI_FQDN": "localhost",
        "HAPI_HOME": "/app/.hapi",
        "PROJECT_NAME": "<project_name>",
        "HAPI_OPENAPI": "<hapi_openapi>",
        "HAPI_URL": "<hapi_url>",
        "HAPI_PORT": "3030",
        "HAPI_HEADLESS": "true",
        "HAPI_MCP": "true",
        "HAPI_DEV": "<hapi_dev>",
        "HAPI_CORS": "<hapi_cors>",
        "HAPI_CONFIG_FILES": "<hapi_config_files>",
        "NODE_ENV": "production"
      }
    }
  }
}
§02  Environment variables
HAPI_FQDN

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

HAPI_HOME

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

PROJECT_NAME

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

HAPI_OPENAPI

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

HAPI_URL

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

HAPI_PORT

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

HAPI_HEADLESS

Enable headless mode (alternative to --headless flag)

HAPI_MCP

Enable MCP mode (alternative to --mcp flag)

HAPI_DEV

Enable development mode (alternative to --dev flag)

HAPI_CORS

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

HAPI_CONFIG_FILES

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

NODE_ENV

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

§03  MCP Quality Score  ·  methodology
freshness
19
completeness
20
installability
25
documentation
15
stability
5
§04  Alternatives in Other