HAPI MCP Server
HAPI MCP server: Dynamically exposes OpenAPI REST APIs as MCP tools for AI assistants
Installation
Ajoutez ceci à la configuration MCP de votre client (Claude Desktop : claude_desktop_config.json ; Cursor : .cursor/mcp.json ; VS Code et les autres utilisent la même forme « mcpServers »).
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"
}
}
}
}
Variables d'environnement
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.
Questions fréquentes
Qu'est-ce que HAPI MCP Server ?
HAPI MCP server: Dynamically exposes OpenAPI REST APIs as MCP tools for AI assistants
Comment installer HAPI MCP Server ?
Il fonctionne comme serveur distant. Dans Claude Code : claude mcp add --transport http hapi-mcp-server 'https://{HAPI_FQDN}:{HAPI_PORT}/mcp'. Pour les autres clients, collez la configuration JSON de cette page dans leurs réglages MCP.
Faut-il une clé API pour HAPI MCP Server ?
Son entrée au registre n'indique aucune clé ni secret obligatoire. Certaines fonctions peuvent tout de même demander un compte auprès du service auquel il se connecte.
HAPI MCP Server est-il open source ?
Son code est public sur GitHub, mais le dépôt ne déclare pas de licence standard.
Qui maintient HAPI MCP Server ?
Il est publié par larebelion. AI.tn le référence sans le maintenir ni le recommander.
Issu du registre MCP officiel. Être listé n'est pas une recommandation : vérifiez le code et les permissions d'un serveur avant de lui donner accès à vos données.