huly-mcp-selfhost 3.4.0 → 3.5.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 (222) hide show
  1. package/.env.example +3 -0
  2. package/CHANGELOG.md +11 -0
  3. package/README.md +54 -16
  4. package/dist/guides/workflow.md +1 -0
  5. package/dist/index.js +105034 -55
  6. package/dist/setup.js +4 -0
  7. package/package.json +12 -11
  8. package/dist/connection.d.ts +0 -100
  9. package/dist/connection.js +0 -344
  10. package/dist/connection.js.map +0 -1
  11. package/dist/env.d.ts +0 -1
  12. package/dist/env.js +0 -17
  13. package/dist/env.js.map +0 -1
  14. package/dist/guard.d.ts +0 -39
  15. package/dist/guard.js +0 -165
  16. package/dist/guard.js.map +0 -1
  17. package/dist/http.d.ts +0 -22
  18. package/dist/http.js +0 -213
  19. package/dist/http.js.map +0 -1
  20. package/dist/index.d.ts +0 -2
  21. package/dist/index.js.map +0 -1
  22. package/dist/junit-cli.d.ts +0 -8
  23. package/dist/junit-cli.js +0 -106
  24. package/dist/junit-cli.js.map +0 -1
  25. package/dist/registry.d.ts +0 -18
  26. package/dist/registry.js +0 -321
  27. package/dist/registry.js.map +0 -1
  28. package/dist/resources.d.ts +0 -19
  29. package/dist/resources.js +0 -255
  30. package/dist/resources.js.map +0 -1
  31. package/dist/schemas.d.ts +0 -1583
  32. package/dist/schemas.js +0 -1097
  33. package/dist/schemas.js.map +0 -1
  34. package/dist/server.d.ts +0 -29
  35. package/dist/server.js +0 -215
  36. package/dist/server.js.map +0 -1
  37. package/dist/tools/activity.d.ts +0 -10
  38. package/dist/tools/activity.js +0 -62
  39. package/dist/tools/activity.js.map +0 -1
  40. package/dist/tools/agent.d.ts +0 -156
  41. package/dist/tools/agent.js +0 -523
  42. package/dist/tools/agent.js.map +0 -1
  43. package/dist/tools/attachments.d.ts +0 -31
  44. package/dist/tools/attachments.js +0 -61
  45. package/dist/tools/attachments.js.map +0 -1
  46. package/dist/tools/calendar.d.ts +0 -49
  47. package/dist/tools/calendar.js +0 -116
  48. package/dist/tools/calendar.js.map +0 -1
  49. package/dist/tools/cards.d.ts +0 -87
  50. package/dist/tools/cards.js +0 -246
  51. package/dist/tools/cards.js.map +0 -1
  52. package/dist/tools/channels.d.ts +0 -118
  53. package/dist/tools/channels.js +0 -211
  54. package/dist/tools/channels.js.map +0 -1
  55. package/dist/tools/comments.d.ts +0 -42
  56. package/dist/tools/comments.js +0 -77
  57. package/dist/tools/comments.js.map +0 -1
  58. package/dist/tools/components.d.ts +0 -45
  59. package/dist/tools/components.js +0 -107
  60. package/dist/tools/components.js.map +0 -1
  61. package/dist/tools/contacts.d.ts +0 -69
  62. package/dist/tools/contacts.js +0 -130
  63. package/dist/tools/contacts.js.map +0 -1
  64. package/dist/tools/crm.d.ts +0 -61
  65. package/dist/tools/crm.js +0 -117
  66. package/dist/tools/crm.js.map +0 -1
  67. package/dist/tools/diagnostics.d.ts +0 -17
  68. package/dist/tools/diagnostics.js +0 -133
  69. package/dist/tools/diagnostics.js.map +0 -1
  70. package/dist/tools/documents.d.ts +0 -100
  71. package/dist/tools/documents.js +0 -294
  72. package/dist/tools/documents.js.map +0 -1
  73. package/dist/tools/drive.d.ts +0 -107
  74. package/dist/tools/drive.js +0 -277
  75. package/dist/tools/drive.js.map +0 -1
  76. package/dist/tools/fields.d.ts +0 -33
  77. package/dist/tools/fields.js +0 -124
  78. package/dist/tools/fields.js.map +0 -1
  79. package/dist/tools/generic.d.ts +0 -72
  80. package/dist/tools/generic.js +0 -242
  81. package/dist/tools/generic.js.map +0 -1
  82. package/dist/tools/github.d.ts +0 -21
  83. package/dist/tools/github.js +0 -80
  84. package/dist/tools/github.js.map +0 -1
  85. package/dist/tools/hr.d.ts +0 -97
  86. package/dist/tools/hr.js +0 -150
  87. package/dist/tools/hr.js.map +0 -1
  88. package/dist/tools/inbox.d.ts +0 -39
  89. package/dist/tools/inbox.js +0 -139
  90. package/dist/tools/inbox.js.map +0 -1
  91. package/dist/tools/inventory.d.ts +0 -61
  92. package/dist/tools/inventory.js +0 -103
  93. package/dist/tools/inventory.js.map +0 -1
  94. package/dist/tools/issues.d.ts +0 -114
  95. package/dist/tools/issues.js +0 -484
  96. package/dist/tools/issues.js.map +0 -1
  97. package/dist/tools/labels.d.ts +0 -87
  98. package/dist/tools/labels.js +0 -232
  99. package/dist/tools/labels.js.map +0 -1
  100. package/dist/tools/log-time.d.ts +0 -25
  101. package/dist/tools/log-time.js +0 -95
  102. package/dist/tools/log-time.js.map +0 -1
  103. package/dist/tools/meetings.d.ts +0 -30
  104. package/dist/tools/meetings.js +0 -78
  105. package/dist/tools/meetings.js.map +0 -1
  106. package/dist/tools/members.d.ts +0 -8
  107. package/dist/tools/members.js +0 -33
  108. package/dist/tools/members.js.map +0 -1
  109. package/dist/tools/message-templates.d.ts +0 -54
  110. package/dist/tools/message-templates.js +0 -88
  111. package/dist/tools/message-templates.js.map +0 -1
  112. package/dist/tools/milestones.d.ts +0 -56
  113. package/dist/tools/milestones.js +0 -172
  114. package/dist/tools/milestones.js.map +0 -1
  115. package/dist/tools/organizations.d.ts +0 -37
  116. package/dist/tools/organizations.js +0 -88
  117. package/dist/tools/organizations.js.map +0 -1
  118. package/dist/tools/overview.d.ts +0 -55
  119. package/dist/tools/overview.js +0 -395
  120. package/dist/tools/overview.js.map +0 -1
  121. package/dist/tools/planner.d.ts +0 -60
  122. package/dist/tools/planner.js +0 -145
  123. package/dist/tools/planner.js.map +0 -1
  124. package/dist/tools/process.d.ts +0 -50
  125. package/dist/tools/process.js +0 -137
  126. package/dist/tools/process.js.map +0 -1
  127. package/dist/tools/products.d.ts +0 -17
  128. package/dist/tools/products.js +0 -45
  129. package/dist/tools/products.js.map +0 -1
  130. package/dist/tools/projects.d.ts +0 -41
  131. package/dist/tools/projects.js +0 -93
  132. package/dist/tools/projects.js.map +0 -1
  133. package/dist/tools/qms.d.ts +0 -57
  134. package/dist/tools/qms.js +0 -171
  135. package/dist/tools/qms.js.map +0 -1
  136. package/dist/tools/recruiting.d.ts +0 -112
  137. package/dist/tools/recruiting.js +0 -203
  138. package/dist/tools/recruiting.js.map +0 -1
  139. package/dist/tools/relations.d.ts +0 -72
  140. package/dist/tools/relations.js +0 -192
  141. package/dist/tools/relations.js.map +0 -1
  142. package/dist/tools/search.d.ts +0 -23
  143. package/dist/tools/search.js +0 -60
  144. package/dist/tools/search.js.map +0 -1
  145. package/dist/tools/sharing.d.ts +0 -62
  146. package/dist/tools/sharing.js +0 -149
  147. package/dist/tools/sharing.js.map +0 -1
  148. package/dist/tools/statuses.d.ts +0 -19
  149. package/dist/tools/statuses.js +0 -93
  150. package/dist/tools/statuses.js.map +0 -1
  151. package/dist/tools/surveys.d.ts +0 -22
  152. package/dist/tools/surveys.js +0 -53
  153. package/dist/tools/surveys.js.map +0 -1
  154. package/dist/tools/templates.d.ts +0 -95
  155. package/dist/tools/templates.js +0 -260
  156. package/dist/tools/templates.js.map +0 -1
  157. package/dist/tools/test-automation.d.ts +0 -81
  158. package/dist/tools/test-automation.js +0 -225
  159. package/dist/tools/test-automation.js.map +0 -1
  160. package/dist/tools/testing.d.ts +0 -234
  161. package/dist/tools/testing.js +0 -401
  162. package/dist/tools/testing.js.map +0 -1
  163. package/dist/tools/workspace-admin.d.ts +0 -55
  164. package/dist/tools/workspace-admin.js +0 -117
  165. package/dist/tools/workspace-admin.js.map +0 -1
  166. package/dist/tools/workspaces.d.ts +0 -6
  167. package/dist/tools/workspaces.js +0 -19
  168. package/dist/tools/workspaces.js.map +0 -1
  169. package/dist/utils/attributes.d.ts +0 -37
  170. package/dist/utils/attributes.js +0 -188
  171. package/dist/utils/attributes.js.map +0 -1
  172. package/dist/utils/classes.d.ts +0 -51
  173. package/dist/utils/classes.js +0 -73
  174. package/dist/utils/classes.js.map +0 -1
  175. package/dist/utils/content.d.ts +0 -11
  176. package/dist/utils/content.js +0 -86
  177. package/dist/utils/content.js.map +0 -1
  178. package/dist/utils/errors.d.ts +0 -11
  179. package/dist/utils/errors.js +0 -24
  180. package/dist/utils/errors.js.map +0 -1
  181. package/dist/utils/files.d.ts +0 -5
  182. package/dist/utils/files.js +0 -50
  183. package/dist/utils/files.js.map +0 -1
  184. package/dist/utils/format.d.ts +0 -8
  185. package/dist/utils/format.js +0 -57
  186. package/dist/utils/format.js.map +0 -1
  187. package/dist/utils/junit.d.ts +0 -13
  188. package/dist/utils/junit.js +0 -81
  189. package/dist/utils/junit.js.map +0 -1
  190. package/dist/utils/markdown.d.ts +0 -14
  191. package/dist/utils/markdown.js +0 -149
  192. package/dist/utils/markdown.js.map +0 -1
  193. package/dist/utils/meeting.d.ts +0 -13
  194. package/dist/utils/meeting.js +0 -118
  195. package/dist/utils/meeting.js.map +0 -1
  196. package/dist/utils/people.d.ts +0 -25
  197. package/dist/utils/people.js +0 -80
  198. package/dist/utils/people.js.map +0 -1
  199. package/dist/utils/redact.d.ts +0 -3
  200. package/dist/utils/redact.js +0 -26
  201. package/dist/utils/redact.js.map +0 -1
  202. package/dist/utils/resolve.d.ts +0 -17
  203. package/dist/utils/resolve.js +0 -54
  204. package/dist/utils/resolve.js.map +0 -1
  205. package/dist/utils/spec.d.ts +0 -10
  206. package/dist/utils/spec.js +0 -90
  207. package/dist/utils/spec.js.map +0 -1
  208. package/dist/utils/storage.d.ts +0 -7
  209. package/dist/utils/storage.js +0 -86
  210. package/dist/utils/storage.js.map +0 -1
  211. package/dist/utils/tasks.d.ts +0 -22
  212. package/dist/utils/tasks.js +0 -81
  213. package/dist/utils/tasks.js.map +0 -1
  214. package/dist/watch.d.ts +0 -62
  215. package/dist/watch.js +0 -405
  216. package/dist/watch.js.map +0 -1
  217. package/scripts/cleanup-issues.js +0 -141
  218. package/scripts/copy-guides.js +0 -18
  219. package/scripts/demo.js +0 -201
  220. package/scripts/import-csv.js +0 -250
  221. package/scripts/sample-tasks.csv +0 -11
  222. package/scripts/setup.js +0 -163
