HAPI MCP Server
HAPI MCP server: Dynamically exposes OpenAPI REST APIs as MCP tools for AI assistants
Install
Add this to your client's MCP configuration (Claude Desktop: claude_desktop_config.json; Cursor: .cursor/mcp.json; VS Code and others use the same "mcpServers" shape).
claude mcp add --transport http hapi-mcp-server 'https://{HAPI_FQDN}:{HAPI_PORT}/mcp'
{
"mcpServers": {
"hapi-mcp-server": {
"type": "http",
"url": "https://{HAPI_FQDN}:{HAPI_PORT}/mcp"
}
}
}
docker.io/hapimcp/hapi-cli:0.6.0claude mcp add hapi-mcp-server -e 'HAPI_FQDN=localhost' -e 'HAPI_HOME=/app/.hapi' -e 'PROJECT_NAME=<PROJECT_NAME>' -e 'HAPI_OPENAPI=<HAPI_OPENAPI>' -e 'HAPI_URL=<HAPI_URL>' -e 'HAPI_PORT=3030' -e 'HAPI_HEADLESS=true' -e 'HAPI_MCP=true' -e 'HAPI_DEV=<HAPI_DEV>' -e 'HAPI_CORS=<HAPI_CORS>' -e 'HAPI_CONFIG_FILES=<HAPI_CONFIG_FILES>' -e 'NODE_ENV=production' -- docker run -i --rm docker.io/hapimcp/hapi-cli:0.6.0 '<serve>' '<petstore>' --port '<port>' --headless --mcp --dev --url '<url>' --openapi '<openapi>' --cors '<origins>' --filename '<files>' --cert '<path>' --key '<path>'
{
"mcpServers": {
"hapi-mcp-server": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"docker.io/hapimcp/hapi-cli:0.6.0",
"<serve>",
"<petstore>",
"--port",
"<port>",
"--headless",
"--mcp",
"--dev",
"--url",
"<url>",
"--openapi",
"<openapi>",
"--cors",
"<origins>",
"--filename",
"<files>",
"--cert",
"<path>",
"--key",
"<path>"
],
"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"
}
}
}
}
Environment variables
HAPI_FQDNFully Qualified Domain Name for the HAPI server (used in MCP tool URLs)HAPI_HOMEDirectory path for HAPI configuration and specs. Should be mounted as a volume in DockerPROJECT_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_PORTServer port (alternative to --port flag) - this is the internal container portHAPI_HEADLESSEnable headless mode (alternative to --headless flag)HAPI_MCPEnable 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_ENVNode environment (development, production). 'development' enables verbose logging and debugging features.
Frequently asked questions
What is HAPI MCP Server?
HAPI MCP server: Dynamically exposes OpenAPI REST APIs as MCP tools for AI assistants
How do I install HAPI MCP Server?
It runs as a remote server. In Claude Code: claude mcp add --transport http hapi-mcp-server 'https://{HAPI_FQDN}:{HAPI_PORT}/mcp'. For other clients, paste the JSON configuration from this page into their MCP settings.
Does HAPI MCP Server need an API key?
Its registry entry lists no required key or secret. Some features may still need an account with the service it connects to.
Is HAPI MCP Server open source?
Its code is public on GitHub, but the repository does not declare a standard license.
Who maintains HAPI MCP Server?
It is published by larebelion. AI.tn lists it but does not maintain or endorse it.
From the official MCP Registry. Listing is not an endorsement: review a server's code and permissions before giving it access to your data.