appcrane-mcp 1.0.0

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 AppCrane
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,118 @@
1
+ # appcrane-mcp
2
+
3
+ The standalone MCP connector for **[AppCrane](https://glick.run/appcrane.html)** — the self-hosted deployment platform for AI-built, agent-deployed apps.
4
+
5
+ AppCrane exposes an MCP server at `<instance>/api/mcp` that requires an `X-API-Key`. This package is a thin **stdio** MCP server that:
6
+
7
+ 1. Serves the full `appcrane_*` tool catalog for **`tools/list` introspection with zero configuration** — it ships a bundled `catalog.json`, so registries and sandboxes (e.g. Glama) can start it in a container and introspect it offline.
8
+ 2. **Proxies real `tools/call`** to your own AppCrane instance once `APPCRANE_URL` and `APPCRANE_KEY` are set.
9
+
10
+ It runs anywhere Node 20+ is available, via `npx appcrane-mcp`.
11
+
12
+ > **Licensing:** this connector is **MIT**. The AppCrane platform it talks to is a separate
13
+ > project and is **AGPL-3.0**. Installing this package does not pull the platform in — the
14
+ > connector is a client that talks to an AppCrane instance you host yourself.
15
+
16
+ ## How you connect
17
+
18
+ There is no hosted service and no AppCrane account. The flow is entirely your own:
19
+
20
+ 1. You self-host AppCrane (AGPL) somewhere you control.
21
+ 2. You issue an API key from that instance.
22
+ 3. Your agent runs this connector locally over **stdio** (`npx -y appcrane-mcp`).
23
+ 4. The connector forwards each `tools/call` to `${APPCRANE_URL}/api/mcp` with your
24
+ `X-API-Key`. Your key stays in your own MCP client config; it is never sent anywhere
25
+ except the instance URL you set.
26
+
27
+ ## Install / run
28
+
29
+ ```bash
30
+ npx appcrane-mcp
31
+ ```
32
+
33
+ With no environment variables it still starts and answers `tools/list` from the bundled catalog (57 tools). To actually invoke tools against your instance, set:
34
+
35
+ | Env var | Required | Description |
36
+ | --- | --- | --- |
37
+ | `APPCRANE_URL` | for calls | Your instance base URL, e.g. `https://crane.example.com` |
38
+ | `APPCRANE_KEY` | for calls | Your AppCrane API key (sent as `X-API-Key`) |
39
+ | `APPCRANE_GITHUB_TOKEN` | optional | A GitHub PAT (sent as `X-Github-Token`) to unlock the `github_*` passthrough tools |
40
+
41
+ ## MCP client configuration
42
+
43
+ This is a **stdio** command server (not an HTTP endpoint). Add it to your MCP client config like this:
44
+
45
+ ```json
46
+ {
47
+ "mcpServers": {
48
+ "appcrane": {
49
+ "command": "npx",
50
+ "args": ["-y", "appcrane-mcp"],
51
+ "env": {
52
+ "APPCRANE_URL": "https://crane.example.com",
53
+ "APPCRANE_KEY": "your_api_key",
54
+ "APPCRANE_GITHUB_TOKEN": "ghp_optional_for_github_passthrough"
55
+ }
56
+ }
57
+ }
58
+ }
59
+ ```
60
+
61
+ Claude Code CLI:
62
+
63
+ ```bash
64
+ claude mcp add appcrane \
65
+ --env APPCRANE_URL=https://crane.example.com \
66
+ --env APPCRANE_KEY=your_api_key \
67
+ -- npx -y appcrane-mcp
68
+ ```
69
+
70
+ ## How it works
71
+
72
+ - **`tools/list`**
73
+ - If `APPCRANE_URL` + `APPCRANE_KEY` are set → connects to `${APPCRANE_URL}/api/mcp` (StreamableHTTP, header `X-API-Key`, plus `X-Github-Token` when the GitHub token is set), fetches the **live, auth-filtered** tool list, and returns it. If the instance is unreachable it falls back to the bundled catalog.
74
+ - If not configured → returns the **bundled static catalog** (`catalog.json`). This path needs no env vars, which is what a registry's introspection sandbox hits.
75
+ - **`tools/call`** → requires `APPCRANE_URL` + `APPCRANE_KEY`; forwards the call to the backend and returns its result. Without configuration it returns a clear "not configured" error.
76
+
77
+ ## Docker
78
+
79
+ ```bash
80
+ docker build -t appcrane-mcp .
81
+
82
+ # Introspection only (no config) — starts and serves tools/list:
83
+ docker run -i --rm appcrane-mcp
84
+
85
+ # Full use:
86
+ docker run -i --rm \
87
+ -e APPCRANE_URL=https://crane.example.com \
88
+ -e APPCRANE_KEY=your_api_key \
89
+ appcrane-mcp
90
+ ```
91
+
92
+ ## Development
93
+
94
+ ```bash
95
+ npm install
96
+ npm run build # tsc -> dist/
97
+ npm run gen:catalog # regenerate catalog.json from the AppCrane platform source
98
+ npm run check:catalog # fail if catalog.json has drifted from that source
99
+ node scripts/test-list.mjs # smoke test: spawn over stdio, assert tools/list
100
+ ```
101
+
102
+ Both catalog scripts import the platform's own `getToolCatalog()` from a sibling
103
+ `deployhub` checkout; set `APPCRANE_SRC` to point at its `server/services/mcpTools.js`
104
+ if yours lives elsewhere.
105
+
106
+ **Run `npm run check:catalog` before every release.** Nothing regenerates the catalog
107
+ automatically and the two repos share no CI, so it rots silently — it has already been
108
+ caught 22 tools behind the platform (35 advertised against 57 real).
109
+
110
+ The bundled `catalog.json` is generated from the real tool definitions in the AppCrane platform (`deployhub/server/services/mcpTools.js`) and reflects the AWS-aligned tool vocabulary (`appcrane_set_secret`, `appcrane_get_secret`, `appcrane_cp`, and the `stage` parameter). It is committed so the package ships self-contained.
111
+
112
+ ## About AppCrane
113
+
114
+ AppCrane is a self-hosted home for AI-built and AI-deployed apps. This connector is MIT-licensed to maximize adoption; the platform itself is AGPL.
115
+
116
+ - This connector (MIT): https://github.com/gitayg/appcrane-mcp
117
+ - Platform (AGPL-3.0): https://github.com/gitayg/appCrane
118
+ - Product page: https://glick.run/appcrane.html