package/.env.example CHANGED
@@ -32,6 +32,9 @@ HULY_PASSWORD=your-password
32
32
  # MCP_TRANSPORT=http
33
33
  # Bearer token clients must send; required to use the HULY_* login above over HTTP.
34
34
  # MCP_AUTH_TOKEN=
35
+ # "Log in with Huly" (OAuth): people add <MCP_PUBLIC_URL>/mcp in their AI app and log in in the browser.
36
+ # MCP_OAUTH_SECRET= # openssl rand -hex 32
37
+ # MCP_PUBLIC_URL=https://huly-mcp.example.com
35
38
 
36
39
  # ─── Single workspace (optional) ─────────────────────────────────────────────
37
40
  # Pin this server to one workspace (slug, name or id). Tools then take no
package/CHANGELOG.md CHANGED
@@ -2,6 +2,17 @@
2
2
 
3
3
  All notable changes to [huly-mcp-selfhost](https://www.npmjs.com/package/huly-mcp-selfhost). Versions follow [semver](https://semver.org).
4
4
 
5
+ ### 3.5.0 — 2026-11-11
6
+
7
+ - **Fixed: MCP registry name** — the registry namespace is case-sensitive and must match the GitHub owner: `io.github.JoKeks2023/huly-mcp-selfhost` (was lowercase, refused with 403). A test checks it.
8
+ - **Fixed: `check_setup` in HTTP/OAuth sessions** reported "No credentials" — it read the server's environment instead of the session's own login. Found while testing OAuth from Claude Code.
9
+ - **Install size: 126 MB → 4.3 MB.** The package is now one bundled, readable file (`dist/index.js`, esbuild, not minified) with no runtime dependencies — the first `npx huly-mcp-selfhost` downloads 900 kB instead of ~180 packages. Verified from a clean install of the packed tarball: MCP over stdio, CLI, reads (issues, documents via the front service, reports, search, inbox, drive), writes with undo, HTTP with header login and OAuth. `huly-mcp-setup` still works (now a small wrapper for `huly-mcp setup`).
10
+ - **Fixed: `create_issue_tree` dropped the epic's component, milestone and status** — the epic only took title, description, priority and labels; anything else was silently ignored (and the dry run did not show it). The epic now takes `componentLabel`, `milestoneLabel`, `assignee` and `statusName` (children get `statusName` too), the top-level `componentLabel`/`milestoneLabel` defaults apply to the epic as well, and the dry run lists them.
11
+ - **Fixed: unknown fields in nested objects are rejected instead of dropped** — in `create_issue_tree`, issue templates, test cases, persons, inventory variants and generic writes. A test keeps every tool that way.
12
+ - **New: log in with Huly (OAuth)** — with `MCP_OAUTH_SECRET` and `MCP_PUBLIC_URL`, the HTTP server is an OAuth 2.1 server: people add `…/mcp` in Claude Code, Claude's custom connectors or another OAuth-capable client and log in in the browser with their own Huly account (password, or a one-time e-mail code for Google/GitHub accounts). Stateless (AES-256-GCM sealed registrations, codes and tokens — no database, survives restarts); the password is never stored; 1-hour access tokens, rotating 30-day refresh tokens, login throttling, PKCE and client registration from the MCP SDK. Verified live against a self-hosted Huly, including Claude Code's own OAuth flow (client registration, browser login, tools as that person).
13
+ - **New: `undo_changes`** — undo your last changes made through this server, newest first: created objects are removed, changed fields get their old values, deleted objects come back with the same id and data (verified live: an issue deleted and restored with its description). Dry run by default; an object someone else changed since is skipped and named (`force` overrides). Works for every write tool without per-tool code — writes are recorded as their reverse while a tool runs; issue counters are never wound back. History per process (stdio) or per session (HTTP), last 50 changes.
14
+ - **New: command line for every tool** — `huly-mcp <tool> --param value` (or `npx huly-mcp-selfhost …`): `tools` to search, `help <tool>` with types, allowed values and defaults generated from the same schemas the MCP server uses; values read by type, lists by repeating a flag, JSON for nested values, `--input`/`--json`, `--<param>-file`; a positional value for tools with one required parameter; the same write scope, audit log and confirmation (hard-to-undo tools ask in a terminal, scripts need `--yes`); `--format json`; exit codes 0/1/2 with "did you mean" hints; bash/zsh completion for tools, options and values. Verified live (read, JSON output, create with a description from a file, guarded delete).
15
+
5
16
  ### 3.4.0 — 2026-11-11
6
17
 
7
18
  - **New: team server over HTTP** — `huly-mcp-selfhost http` (Docker: `MCP_TRANSPORT=http`) serves MCP at `/mcp` with persistent sessions instead of a proxy. Every client can bring its own Huly login (`X-Huly-Token` or `X-Huly-Email`/`X-Huly-Password`, optional `X-Huly-Workspace`), so one server works for a whole team and each person acts as themselves. The server's own login is only used behind `MCP_AUTH_TOKEN`. Measured: first call of a session ~0.2 s.
package/README.md CHANGED
@@ -3,19 +3,21 @@
3
3
  [![npm](https://img.shields.io/npm/v/huly-mcp-selfhost?label=npm)](https://www.npmjs.com/package/huly-mcp-selfhost)
4
4
  [![CI](https://github.com/JoKeks2023/huly-mcp/actions/workflows/ci.yml/badge.svg)](https://github.com/JoKeks2023/huly-mcp/actions/workflows/ci.yml)
5
5
  [![Docker Pulls](https://img.shields.io/docker/pulls/jokeks2023/huly-mcp)](https://hub.docker.com/r/jokeks2023/huly-mcp)
6
- [![MCP Registry](https://img.shields.io/badge/MCP_Registry-io.github.jokeks2023%2Fhuly--mcp--selfhost-blue)](https://registry.modelcontextprotocol.io)
6
+ [![MCP Registry](https://img.shields.io/badge/MCP_Registry-io.github.JoKeks2023%2Fhuly--mcp--selfhost-blue)](https://registry.modelcontextprotocol.io)
7
7
  [![License: EPL-2.0](https://img.shields.io/badge/license-EPL--2.0-blue)](https://github.com/JoKeks2023/huly-mcp/blob/main/LICENSE)
8
8
 
9
- **Huly for AI agents.** An MCP server for [Huly](https://huly.io) — self-hosted or Huly Cloud — that lets Claude and other agents work in your workspaces: issues, epics, milestones, documents, chat, inbox, planner, test management and more. 226 tools, built for agent workflows and to spend as few tokens as possible.
9
+ **Huly for AI agents.** An MCP server for [Huly](https://huly.io) — self-hosted or Huly Cloud — that lets Claude and other agents work in your workspaces: issues, epics, milestones, documents, chat, inbox, planner, test management and more. 227 tools, built for agent workflows and to spend as few tokens as possible.
10
10
 
11
- [Website](https://jokeks2023.github.io/huly-mcp/) · [Quick start](#quick-start) · [Tools](#tools-226-total-grouped-in-toolsets) · [Claude Code plugin](#claude-code-plugin) · [Changelog](https://github.com/JoKeks2023/huly-mcp/blob/main/CHANGELOG.md)
11
+ [Website](https://jokeks2023.github.io/huly-mcp/) · [Quick start](#quick-start) · [Tools](#tools-227-total-grouped-in-toolsets) · [Claude Code plugin](#claude-code-plugin) · [Changelog](https://github.com/JoKeks2023/huly-mcp/blob/main/CHANGELOG.md)
12
12
 
13
13
  ## Highlights
14
14
 
15
15
  - **Everything in Huly:** tracker, documents, chat, inbox, activity, planner, calendar, GitHub PRs, contacts, drive, cards, templates, test management, recruiting, CRM, HR and more — plus read access to *any* Huly class.
16
16
  - **Made for agents:** one-call overviews (`my_day`, `standup`, `project_report`, `get_issue_context`), `start_work` → `finish_work`, plans → epics with sub-issues, specs and meeting notes → issues, claims for parallel agents, and `huly-mcp watch` to hand issues to Claude from Huly.
17
17
  - **Few tokens:** tools come in toolsets (default ≈11k tokens, everything ≈24k), optionally loaded on demand; pin a workspace for −10 %; compact outputs; wrong parameters are rejected with the valid list instead of silently ignored.
18
- - **Safe by default:** every change names its workspace, risky tools ask first, writes can be limited to projects, optional audit log.
18
+ - **Safe by default:** every change names its workspace, risky tools ask first, writes can be limited to projects, optional audit log — and `undo_changes` reverses your last changes.
19
+ - **Small and quick to install:** one self-contained package of ~4 MB (900 kB download) — no 180 dependencies to fetch on the first `npx`.
20
+ - **No telemetry.** The server talks to your Huly server and nothing else: no analytics, no usage tracking, nothing to opt out of. (The only other request, the npm version check, runs when you call `check_setup`.)
19
21
  - **Claude Code plugin:** `/huly:setup` asks once per repo how Huly is used there and writes the rules; skill, hooks and `/huly:*` commands. Guides and a `setup` prompt for every other MCP client too.
20
22
  - **Self-hosted first:** document and description content, file uploads and internal URLs work on `huly-selfhost`; one account, all its workspaces.
21
23
 
@@ -25,8 +27,8 @@ What the model reads — measured on a real self-hosted project (≈60 issues):
25
27
 
26
28
  | | Characters | ≈ Tokens |
27
29
  |---|--:|--:|
28
- | Tool list, default toolsets (98 tools, each callable directly) | 37,435 | 10.7k |
29
- | Tool list, pinned workspace | 33,798 | 9.7k |
30
+ | Tool list, default toolsets (99 tools, each callable directly) | 38,259 | 10.9k |
31
+ | Tool list, pinned workspace | 34,567 | 9.9k |
30
32
  | Open issues of a project (one call, ≈30 issues) | 2,768 | 0.8k |
31
33
  | One issue with description | 318 | 0.1k |
32
34
  | Project report (done, in progress, blocked, milestones, PRs, time) | ~2,700 | 0.8k |
@@ -97,7 +99,7 @@ Then run `/huly:setup` in a repository. Details: [Claude Code plugin](#claude-co
97
99
 
98
100
  Config file locations and examples for each client: [Compatible clients](#compatible-clients).
99
101
 
100
- **Server for a team or remote clients** — `huly-mcp-selfhost http` or the Docker image, with one Huly login per person: see [Team server over HTTP](#team-server-over-http).
102
+ **Server for a team or remote clients** — `huly-mcp-selfhost http` or the Docker image; everyone logs in with their own Huly account in the browser (OAuth): see [Team server over HTTP](#team-server-over-http).
101
103
 
102
104
  Then ask: *"What's on my plate today?"*, *"Plan the login redesign as an epic in WEB"*, *"Write release notes for v1.2"*. More in [Example prompts](#example-prompts).
103
105
 
@@ -112,7 +114,7 @@ The repo is also a Claude Code plugin marketplace. The plugin bundles the MCP se
112
114
  /plugin install huly@huly-mcp
113
115
  ```
114
116
 
115
- > **Note:** the plugin starts the npm package at exactly its own version (e.g. `huly-mcp-selfhost@3.4.0`; the plugin directory does not accept version ranges), so a plugin update brings the matching server. To try a local checkout instead: `npm run build`, then point `plugin/.mcp.json` at `dist/index.js` and start `claude --plugin-dir ./plugin`.
117
+ > **Note:** the plugin starts the npm package at exactly its own version (e.g. `huly-mcp-selfhost@3.5.0`; the plugin directory does not accept version ranges), so a plugin update brings the matching server. To try a local checkout instead: `npm run build`, then point `plugin/.mcp.json` at `dist/index.js` and start `claude --plugin-dir ./plugin`.
116
118
 
117
119
  Claude Code then asks for your Huly settings (e-mail + password or token, and for self-hosted Huly the accounts and front URL; passwords and tokens go to the OS keychain).
118
120
 
@@ -133,7 +135,31 @@ Without the plugin, the same server works in Claude Code as a plain MCP server (
133
135
 
134
136
  ---
135
137
 
136
- ## Tools (226 total, grouped in toolsets)
138
+ ## Command line
139
+
140
+ Every tool also works from the terminal — for scripts, CI and quick looks without a chat. Same login (`HULY_*` environment or `--env-file`), same safety rules (write scope, audit log, confirmation for hard-to-undo changes).
141
+
142
+ ```bash
143
+ npm install -g huly-mcp-selfhost # or: npx huly-mcp-selfhost <command>
144
+
145
+ huly-mcp tools issue # find tools
146
+ huly-mcp help list_issues # parameters, types, allowed values, defaults
147
+ huly-mcp get_issue PROJ-12 # one required parameter can be given directly
148
+ huly-mcp list_issues --project PROJ --due overdue --assignee null
149
+ huly-mcp create_issue -w acme --project PROJ --title "Fix login" --description-file notes.md
150
+ huly-mcp bulk_update_issues --identifiers PROJ-1 --identifiers PROJ-2 --status-name Done --yes
151
+ huly-mcp my_day --format json | jq -r .text
152
+ ```
153
+
154
+ - **Parameters** come from the same schemas the MCP server sends to Claude, so `help` is always current. Names work as `--project-identifier` or `--projectIdentifier`; common short forms (`--project`, `--status`, `--milestone`, …) too. Values are read by type: numbers, `true`/`false`, `null` to clear, repeat a flag for lists, JSON for nested values. `--json '{…}'` or `--input file.json` (`-` = stdin) pass everything at once; `--<text-param>-file` reads a text value from a file.
155
+ - **Hard-to-undo tools** (deletes, bulk changes, moves) ask in a terminal; in scripts they run only with `--yes`.
156
+ - **Exit codes:** 0 ok · 1 the tool failed or was cancelled · 2 wrong usage (unknown tool or option — with a "did you mean …").
157
+ - **Output:** the tool's Markdown; `--format json` gives `{"ok", "tool", "text"}` (errors too). The Huly SDK's own logging is silenced; `HULY_DEBUG=1` shows it on stderr.
158
+ - **Shell completion** for tools, options and allowed values: `eval "$(huly-mcp completion zsh)"` (or `bash`) in your shell profile.
159
+
160
+ ---
161
+
162
+ ## Tools (227 total, grouped in toolsets)
137
163
 
138
164
  All tools except `list_workspaces` take a `workspace` argument — required for every change, optional for reads when only one workspace is available.
139
165
 
@@ -143,7 +169,7 @@ Every tool schema is sent to the model in each session (Claude Desktop loads all
143
169
 
144
170
  ```bash
145
171
  HULY_TOOLSETS=all # everything
146
- HULY_TOOLSETS=tracker,documents,planner # just these ('core' = list_workspaces and check_setup, always on)
172
+ HULY_TOOLSETS=tracker,documents,planner # just these ('core' = list_workspaces, check_setup and undo_changes, always on)
147
173
  ```
148
174
 
149
175
  **Load on demand** (`HULY_DYNAMIC_TOOLSETS=1`): `HULY_TOOLSETS` becomes the starting set, and Claude loads more toolsets itself via `enable_toolsets`. Called without arguments, it lists every toolset with its tools; called with names, it loads them and tells the client that the tool list changed. With `HULY_TOOLSETS=agent,inbox` a session starts at ≈1.8k tokens instead of ≈9–11k. This needs a client that reloads the tool list on `notifications/tools/list_changed`: it is tested with the MCP SDK client, but **not yet verified in Claude Desktop**. Without the variable, nothing changes.
@@ -182,10 +208,10 @@ HULY_TOOLSETS=tracker,documents,planner # just these ('core' = list_workspaces a
182
208
 
183
209
  Context cost of `tools/list` (≈3.5 chars/token):
184
210
 
185
- | | default (98 tools) | `all` (226 tools) |
211
+ | | default (99 tools) | `all` (227 tools) |
186
212
  |---|--:|--:|
187
- | several workspaces | ~37.4k chars ≈ **10.7k tokens** | ~82.5k chars ≈ **23.6k tokens** |
188
- | pinned with `HULY_WORKSPACE` | ~33.8k chars ≈ **9.7k tokens** | ~74.1k chars ≈ **21.2k tokens** |
213
+ | several workspaces | ~38.3k chars ≈ **10.9k tokens** | ~83.5k chars ≈ **23.9k tokens** |
214
+ | pinned with `HULY_WORKSPACE` | ~34.6k chars ≈ **9.9k tokens** | ~75.0k chars ≈ **21.4k tokens** |
189
215
 
190
216
  For comparison, 2.2.0 needed ≈12.8k tokens for 64 tools. **Using one workspace? Set `HULY_WORKSPACE`** — the `workspace` argument then disappears from every tool (−10%). **Claude Code** loads MCP tools on demand, so there even `HULY_TOOLSETS=all` costs little up front.
191
217
 
@@ -265,6 +291,7 @@ Options: `--run <name>`, `--parent-suite <suite>`, `--no-create` (only existing
265
291
  | Category | Tool | Description |
266
292
  |----------|------|-------------|
267
293
  | **Workspaces** | `list_workspaces` | List the workspaces this account can access (name, slug, id) |
294
+ | | `undo_changes` | Undo your last changes made through this server, newest first: what was created is removed, changed fields get their old values, deleted objects come back with the same id and data. Dry run by default; skips (and says so) when someone changed the object since — `force` overrides. Covers every write tool; history per process (stdio) or per session (HTTP), last 50 changes |
268
295
  | | `check_setup` | Diagnose the setup in one call: version and whether a newer one exists, login (incl. API-token expiry), workspaces, front URL reachable, active settings — never prints secrets |
269
296
  | **Projects** | `list_projects` | List all projects in a workspace |
270
297
  | | `get_project` | Get project details + available statuses |
@@ -444,6 +471,8 @@ A single Huly account can belong to several workspaces — e.g. a personal one a
444
471
  | `HULY_CONFIRM` | no | `auto` (default), `strict` or `off` — ask before deletes and other risky tools (see [Agent workflow](#agent-workflow)) |
445
472
  | `HULY_FILE_ROOT` | no | Directory for local files: `upload_file` (`localPath`) and `download_file` (`savePath`) only work inside it. Off when unset — the server may run remotely |
446
473
  | `MCP_TRANSPORT` | no | Docker only: `http` = the server's own HTTP endpoint (`/mcp`, per-user logins) instead of mcp-proxy (see [Team server over HTTP](#team-server-over-http)) |
474
+ | `MCP_OAUTH_SECRET` | no | HTTP mode: turns on "log in with Huly" (OAuth); at least 32 characters, e.g. `openssl rand -hex 32` (see [Team server over HTTP](#team-server-over-http)) |
475
+ | `MCP_PUBLIC_URL` | with OAuth | The HTTPS address clients reach the server at (issuer and login page), e.g. `https://huly-mcp.example.com` |
447
476
  | `MCP_AUTH_TOKEN` | no | HTTP mode: bearer token every client must send; required before the server's own `HULY_*` login is used over HTTP |
448
477
  | `HULY_PREWARM` | no | `0` turns off connecting at start-up. By default the server logs in (and opens the workspace when there is only one) right after it starts, so the first tool call answers in well under a second instead of 4–12 s |
449
478
  | `HULY_SUBSCRIBE_POLL_MS` | no | How often subscribed `huly://` resources are checked for changes (default 30000, minimum 5000) |
@@ -678,7 +707,7 @@ For network access (HTTP/SSE) use the [Docker image](#docker).
678
707
 
679
708
  ### npx (recommended)
680
709
 
681
- Every client example uses `"command": "npx", "args": ["-y", "huly-mcp-selfhost"]`. Pin a version (`huly-mcp-selfhost@3.4.0`) if you want updates only when you choose.
710
+ Every client example uses `"command": "npx", "args": ["-y", "huly-mcp-selfhost"]`. Pin a version (`huly-mcp-selfhost@3.5.0`) if you want updates only when you choose.
682
711
 
683
712
  ### From source
684
713
 
@@ -724,6 +753,13 @@ claude mcp add --transport http huly https://huly-mcp.example.com/mcp \
724
753
  # optional: --header "X-Huly-Workspace: acme" # pin one workspace (fewer tokens)
725
754
  ```
726
755
 
756
+ **Log in with Huly (OAuth).** Set `MCP_OAUTH_SECRET` (`openssl rand -hex 32`) and `MCP_PUBLIC_URL` (the HTTPS address clients reach, e.g. `https://huly-mcp.example.com`). Then people simply add `https://huly-mcp.example.com/mcp` in their AI app — Claude Code (`claude mcp add --transport http huly …`), Claude's custom connectors and other OAuth-capable MCP clients — and log in in the browser with their own Huly account: e-mail + password, or a one-time code by e-mail for Google/GitHub accounts. One server, as many people as you like, nobody handles tokens.
757
+
758
+ - Stateless: registrations, codes and tokens are sealed with AES-256-GCM under `MCP_OAUTH_SECRET` — no database, logins survive restarts. Changing the secret logs everyone out.
759
+ - The Huly password goes only to your Huly server; the server keeps just the resulting Huly token, inside the sealed tokens. Access tokens last 1 hour, refresh tokens 30 days and work once (rotation). Login attempts are throttled per address.
760
+ - The protocol parts (client registration, PKCE, token endpoint, metadata) are the MCP SDK's own; this server adds the login page and the tokens.
761
+ - `X-Huly-Workspace` still pins a workspace. In OAuth mode `/mcp` needs the OAuth token; `MCP_AUTH_TOKEN` and the `X-Huly-*` login headers are for the other mode.
762
+
727
763
  **One shared account.** The server's own `HULY_*` login is only used behind a bearer token — set `MCP_AUTH_TOKEN` and give clients `Authorization: Bearer <token>`. Without it an open port would act as that account, so the server refuses and asks for per-user headers instead. With `MCP_AUTH_TOKEN` set, every request needs the bearer token, also when it brings its own login.
728
764
 
729
765
  Set `MCP_ALLOWED_HOSTS` to the host names clients use (DNS-rebinding protection). Use HTTPS (reverse proxy) as soon as logins travel over a network. Idle sessions close after 30 minutes.
@@ -910,6 +946,8 @@ See [`src/connection.ts`](https://github.com/JoKeks2023/huly-mcp/blob/main/src/c
910
946
  npm ci && npm run build && npm test
911
947
  ```
912
948
 
949
+ `npm run build` type-checks (`tsc --noEmit`) and bundles `src/` with all dependencies into one readable file, `dist/index.js` (esbuild, not minified), plus `dist/guides/`. The published package therefore has no runtime dependencies; everything in `package.json` is a dev dependency. Tests run on the TypeScript sources (`tsx`).
950
+
913
951
  GitHub Actions check every pull request:
914
952
 
915
953
  | Workflow | What it checks |
@@ -949,13 +987,13 @@ See [CHANGELOG.md](https://github.com/JoKeks2023/huly-mcp/blob/main/CHANGELOG.md
949
987
 
950
988
  ## Credits
951
989
 
952
- Started as a fork of [varaprasadreddy9676/huly-mcp](https://github.com/varaprasadreddy9676/huly-mcp) (npm `huly-mcp-sdk`) by SaiVaraprasad Medapati and grown from its 33 tools to 226, with self-hosted support, toolsets, agent workflow and the Claude Code plugin. Published separately as `huly-mcp-selfhost`. Not affiliated with Huly Labs.
990
+ Started as a fork of [varaprasadreddy9676/huly-mcp](https://github.com/varaprasadreddy9676/huly-mcp) (npm `huly-mcp-sdk`) by SaiVaraprasad Medapati and grown from its 33 tools to 227, with self-hosted support, toolsets, agent workflow and the Claude Code plugin. Published separately as `huly-mcp-selfhost`. Not affiliated with Huly Labs.
953
991
 
954
992
  ## Links
955
993
 
956
994
  - Website: https://jokeks2023.github.io/huly-mcp/
957
995
  - Source and issues: https://github.com/JoKeks2023/huly-mcp
958
- - npm: https://www.npmjs.com/package/huly-mcp-selfhost · Docker: https://hub.docker.com/r/jokeks2023/huly-mcp · MCP Registry: `io.github.jokeks2023/huly-mcp-selfhost`
996
+ - npm: https://www.npmjs.com/package/huly-mcp-selfhost · Docker: https://hub.docker.com/r/jokeks2023/huly-mcp · MCP Registry: `io.github.JoKeks2023/huly-mcp-selfhost`
959
997
  - Security: [SECURITY.md](https://github.com/JoKeks2023/huly-mcp/blob/main/SECURITY.md)
960
998
 
961
999
  ## License
@@ -52,6 +52,7 @@ Narrow lists with filters (`status`, `assignee`, `milestoneLabel`, `componentLab
52
52
  ## 5. Be careful with
53
53
 
54
54
  - Bulk changes, `move_issue`, deletes: show what will change first.
55
+ - A change went wrong: `undo_changes` (dry run first) reverses your last changes through this server — don't repair by hand.
55
56
  - GitHub-synced projects: every change appears on GitHub too; don't cross-post.
56
57
  - `HULY_WRITE_PROJECTS` refusals: tell the user, don't work around them.
57
58
  - Huly calls fail with login/connection errors: run `check_setup` and show the user what it says.