@moor-sh/mcp 0.1.0 → 0.1.1
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 +101 -0
- package/package.json +2 -2
package/README.md
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# @moor-sh/mcp
|
|
2
|
+
|
|
3
|
+
MCP server for [moor](https://github.com/caiopizzol/moor) - lets AI agents (Claude Code, Cursor, etc.) manage your moor projects through standard MCP tools. Talks to moor's HTTP API; no repo clone needed.
|
|
4
|
+
|
|
5
|
+
Requires [Bun](https://bun.sh) on the machine running the MCP client. `bunx` fetches and runs `@moor-sh/mcp` directly as the client's MCP subprocess.
|
|
6
|
+
|
|
7
|
+
## Setup
|
|
8
|
+
|
|
9
|
+
The easiest path is the `moor mcp config` subcommand from [`@moor-sh/cli`](https://www.npmjs.com/package/@moor-sh/cli):
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
bunx @moor-sh/cli mcp config --client claude # or claude-code, codex
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
It prints a config snippet you paste into your MCP client. Or configure manually:
|
|
16
|
+
|
|
17
|
+
### Claude Code (`~/.claude.json`)
|
|
18
|
+
|
|
19
|
+
```json
|
|
20
|
+
{
|
|
21
|
+
"mcpServers": {
|
|
22
|
+
"moor": {
|
|
23
|
+
"command": "bunx",
|
|
24
|
+
"args": ["@moor-sh/mcp"],
|
|
25
|
+
"env": {
|
|
26
|
+
"MOOR_URL": "http://127.0.0.1:8080",
|
|
27
|
+
"MOOR_API_KEY": "your-api-key"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Codex (`~/.codex/config.toml`)
|
|
35
|
+
|
|
36
|
+
```toml
|
|
37
|
+
[mcp_servers.moor]
|
|
38
|
+
command = "bunx"
|
|
39
|
+
args = ["@moor-sh/mcp"]
|
|
40
|
+
|
|
41
|
+
[mcp_servers.moor.env]
|
|
42
|
+
MOOR_URL = "http://127.0.0.1:8080"
|
|
43
|
+
MOOR_API_KEY = "your-api-key"
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
For a moor on the same machine as the client, change `MOOR_URL` to `http://localhost:3000`.
|
|
47
|
+
|
|
48
|
+
## SSH tunnel for remote moor
|
|
49
|
+
|
|
50
|
+
By default moor's admin is bound to `127.0.0.1:3000` on the server. The MCP client connects to whatever `MOOR_URL` resolves to on the client machine, so for a remote moor, open a tunnel from your laptop:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
ssh -fNL 8080:127.0.0.1:3000 your-server
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
`MOOR_URL=http://127.0.0.1:8080` matches the laptop side of that tunnel. The tunnel must stay up while the MCP client is in use. For a tunnel that survives sleep and reboots, see the [self-hosting guide](https://github.com/caiopizzol/moor/blob/main/docs/self-hosting.md#persistent-tunnel).
|
|
57
|
+
|
|
58
|
+
## API key
|
|
59
|
+
|
|
60
|
+
`MOOR_API_KEY` grants admin-equivalent control of the moor host. See the [self-hosting guide](https://github.com/caiopizzol/moor/blob/main/docs/self-hosting.md#api-keys) for how to generate, verify, and rotate it.
|
|
61
|
+
|
|
62
|
+
## Smoke test
|
|
63
|
+
|
|
64
|
+
Before relying on the integration:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
MOOR_URL=http://127.0.0.1:8080 MOOR_API_KEY=your-api-key bunx @moor-sh/mcp < /dev/null
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Exit 0 with no output means the MCP connected, authenticated, and shut down cleanly when stdin closed. Any stderr line plus non-zero exit tells you what's wrong:
|
|
71
|
+
|
|
72
|
+
- `Cannot reach moor at ...` - URL unreachable or tunnel is down.
|
|
73
|
+
- `Authentication failed` - `MOOR_API_KEY` doesn't match the server.
|
|
74
|
+
- `moor at ... returned 503` - admin password not configured on the moor server.
|
|
75
|
+
|
|
76
|
+
## Tools
|
|
77
|
+
|
|
78
|
+
The MCP server exposes:
|
|
79
|
+
|
|
80
|
+
- `moor_status` - list all projects with status, source, and domain
|
|
81
|
+
- `moor_logs` - get recent container logs for a project (with tail length)
|
|
82
|
+
- `moor_rebuild` - rebuild a project from source
|
|
83
|
+
- `moor_restart` - stop and start a project's container
|
|
84
|
+
- `moor_exec` - run a command inside a project's container
|
|
85
|
+
- `moor_env_list` - list environment variables for a project
|
|
86
|
+
- `moor_env_set` - set environment variables and restart
|
|
87
|
+
- `moor_stats` - host CPU / memory / disk / container counts
|
|
88
|
+
|
|
89
|
+
## Transport
|
|
90
|
+
|
|
91
|
+
Stdio only. The MCP client launches `bunx @moor-sh/mcp` as a subprocess and talks over stdin/stdout. HTTP transport is [tracked](https://github.com/caiopizzol/moor/issues/17) but not yet shipped.
|
|
92
|
+
|
|
93
|
+
## Links
|
|
94
|
+
|
|
95
|
+
- [moor repo](https://github.com/caiopizzol/moor) - main project
|
|
96
|
+
- [Self-hosting guide](https://github.com/caiopizzol/moor/blob/main/docs/self-hosting.md) - first boot, API keys, admin domain
|
|
97
|
+
- [`@moor-sh/cli`](https://www.npmjs.com/package/@moor-sh/cli) - command-line interface with `moor mcp config` helper
|
|
98
|
+
|
|
99
|
+
## License
|
|
100
|
+
|
|
101
|
+
MIT.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moor-sh/mcp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "MCP server for moor - lets AI agents (Claude Code, Cursor, etc.) manage your moor projects via the moor HTTP API.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"url": "https://github.com/caiopizzol/moor.git",
|
|
9
9
|
"directory": "packages/mcp"
|
|
10
10
|
},
|
|
11
|
-
"homepage": "https://github.com/caiopizzol/moor
|
|
11
|
+
"homepage": "https://github.com/caiopizzol/moor/tree/main/packages/mcp",
|
|
12
12
|
"bugs": "https://github.com/caiopizzol/moor/issues",
|
|
13
13
|
"keywords": [
|
|
14
14
|
"moor",
|