@firfi/huly-mcp 0.55.0 → 0.55.2
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 +36 -3
- package/dist/application.cjs +223389 -0
- package/dist/index.cjs +39 -202083
- package/dist/native/THIRD-PARTY-NOTICES +8808 -0
- package/dist/native/huly-stdio-darwin-arm64 +0 -0
- package/dist/native/huly-stdio-darwin-x64 +0 -0
- package/dist/native/huly-stdio-linux-arm64 +0 -0
- package/dist/native/huly-stdio-linux-x64 +0 -0
- package/package.json +22 -5
package/README.md
CHANGED
|
@@ -45,6 +45,7 @@ The standard configuration uses a Huly API token and works with most MCP clients
|
|
|
45
45
|
"command": "npx",
|
|
46
46
|
"args": ["-y", "@firfi/huly-mcp@latest"],
|
|
47
47
|
"env": {
|
|
48
|
+
"MCP_TRANSPORT": "stdio-resident",
|
|
48
49
|
"HULY_URL": "https://your-huly-instance.example.com",
|
|
49
50
|
"HULY_TOKEN": "your-huly-api-token",
|
|
50
51
|
"HULY_WORKSPACE": "yourworkspace"
|
|
@@ -73,6 +74,7 @@ Use Codex's MCP manager:
|
|
|
73
74
|
|
|
74
75
|
```bash
|
|
75
76
|
codex mcp add huly \
|
|
77
|
+
--env MCP_TRANSPORT=stdio-resident \
|
|
76
78
|
--env HULY_URL=https://your-huly-instance.example.com \
|
|
77
79
|
--env HULY_TOKEN=your-huly-api-token \
|
|
78
80
|
--env HULY_WORKSPACE=yourworkspace \
|
|
@@ -85,8 +87,10 @@ Or add it directly to `~/.codex/config.toml`:
|
|
|
85
87
|
[mcp_servers.huly]
|
|
86
88
|
command = "npx"
|
|
87
89
|
args = ["-y", "@firfi/huly-mcp@latest"]
|
|
90
|
+
startup_timeout_sec = 60
|
|
88
91
|
|
|
89
92
|
[mcp_servers.huly.env]
|
|
93
|
+
MCP_TRANSPORT = "stdio-resident"
|
|
90
94
|
HULY_URL = "https://your-huly-instance.example.com"
|
|
91
95
|
HULY_TOKEN = "your-huly-api-token"
|
|
92
96
|
HULY_WORKSPACE = "yourworkspace"
|
|
@@ -99,6 +103,7 @@ HULY_WORKSPACE = "yourworkspace"
|
|
|
99
103
|
|
|
100
104
|
```bash
|
|
101
105
|
claude mcp add huly \
|
|
106
|
+
-e MCP_TRANSPORT=stdio-resident \
|
|
102
107
|
-e HULY_URL=https://your-huly-instance.example.com \
|
|
103
108
|
-e HULY_TOKEN=your-huly-api-token \
|
|
104
109
|
-e HULY_WORKSPACE=yourworkspace \
|
|
@@ -131,6 +136,7 @@ Add with Command Palette → "MCP: Add Server", or put this in a VS Code MCP con
|
|
|
131
136
|
"command": "npx",
|
|
132
137
|
"args": ["-y", "@firfi/huly-mcp@latest"],
|
|
133
138
|
"env": {
|
|
139
|
+
"MCP_TRANSPORT": "stdio-resident",
|
|
134
140
|
"HULY_URL": "https://your-huly-instance.example.com",
|
|
135
141
|
"HULY_TOKEN": "your-huly-api-token",
|
|
136
142
|
"HULY_WORKSPACE": "yourworkspace"
|
|
@@ -168,6 +174,7 @@ Open the global configuration file (`~/.config/opencode/opencode.json`) and merg
|
|
|
168
174
|
"type": "local",
|
|
169
175
|
"command": ["npx", "-y", "@firfi/huly-mcp@latest"],
|
|
170
176
|
"environment": {
|
|
177
|
+
"MCP_TRANSPORT": "stdio-resident",
|
|
171
178
|
"HULY_URL": "https://your-huly-instance.example.com",
|
|
172
179
|
"HULY_TOKEN": "your-huly-api-token",
|
|
173
180
|
"HULY_WORKSPACE": "yourworkspace"
|
|
@@ -206,7 +213,7 @@ The `@latest` tag asks the package runner for the newest version. Some MCP clien
|
|
|
206
213
|
| **VS Code / Cursor** | Restart the MCP server from the command palette/configured client or reload the window |
|
|
207
214
|
| **OpenCode** | Restart OpenCode or start a new session after config changes |
|
|
208
215
|
| **Pi** | Run `/mcp reconnect huly`, then `/reload` if the registered direct-tool surface changed |
|
|
209
|
-
| **npx (manual)** | `npx -y @firfi/huly-mcp@latest` — the `-y` flag auto-confirms install prompts |
|
|
216
|
+
| **npx (manual)** | `MCP_TRANSPORT=stdio-resident npx -y @firfi/huly-mcp@latest` — the `-y` flag auto-confirms install prompts |
|
|
210
217
|
|
|
211
218
|
## Maintainer Production Release
|
|
212
219
|
|
|
@@ -220,6 +227,15 @@ Use this exact command even when a newer Node.js version is active on the host.
|
|
|
220
227
|
exact Node.js versions certified by CI; this is intentionally narrower than the package's runtime requirement. See
|
|
221
228
|
the [production release guide](docs/NPM_PRODUCTION_RELEASE.md) for preflight checks, rerun behavior, and verification.
|
|
222
229
|
|
|
230
|
+
## Shared resident stdio
|
|
231
|
+
|
|
232
|
+
The setup examples explicitly select `MCP_TRANSPORT=stdio-resident`. MCP clients still use stdio, while compatible clients under the same OS user share a Node backend through small native bridges. Linux and macOS arm64/x64 binaries are included; no Rust installation is needed. Resident startup has a 30-second budget. If the native bridge cannot run or resident startup fails, the connection automatically falls back to ordinary stdio with its buffered MCP input preserved. This transition happens before any MCP request is sent to the resident. A failed active resident never reconnects or replays requests.
|
|
233
|
+
|
|
234
|
+
Allow at least 60 seconds for MCP startup in the client so it can wait for the resident attempt, cleanup, and ordinary stdio startup. For Codex, set `startup_timeout_sec = 60` in its Huly server configuration, including when adding the server through `codex mcp add`.
|
|
235
|
+
For Claude Code, set `MCP_TIMEOUT=60000` in the environment that launches `claude`, or add `"MCP_TIMEOUT": "60000"` under `env` in `~/.claude/settings.json` ([Claude Code environment variables](https://code.claude.com/docs/en/env-vars)). Setting it only in the Huly server's `env` does not increase the parent client's startup timeout.
|
|
236
|
+
|
|
237
|
+
Omitting `MCP_TRANSPORT` still selects ordinary `stdio`, preserving existing installations. Set `MCP_TRANSPORT=stdio` explicitly to keep a separate backend per client. Restart the MCP client after changing the setting.
|
|
238
|
+
|
|
223
239
|
## Manual resident backend
|
|
224
240
|
|
|
225
241
|
The experimental [manual resident backend path](docs/resident-manual.md) lets
|
|
@@ -270,7 +286,7 @@ Authorization: Bearer <MCP_AUTH_TOKEN>
|
|
|
270
286
|
|
|
271
287
|
### Shared CLI and stdio profiles
|
|
272
288
|
|
|
273
|
-
Save a profile with `huly auth login --profile work`, then set `HULY_PROFILE=work` in the stdio MCP server's environment. Both processes must run under the same OS user and configuration directory. Stdio never follows the active CLI profile implicitly. Saved tokens are bound to their instance URL and workspace; changes require login again or complete environment credential injection. See the [CLI profile instructions](packages/huly-cli/README.md#authentication-and-profiles). HTTP configuration remains unchanged.
|
|
289
|
+
Save a profile with `huly auth login --profile work`, then set `MCP_TRANSPORT=stdio-resident` and `HULY_PROFILE=work` in the stdio MCP server's environment. Both processes must run under the same OS user and configuration directory. Stdio never follows the active CLI profile implicitly. Saved tokens are bound to their instance URL and workspace; changes require login again or complete environment credential injection. See the [CLI profile instructions](packages/huly-cli/README.md#authentication-and-profiles). HTTP configuration remains unchanged.
|
|
274
290
|
|
|
275
291
|
### Hosted HTTP Header Configuration
|
|
276
292
|
|
|
@@ -299,7 +315,7 @@ For a Smithery publish schema example, see [docs/SMITHERY_URL_PUBLISH.md](docs/S
|
|
|
299
315
|
| `HULY_PASSWORD` | Auth* | Compatibility fallback: account password |
|
|
300
316
|
| `HULY_WORKSPACE` | Yes | Workspace identifier |
|
|
301
317
|
| `HULY_CONNECTION_TIMEOUT` | No | Connection timeout in ms. Omit to use the package default. |
|
|
302
|
-
| `MCP_TRANSPORT` | No | Transport type: `stdio` (default) or `http` |
|
|
318
|
+
| `MCP_TRANSPORT` | No | Transport type: `stdio` (package default), `stdio-resident` (recommended in setup examples), or `http` |
|
|
303
319
|
| `MCP_PRELOAD_TOOLS` | No | Load every tool handler before serving requests. Defaults to `false`; use `true` for smoke tests that check all handler imports. |
|
|
304
320
|
| `MCP_HTTP_PORT` | No | HTTP server port (falls back to `PORT`, then 3000) |
|
|
305
321
|
| `MCP_HTTP_HOST` | No | HTTP server host. Omit to bind to the package default loopback host. |
|
|
@@ -1204,6 +1220,22 @@ When resolved tool exposure is `proxy`, clients see the built-in tools plus thes
|
|
|
1204
1220
|
|
|
1205
1221
|
<!-- tools:end -->
|
|
1206
1222
|
|
|
1223
|
+
## Building from source
|
|
1224
|
+
|
|
1225
|
+
Published packages include the native resident bridge; Rust is a build dependency.
|
|
1226
|
+
Source builds require Node.js, pnpm, Rustup, Python 3, and Bash. Prepare the pinned
|
|
1227
|
+
Rust toolchain, Zig linker, and cross-compilation SDK once:
|
|
1228
|
+
|
|
1229
|
+
```bash
|
|
1230
|
+
pnpm setup:native
|
|
1231
|
+
pnpm build
|
|
1232
|
+
pnpm test:native
|
|
1233
|
+
```
|
|
1234
|
+
|
|
1235
|
+
Build tools are kept in a platform-specific user cache, outside the checkout and
|
|
1236
|
+
published package. The bridge is a single Rust I/O loop; MCP protocol processing,
|
|
1237
|
+
authorization, and cancellation remain in the shared Node backend.
|
|
1238
|
+
|
|
1207
1239
|
## Troubleshooting
|
|
1208
1240
|
|
|
1209
1241
|
### Password fallback with special characters
|
|
@@ -1229,6 +1261,7 @@ For Claude JSON config, the shell-sensitive characters above can be written dire
|
|
|
1229
1261
|
"command": "npx",
|
|
1230
1262
|
"args": ["-y", "@firfi/huly-mcp@latest"],
|
|
1231
1263
|
"env": {
|
|
1264
|
+
"MCP_TRANSPORT": "stdio-resident",
|
|
1232
1265
|
"HULY_URL": "https://your-huly-instance.com",
|
|
1233
1266
|
"HULY_EMAIL": "you@example.com",
|
|
1234
1267
|
"HULY_PASSWORD": "p@ss*w0rd!#%",
|