@firfi/huly-mcp 0.15.1 → 0.17.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.
Files changed (3) hide show
  1. package/README.md +49 -2
  2. package/dist/index.cjs +75847 -74568
  3. package/package.json +3 -4
package/README.md CHANGED
@@ -182,6 +182,22 @@ Configure with `MCP_HTTP_PORT` and `MCP_HTTP_HOST`:
182
182
  MCP_TRANSPORT=http MCP_HTTP_PORT=8080 MCP_HTTP_HOST=0.0.0.0 npx -y @firfi/huly-mcp@latest
183
183
  ```
184
184
 
185
+ For hosted or tunneled HTTP deployments, you can require an MCP endpoint bearer token:
186
+
187
+ ```bash
188
+ MCP_TRANSPORT=http \
189
+ MCP_AUTH_TOKEN="$(openssl rand -hex 32)" \
190
+ npx -y @firfi/huly-mcp@latest
191
+ ```
192
+
193
+ HTTP clients must then send:
194
+
195
+ ```http
196
+ Authorization: Bearer <MCP_AUTH_TOKEN>
197
+ ```
198
+
199
+ `MCP_AUTH_TOKEN` protects only the MCP HTTP `/mcp` endpoint. It is unrelated to `HULY_TOKEN`, does not authenticate to Huly, and does not replace `HULY_EMAIL` / `HULY_PASSWORD` / `HULY_TOKEN`. Huly credentials are still required through process env vars or, for hosted URL deployments, the supported `x-huly-*` headers. Stdio deployments do not use `MCP_AUTH_TOKEN`.
200
+
185
201
  ### Hosted HTTP Header Configuration
186
202
 
187
203
  For hosted URL deployments, keep the server process configured with `MCP_TRANSPORT=http`. A hosting layer can forward per-session Huly credentials as request headers, so one hosted server can serve different Huly workspaces without process-wide `HULY_*` env vars.
@@ -212,10 +228,39 @@ For a Smithery publish schema example, see [docs/SMITHERY_URL_PUBLISH.md](docs/S
212
228
  | `MCP_TRANSPORT` | No | Transport type: `stdio` (default) or `http` |
213
229
  | `MCP_HTTP_PORT` | No | HTTP server port (falls back to `PORT`, then 3000) |
214
230
  | `MCP_HTTP_HOST` | No | HTTP server host (default: 127.0.0.1) |
231
+ | `MCP_AUTH_TOKEN` | No | Optional bearer token required by HTTP clients for `/mcp`. This protects the MCP endpoint only; it is not a Huly API token. |
215
232
  | `TOOLSETS` | No | Comma-separated tool categories to expose. If unset, all tools are exposed. Example: `issues,projects,search` |
216
233
 
217
234
  *Auth: Provide either `HULY_EMAIL` + `HULY_PASSWORD` or `HULY_TOKEN`.
218
235
 
236
+ ## Built-in Diagnostic Tools
237
+
238
+ `get_version` returns the current server version and latest npm version.
239
+
240
+ `get_huly_context` returns sanitized runtime/configuration context for the current MCP session without connecting to Huly. It reports package version, transport, auth mode, sanitized Huly URL origin/host/protocol, workspace, timeout, config sources, and toolset filtering. Tokens, passwords, email values, credential headers, URL paths, URL query strings, and URL credentials are never returned.
241
+
242
+ ## MCP Resources
243
+
244
+ The server exposes read-only MCP Resources as JSON context for clients that support `resources/read`.
245
+
246
+ <!-- resources:start -->
247
+ <!-- AUTO-GENERATED from src/mcp/resources.ts resourceTemplates. Do not edit manually. Run `pnpm update-readme` to regenerate. -->
248
+ | Template | Name | Description | MIME Type |
249
+ |----------|------|-------------|-----------|
250
+ | `huly://projects/{project}` | `huly-project` | Read full details for a Huly tracker project by project identifier, for example huly://projects/HULY. | `application/json` |
251
+ | `huly://issues/{issue}` | `huly-issue` | Read full details for a Huly issue by full issue identifier, for example huly://issues/HULY-123. | `application/json` |
252
+ | `huly://projects/{project}/issues/{issue}` | `huly-project-issue` | Read full details for a Huly issue by project identifier and issue number, for example huly://projects/HULY/issues/123. | `application/json` |
253
+ <!-- resources:end -->
254
+
255
+ `resources/list` returns concrete active project resources. Issue resources are template-based: use `resources/templates/list` to discover supported issue URI templates, then read a known issue URI.
256
+
257
+ Resource roadmap:
258
+
259
+ - Return resource links from list/search tool results for direct `resources/read` follow-up.
260
+ - Add document resources when document reads have a stable URI shape and context-friendly payload.
261
+ - Consider scoped/paginated issue listing only when filters prevent very large `resources/list` responses.
262
+ - Consider resource `subscribe` and `listChanged` support after stateful sessions and a Huly change source are available.
263
+
219
264
  <!-- tools:start -->
220
265
  <!-- AUTO-GENERATED from src/mcp/tools/ descriptions. Do not edit manually. Run `pnpm update-readme` to regenerate. -->
221
266
  ## Available Tools
@@ -406,9 +451,11 @@ For a Smithery publish schema example, see [docs/SMITHERY_URL_PUBLISH.md](docs/S
406
451
  | Tool | Description |
407
452
  |------|-------------|
408
453
  | `list_associations` | List Huly association definitions: class-level typed links that define which document classes may be related. Use this before create_relation to discover association IDs, source/target classes, and whether relation writes are supported. |
454
+ | `create_association` | Idempotently create one Huly association definition between two non-system classes. Use sourceClass/targetClass with sourceRole/targetRole and cardinality; returns an existing identical association by default. |
455
+ | `delete_association` | Idempotently delete one Huly association definition only when no concrete relations reference it. If relations exist, delete_relation must clean them up first; deleting an already-missing association is a successful no-op. |
409
456
  | `list_relations` | List concrete Huly relation instances under an association, optionally filtered by source and target documents. Requires at least one filter to avoid broad workspace scans. |
410
- | `create_relation` | Idempotently create one concrete relation between two resolved documents. Only succeeds for associations where list_associations reports canCreateRelation=true; otherwise it fails clearly. This build currently reports no generic associations as writable until a write allowlist is live-validated. |
411
- | `delete_relation` | Idempotently delete one concrete relation by relation ID or by exact association/source/target triple. Only succeeds for associations where list_associations reports canDeleteRelation=true; otherwise it fails clearly. This build currently reports no generic associations as writable until a write allowlist is live-validated. |
457
+ | `create_relation` | Idempotently create one concrete relation between two resolved documents for a writable association. Enforces association endpoint classes, direction, duplicate handling, automation-only restrictions, and cardinality. |
458
+ | `delete_relation` | Idempotently delete one concrete relation by relation ID or by exact association/source/target triple. Triple deletes use the same direction semantics as create_relation and fail if the selector is ambiguous. |
412
459
 
413
460
  ### Activity
414
461