@mcp-com-ai/hapi 1.0.1-beta.260912 → 1.0.1-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,107 @@
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%2fhapimcp)
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
+ Scaffolding or serving a project
48
+
49
+ ```sh
50
+ # scaffolding a new project - ONLY if you want to implement the API code from scratch
51
+ hapi init --specs ./my-api.yaml
52
+ # Serve the API, both as MCP and RESTful API
53
+ hapi serve --specs ./my-api.yaml --mcp --port 3000
54
+ ```
55
+
56
+ The MCP endpoint is `http://localhost:3000/mcp`.
57
+
58
+ ```sh
59
+ # Test the MCP, list available tools
60
+ curl http://localhost:3000/mcp \
61
+ --header 'Accept: application/json' \
62
+ --header 'Content-Type: application/json' \ \
63
+ --header 'User-Agent: hapi' \
64
+ --data '{
65
+ "jsonrpc": "2.0",
66
+ "method": "tools/list",
67
+ "params": {},
68
+ "id": 123
69
+ }'
70
+
71
+ # Test a traditional RESTful endpoint (in your OAS/Swagger document)
72
+ curl http://localhost:3000/my-rest-endpoint \
73
+ --header 'Accept: application/json' \
74
+ --header 'Content-Type: application/json' \
75
+ --header 'User-Agent: hapi' \
76
+ --data '{
77
+ "key": "value"
78
+ }'
79
+ ```
80
+
81
+ ## Choose a plugin
82
+
83
+ | You want to serve | Install | Start it |
84
+ | ------------------------------------------ | ------------------------------- | -------------------------------------------------------------- |
85
+ | An OpenAPI API | `@mcp-com-ai/plugin-openapi` | `hapi serve --specs ./openapi.yaml --headless --url http://my-api.server.com` |
86
+ | An Arazzo workflow | `@mcp-com-ai/plugin-arazzo` | `hapi serve --specs ./workflow.yaml --headless --url http://my-api.server.com` |
87
+ | 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` |
88
+
89
+ `hapi openapi serve`, `hapi arazzo serve`, and `hapi workflows serve` are also
90
+ available when their corresponding plugin is installed. `workflows` and
91
+ `arazzo` are aliases.
92
+
93
+ ## How the packages fit together
94
+
95
+ The CLI discovers installed plugins and presents one command experience. It
96
+ installs its engine dependencies automatically; you normally do **not** install
97
+ `@mcp-com-ai/core`, `@mcp-com-ai/shared-utils`, or `@mcp-com-ai/plugin-sdk`
98
+ yourself. Keep the CLI and selected plugins on the same HAPI release version.
99
+
100
+ ```sh
101
+ hapi plugins list
102
+ hapi doctor
103
+ ```
104
+
105
+ Use `hapi plugins list` to confirm the capabilities available to this command.
106
+ For a full quick start and security guidance, see the
107
+ [HAPI MCP README](https://www.npmjs.com/package/@mcp-com-ai/hapi).