@mcp-com-ai/hapi 1.0.1-beta.260912 → 1.0.2-beta.260914

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,113 @@
1
+ <!--
2
+ MCP.com.ai — Server Registry
3
+ Deploying & Registering MCP Servers
4
+ -->
5
+
6
+ <p align="center">
7
+ <img src="https://img.shields.io/badge/MCP-Model%20Context%20Protocol-1193b0?style=for-the-badge" />
8
+ <img src="https://img.shields.io/badge/Server%20Registry-Deploy%20%26%20Discover-da7756?style=for-the-badge" />
9
+ </p>
10
+
11
+ <h1 align="center">MCP Server Registry Integration</h1>
12
+
13
+ <p align="center">
14
+ <b>Build Once. Deploy Everywhere. Discover Globally.</b><br/>
15
+ Self-host, deploy, and register MCP servers with confidence using HAPI CLI, Docker, or Cloudflare Workers.
16
+ </p>
17
+
18
+ <p align="center">
19
+ <a href="https://mcp.com.ai"><b>Website</b></a>
20
+ ·
21
+ <a href="https://docs.mcp.com.ai"><b>Docs</b></a>
22
+ ·
23
+ <a href="https://registry.modelcontextprotocol.io/?q=ai.com.mcp"><b>MCP Registry</b></a>
24
+ ·
25
+ <a href="https://run.mcp.com.ai"><b>Run MCP</b></a>
26
+ ·
27
+ <a href="https://hapi.mcp.com.ai"><b>HAPI CLI</b></a>
28
+ </p>
29
+
30
+ ---
31
+
32
+ # HAPI CLI ![NPM Version](https://img.shields.io/npm/v/%40mcp-com-ai%2fhapi)
33
+
34
+ `@mcp-com-ai/hapi` provides the `hapi` command. Install it with the document
35
+ plugin(s) you plan to use; HAPI detects whether `--specs` points to an OpenAPI
36
+ or Arazzo document and starts the matching installed plugin.
37
+
38
+ ## Install and run
39
+
40
+ ```sh
41
+ bun add -g \
42
+ @mcp-com-ai/hapi@1.0.1-beta.260912 \
43
+ @mcp-com-ai/plugin-openapi@1.0.1-beta.260912 \
44
+ @mcp-com-ai/plugin-arazzo@1.0.1-beta.260912
45
+ ```
46
+
47
+ > **Note:** The `--headless` flag runs the MCP server with a backend up and running (Brownfield) without the need to code (and duplicate) the business logic.
48
+
49
+ ```sh
50
+ hapi serve --specs ./my-api.yaml --headless --port 3000
51
+ ```
52
+
53
+ Scaffolding and serving a new project (Greenfield development)
54
+
55
+ ```sh
56
+ # scaffolding a new project (new code/Greenfield) - ONLY if you want to implement the API code from scratch
57
+ hapi init --specs ./my-api.yaml
58
+ # Serve the API, both as MCP and RESTful API
59
+ hapi serve --specs ./my-api.yaml --mcp --port 3000
60
+ ```
61
+
62
+ The MCP endpoint is `http://localhost:3000/mcp`.
63
+
64
+ ```sh
65
+ # Test the MCP, list available tools
66
+ curl http://localhost:3000/mcp \
67
+ --header 'Accept: application/json' \
68
+ --header 'Content-Type: application/json' \ \
69
+ --header 'User-Agent: hapi' \
70
+ --data '{
71
+ "jsonrpc": "2.0",
72
+ "method": "tools/list",
73
+ "params": {},
74
+ "id": 123
75
+ }'
76
+
77
+ # Test a traditional RESTful endpoint (in your OAS/Swagger document)
78
+ curl http://localhost:3000/my-rest-endpoint \
79
+ --header 'Accept: application/json' \
80
+ --header 'Content-Type: application/json' \
81
+ --header 'User-Agent: hapi' \
82
+ --data '{
83
+ "key": "value"
84
+ }'
85
+ ```
86
+
87
+ ## Choose a plugin
88
+
89
+ | You want to serve | Install | Start it |
90
+ | ------------------------------------------ | ------------------------------- | -------------------------------------------------------------- |
91
+ | An OpenAPI API | `@mcp-com-ai/plugin-openapi` | `hapi serve --specs ./openapi.yaml --headless --url http://my-api.server.com` |
92
+ | An Arazzo workflow | `@mcp-com-ai/plugin-arazzo` | `hapi serve --specs ./workflow.yaml --headless --url http://my-api.server.com` |
93
+ | Either document type on Cloudflare Workers | `@mcp-com-ai/plugin-cloudflare` | `hapi cloudflare deploy --specs https://example.com/spec.yaml --headless --url http://my-api.server.com` |
94
+
95
+ `hapi openapi serve`, `hapi arazzo serve`, and `hapi workflows serve` are also
96
+ available when their corresponding plugin is installed. `workflows` and
97
+ `arazzo` are aliases.
98
+
99
+ ## How the packages fit together
100
+
101
+ The CLI discovers installed plugins and presents one command experience. It
102
+ installs its engine dependencies automatically; you normally do **not** install
103
+ `@mcp-com-ai/core`, `@mcp-com-ai/shared-utils`, or `@mcp-com-ai/plugin-sdk`
104
+ yourself. Keep the CLI and selected plugins on the same HAPI release version.
105
+
106
+ ```sh
107
+ hapi plugins list
108
+ hapi doctor
109
+ ```
110
+
111
+ Use `hapi plugins list` to confirm the capabilities available to this command.
112
+ For a full quick start and security guidance, see the
113
+ [HAPI MCP README](https://www.npmjs.com/package/@mcp-com-ai/hapi).