加载中…
HAPI MCP 服务器: Dynamically exposes OpenAPI REST API as MCP 工具 用于 AI assistants。
HAPI MCP Server 是 ChatHome Skills 收录的 MCP 条目,来源为 Official MCP Registry,质量分 67/100。 作为 Model Context Protocol 服务器,它向 Claude、Cursor、Copilot 等兼容 MCP 的 LLM 客户端暴露可直接调用的工具,让 agent 的能力超出模型内置范围。 该条目由 ChatHome Skills 的每日抓取从官方 registry 和 GitHub 发现查询中收录,每次运行都会重新核验仓库事实、新鲜度信号和安装元数据。 质量分综合了官方 registry 收录情况、可用安装命令、许可证完整性、仓库活跃度和 GitHub star 趋势,完整算法说明见来源页。安装命令已列于上方,可直接复制使用。 在将 HAPI MCP Server 加入生产 agent 工作流前,请核对上方的最近更新日期和仓库状态——下方事实快照是最近一次抓取的时点值。
mcp add ai.com.mcp/hapi-mcp https://{HAPI_FQDN}:{HAPI_PORT}/mcp运行此命令前,请先核对上游源码。
{
"_meta": {
"io.modelcontextprotocol.registry/official": {
"status": "active",
"isLatest": true,
"updatedAt": "2026-01-07T00:32:01.41626Z",
"publishedAt": "2026-01-07T00:32:01.41626Z",
"statusChangedAt": "2026-01-07T00:32:01.41626Z"
}
},
"server": {
"name": "ai.com.mcp/hapi-mcp",
"_meta": {
"io.modelcontextprotocol.registry/publisher-provided": {
"license": "MIT",
"examples": [
{
"name": "Quick Start with a local API spec",
"command": "docker run -p 3030:3030 -v ~/.hapi:/app/.hapi hapimcp/hapi-cli:0.6.0 serve petstore --port 3030 --headless --url https://petstore3.swagger.io/api/v3",
"description": "Save specs in ~/.hapi/specs. Download example if not present: https://petstore3.swagger.io/api/v3/swagger.json"
},
{
"name": "Custom OpenAPI with Environment Variables",
"command": "docker run -p 3030:3030 -e HAPI_OPENAPI=https://api.example.com/openapi.json -e HAPI_URL=https://api.example.com hapimcp/hapi-cli:0.6.0 serve my-api --headless",
"description": "Serve a custom API using environment variables"
},
{
"name": "Docker Compose Setup",
"config": "See https://docs.mcp.com.ai/deployment/docker#docker-compose-example",
"description": "Run with persistent volumes and custom specs"
}
],
"keywords": [
"openapi",
"rest-api",
"api-first",
"headless",
"docker"
],
"publisher": "La Rebelion Labs",
"documentation": "https://docs.mcp.com.ai/deployment/docker"
}
},
"title": "HAPI MCP Server",
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
"remotes": [
{
"url": "https://{HAPI_FQDN}:{HAPI_PORT}/mcp",
"type": "streamable-http",
"variables": {
"HAPI_FQDN": {
"format": "string",
"default": "localhost",
"description": "Fully Qualified Domain Name for the HAPI server"
},
"HAPI_PORT": {
"format": "number",
"default": "3030",
"description": "Port for the HAPI server"
}
}
}
],
"version": "0.6.0",
"packages": [
{
"transport": {
"url": "https://{HAPI_FQDN}:{HAPI_PORT}/mcp",
"type": "streamable-http",
"headers": [
{
"name": "Authorization",
"format": "string",
"isSecret": true,
"description": "Authorization token for accessing the MCP server"
}
]
},
"identifier": "docker.io/hapimcp/hapi-cli:0.6.0",
"runtimeHint": "docker",
"registryType": "oci",
"packageArguments": [
{
"name": "serve",
"type": "positional",
"format": "string",
"default": "serve",
"valueHint": "serve",
"isRequired": true,
"description": "Command to start the HAPI MCP server"
},
{
"name": "projectName",
"type": "positional",
"format": "string",
"valueHint": "petstore",
"description": "The name of the project/API to serve (e.g., 'petstore'). Optional when using HAPI_OPENAPI environment variable"
},
{
"name": "--port",
"type": "named",
"format": "number",
"default": "3030",
"valueHint": "port",
"description": "The port to listen on inside the container"
},
{
"name": "--headless",
"type": "named",
"format": "boolean",
"default": "true",
"description": "Run in headless mode (serve MCP-only, no business logic)"
},
{
"name": "--mcp",
"type": "named",
"format": "boolean",
"default": "true",
"description": "The server provides REST API's business logic AND also exposes them as MCP tools"
},
{
"name": "--dev",
"type": "named",
"format": "boolean",
"description": "Enable development mode with verbose logging"
},
{
"name": "--url",
"type": "named",
"format": "string",
"valueHint": "url",
"description": "The full URL for the backend API server (overrides OpenAPI spec servers). Uses OAS server URL if not provided"
},
{
"name": "--openapi",
"type": "named",
"format": "string",
"valueHint": "openapi",
"description": "OpenAPI spec file path or URL to use instead of loading from HAPI_HOME"
},
{
"name": "--cors",
"type": "named",
"format": "string",
"valueHint": "origins",
"description": "Comma-separated list of allowed origins for CORS (e.g., 'http://localhost:3000,https://example.com')"
},
{
"name": "--filename",
"type": "named",
"format": "string",
"valueHint": "files",
"description": "Comma-separated list of OAS configuration files to apply (can be URLs)"
},
{
"name": "--cert",
"type": "named",
"format": "string",
"valueHint": "path",
"description": "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"
},
{
"name": "--key",
"type": "named",
"format": "string",
"valueHint": "path",
"description": "Path to SSL key file for HTTPS. Volume mount required if using Docker"
}
],
"runtimeArguments": [
{
"name": "-p",
"type": "named",
"format": "string",
"default": "3030:3030",
"valueHint": "port",
"isRequired": true,
"description": "Port mapping for the host to container (e.g., '3030:3030'). Adjust second port if changing internal container port (HAPI_PORT)"
},
{
"name": "-v",
"type": "named",
"format": "string",
"default": "~/.hapi:/app/.hapi",
"valueHint": "volume",
"isRepeated": true,
"description": "Volume mapping for HAPI configuration directory"
}
],
"environmentVariables": [
{
"name": "HAPI_FQDN",
"format": "string",
"default": "localhost",
"description": "Fully Qualified Domain Name for the HAPI server (used in MCP tool URLs)"
},
{
"name": "HAPI_HOME",
"format": "string",
"default": "/app/.hapi",
"description": "Directory path for HAPI configuration and specs. Should be mounted as a volume in Docker"
},
{
"name": "PROJECT_NAME",
"format": "string",
"description": "The name of the project/API (alternative to positional argument)"
},
{
"name": "HAPI_OPENAPI",
"format": "string",
"description": "OpenAPI spec URL or path (alternative to --openapi flag)"
},
{
"name": "HAPI_URL",
"format": "string",
"description": "Backend API base URL (alternative to --url flag)"
},
{
"name": "HAPI_PORT",
"format": "number",
"default": "3030",
"description": "Server port (alternative to --port flag) - this is the internal container port"
},
{
"name": "HAPI_HEADLESS",
"format": "boolean",
"default": "true",
"description": "Enable headless mode (alternative to --headless flag)"
},
{
"name": "HAPI_MCP",
"format": "boolean",
"default": "true",
"description": "Enable MCP mode (alternative to --mcp flag)"
},
{
"name": "HAPI_DEV",
"format": "boolean",
"description": "Enable development mode (alternative to --dev flag)"
},
{
"name": "HAPI_CORS",
"format": "string",
"description": "Comma-separated allowed CORS origins (alternative to --cors flag)"
},
{
"name": "HAPI_CONFIG_FILES",
"format": "string",
"description": "Comma-separated configuration files (alternative to --filename flag)"
},
{
"name": "NODE_ENV",
"format": "string",
"default": "production",
"description": "Node environment (development, production). 'development' enables verbose logging and debugging features."
}
]
}
],
"repository": {
"url": "https://github.com/larebelion/hapimcp",
"source": "github"
},
"websiteUrl": "https://docs.mcp.com.ai/components/hapi-server/hapi-cli",
"description": "HAPI MCP server: Dynamically exposes OpenAPI REST APIs as MCP tools for AI assistants"
}
}