huly-mcp-sdk 0.3.1 → 0.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.
- package/README.md +97 -43
- package/dist/schemas.d.ts +39 -0
- package/dist/schemas.js +17 -2
- package/dist/schemas.js.map +1 -1
- package/dist/server.js +7 -2
- package/dist/server.js.map +1 -1
- package/dist/tools/comments.d.ts +9 -0
- package/dist/tools/comments.js +28 -1
- package/dist/tools/comments.js.map +1 -1
- package/dist/tools/documents.d.ts +9 -0
- package/dist/tools/documents.js +152 -1
- package/dist/tools/documents.js.map +1 -1
- package/dist/tools/issues.d.ts +2 -0
- package/dist/tools/issues.js +26 -4
- package/dist/tools/issues.js.map +1 -1
- package/dist/tools/log-time.d.ts +10 -0
- package/dist/tools/log-time.js +31 -0
- package/dist/tools/log-time.js.map +1 -0
- package/dist/tools/projects.js +2 -2
- package/dist/tools/projects.js.map +1 -1
- package/package.json +1 -1
- package/scripts/clean-comments.mjs +70 -0
- package/scripts/link-docs-to-issues.mjs +73 -0
- package/scripts/populate-docs.mjs +505 -0
package/README.md
CHANGED
|
@@ -2,33 +2,42 @@
|
|
|
2
2
|
|
|
3
3
|
> The most complete MCP server for [Huly](https://huly.app) — the open-source project management platform.
|
|
4
4
|
|
|
5
|
-
Connects **Claude Desktop** (and any [MCP](https://modelcontextprotocol.io)-compatible client) directly to your Huly workspace. Manage
|
|
5
|
+
Connects **Claude Desktop** (and any [MCP](https://modelcontextprotocol.io)-compatible client) directly to your Huly workspace. Manage projects, issues, milestones, components, documents, labels, and more — all via natural language.
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
-
## Tools (
|
|
9
|
+
## Tools (32 total)
|
|
10
10
|
|
|
11
11
|
| Category | Tool | Description |
|
|
12
12
|
|----------|------|-------------|
|
|
13
13
|
| **Projects** | `list_projects` | List all projects in the workspace |
|
|
14
14
|
| | `get_project` | Get project details + available statuses |
|
|
15
|
-
|
|
|
15
|
+
| | `create_project` | Create a new tracker project with a unique identifier |
|
|
16
|
+
| **Issues** | `list_issues` | List issues with optional status / priority filters |
|
|
16
17
|
| | `get_issue` | Get full details of an issue (e.g. `PROJ-42`) |
|
|
17
18
|
| | `create_issue` | Create a new issue |
|
|
18
|
-
| | `update_issue` | Update title, status, priority, assignee,
|
|
19
|
+
| | `update_issue` | Update title, status, priority, assignee, due date, component, milestone |
|
|
19
20
|
| | `delete_issue` | Permanently delete an issue by identifier |
|
|
20
21
|
| **Comments** | `add_comment` | Add a comment to an issue |
|
|
21
|
-
|
|
|
22
|
+
| | `list_comments` | List all comments on an issue |
|
|
23
|
+
| **Time Tracking** | `log_time` | Log hours spent on an issue |
|
|
24
|
+
| **Labels** | `list_labels` | List all labels with color + usage count |
|
|
22
25
|
| | `create_label` | Create a new label with an optional hex color |
|
|
23
|
-
| | `add_label` | Add a label to an issue (auto-creates
|
|
26
|
+
| | `add_label` | Add a label to an issue (auto-creates if it doesn't exist) |
|
|
24
27
|
| | `remove_label` | Remove a label from an issue |
|
|
25
28
|
| **Relations** | `add_relation` | Mark two issues as related (bidirectional) |
|
|
26
29
|
| | `add_blocked_by` | Mark an issue as blocked by another issue |
|
|
27
30
|
| | `set_parent` | Set or clear the parent epic of an issue |
|
|
28
31
|
| **Members** | `list_members` | List workspace members |
|
|
29
32
|
| **Milestones** | `list_milestones` | List milestones for a project |
|
|
33
|
+
| | `create_milestone` | Create a milestone with a target date and status |
|
|
34
|
+
| **Components** | `list_components` | List components (sub-areas) in a project |
|
|
35
|
+
| | `create_component` | Create a new component with optional lead |
|
|
30
36
|
| **Documents** | `list_teamspaces` | List document teamspaces |
|
|
31
37
|
| | `list_documents` | List documents in a teamspace |
|
|
38
|
+
| | `get_document` | Get document metadata + content (see [Document content](#document-content)) |
|
|
39
|
+
| | `create_document` | Create a new document in a teamspace |
|
|
40
|
+
| | `update_document` | Set document content from Markdown — renders Mermaid diagrams natively (see [Document content](#document-content)) |
|
|
32
41
|
| **Search** | `search_issues` | Full-text search across all issues |
|
|
33
42
|
|
|
34
43
|
---
|
|
@@ -42,30 +51,17 @@ Connects **Claude Desktop** (and any [MCP](https://modelcontextprotocol.io)-comp
|
|
|
42
51
|
|
|
43
52
|
## Quick Start
|
|
44
53
|
|
|
45
|
-
### 1. Install
|
|
54
|
+
### 1. Install via npx (easiest)
|
|
46
55
|
|
|
47
56
|
```bash
|
|
48
|
-
|
|
49
|
-
cd huly-mcp
|
|
50
|
-
npm install
|
|
51
|
-
npm run build
|
|
57
|
+
npx huly-mcp-sdk setup
|
|
52
58
|
```
|
|
53
59
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
Run the interactive setup wizard — it sends a one-time code to your email (works for Google/GitHub SSO accounts too):
|
|
57
|
-
|
|
58
|
-
```bash
|
|
59
|
-
npm run setup
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
The wizard will ask for your email address and workspace slug, send a 6-digit OTP to your inbox, and write a `.env` file automatically.
|
|
60
|
+
This runs the interactive setup wizard — sends a one-time code to your email (works for Google/GitHub SSO accounts too) and writes your `.env` file automatically.
|
|
63
61
|
|
|
64
62
|
**Your workspace slug** is the part of your Huly URL after the domain: `huly.app/`**`myteam`** → slug is `myteam`.
|
|
65
63
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
### 3. Configure Claude Desktop
|
|
64
|
+
### 2. Configure Claude Desktop
|
|
69
65
|
|
|
70
66
|
Add this to your Claude Desktop config:
|
|
71
67
|
|
|
@@ -76,10 +72,10 @@ Add this to your Claude Desktop config:
|
|
|
76
72
|
{
|
|
77
73
|
"mcpServers": {
|
|
78
74
|
"huly": {
|
|
79
|
-
"command": "
|
|
80
|
-
"args": ["
|
|
75
|
+
"command": "npx",
|
|
76
|
+
"args": ["huly-mcp-sdk"],
|
|
81
77
|
"env": {
|
|
82
|
-
"HULY_TOKEN": "paste-token-
|
|
78
|
+
"HULY_TOKEN": "paste-token-here",
|
|
83
79
|
"HULY_WORKSPACE": "your-workspace-slug"
|
|
84
80
|
}
|
|
85
81
|
}
|
|
@@ -89,32 +85,84 @@ Add this to your Claude Desktop config:
|
|
|
89
85
|
|
|
90
86
|
Restart Claude Desktop after saving.
|
|
91
87
|
|
|
88
|
+
> **Alternative (clone & build):**
|
|
89
|
+
> ```bash
|
|
90
|
+
> git clone https://github.com/varaprasadreddy9676/huly-mcp.git
|
|
91
|
+
> cd huly-mcp && npm install && npm run build
|
|
92
|
+
> ```
|
|
93
|
+
> Then use `"command": "node", "args": ["/absolute/path/to/huly-mcp/dist/index.js"]` in your config.
|
|
94
|
+
|
|
92
95
|
---
|
|
96
|
+
<img width="932" height="401" alt="image" src="https://github.com/user-attachments/assets/0f9d9a74-ca1e-4884-bd6a-918c0fb8ddbd" />
|
|
93
97
|
|
|
94
98
|
## Example Prompts
|
|
95
99
|
|
|
96
|
-
**
|
|
100
|
+
**Projects & issues:**
|
|
101
|
+
- *"Create a new project called 'Mobile App' with identifier MOBILE"*
|
|
97
102
|
- *"List all in-progress issues in the PROJ project"*
|
|
98
103
|
- *"Create a high-priority issue in PROJ titled 'Fix login timeout'"*
|
|
99
|
-
- *"Update PROJ-42 status to Done and
|
|
104
|
+
- *"Update PROJ-42 status to Done, assign it to Sarah, and move it to the Auth component"*
|
|
100
105
|
- *"Search for issues related to authentication"*
|
|
101
106
|
- *"Add a comment to PROJ-15 saying the fix is deployed"*
|
|
107
|
+
- *"List all comments on PROJ-42 to see the discussion"*
|
|
108
|
+
|
|
109
|
+
**Milestones & components:**
|
|
110
|
+
- *"Create a milestone 'v2.0 Launch' in PROJ with target date 2026-06-01"*
|
|
111
|
+
- *"List milestones for the PROJ project"*
|
|
112
|
+
- *"Create a component called 'Auth' in PROJ"*
|
|
113
|
+
- *"List all components in PROJ"*
|
|
102
114
|
|
|
103
|
-
**Labels:**
|
|
104
|
-
- *"List all labels in my workspace"*
|
|
115
|
+
**Labels & relations:**
|
|
105
116
|
- *"Add the label 'bug' to PROJ-42"*
|
|
106
117
|
- *"Create a label called 'backend' with color #3b82f6"*
|
|
107
|
-
- *"Remove the 'wontfix' label from PROJ-10"*
|
|
108
|
-
|
|
109
|
-
**Relations:**
|
|
110
118
|
- *"Mark PROJ-55 as blocked by PROJ-12"*
|
|
111
|
-
- *"Mark PROJ-30 and PROJ-31 as related"*
|
|
112
119
|
- *"Set PROJ-42 as a subtask of PROJ-5"*
|
|
113
120
|
|
|
114
|
-
**
|
|
115
|
-
- *"
|
|
116
|
-
- *"
|
|
121
|
+
**Time tracking:**
|
|
122
|
+
- *"Log 2.5 hours on PROJ-42 for the database refactor"*
|
|
123
|
+
- *"Log 1 hour on PROJ-55 — Fixed bug in login form"*
|
|
124
|
+
|
|
125
|
+
**Documents:**
|
|
117
126
|
- *"List all documents in the Engineering teamspace"*
|
|
127
|
+
- *"Create a document called 'API Design' in the Engineering teamspace"*
|
|
128
|
+
- *"Get the content of document abc123"*
|
|
129
|
+
- *"Update document abc123 with this Markdown content: ..."*
|
|
130
|
+
- *"Add a Mermaid flowchart to the EP1 document"*
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
## Document Content
|
|
135
|
+
|
|
136
|
+
Document content in Huly is stored in a collaborative editing layer (not inline in the database). `get_document` always returns full metadata. To also fetch and read the **text content**, set the optional `HULY_FRONT_URL` env var.
|
|
137
|
+
|
|
138
|
+
### Writing document content with `update_document`
|
|
139
|
+
|
|
140
|
+
`update_document` accepts a `documentId` and a `markdown` string and writes rich content directly to the document — no manual editing required. Supported Markdown elements:
|
|
141
|
+
|
|
142
|
+
- Headings (`#`, `##`, `###`)
|
|
143
|
+
- Paragraphs and inline **bold** / `code`
|
|
144
|
+
- Fenced code blocks — ` ```mermaid ` blocks are stored using Huly's native Mermaid node type, so diagrams render as interactive visuals in the editor
|
|
145
|
+
- Bullet lists
|
|
146
|
+
- Pipe tables
|
|
147
|
+
|
|
148
|
+
```
|
|
149
|
+
update_document({
|
|
150
|
+
documentId: "abc123",
|
|
151
|
+
markdown: "# My Doc\n\n```mermaid\nflowchart TD\n A --> B\n```"
|
|
152
|
+
})
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
```json
|
|
156
|
+
"env": {
|
|
157
|
+
"HULY_TOKEN": "...",
|
|
158
|
+
"HULY_WORKSPACE": "myteam",
|
|
159
|
+
"HULY_FRONT_URL": "https://front.huly.app"
|
|
160
|
+
}
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
For **self-hosted** Huly, set `HULY_FRONT_URL` to your own front service URL (e.g. `http://localhost:8083`).
|
|
164
|
+
|
|
165
|
+
Without `HULY_FRONT_URL`, `get_document` still returns the title, teamspace, comments, snapshots count, and the blob reference ID.
|
|
118
166
|
|
|
119
167
|
---
|
|
120
168
|
|
|
@@ -137,13 +185,11 @@ Improve performance,Urgent,,2025-05-01
|
|
|
137
185
|
|
|
138
186
|
Required column: `title`. Optional: `priority` (Urgent/High/Medium/Low), `status` (must match a status name in the project), `dueDate` (YYYY-MM-DD).
|
|
139
187
|
|
|
140
|
-
Auth is read from your `.env` file automatically.
|
|
141
|
-
|
|
142
188
|
---
|
|
143
189
|
|
|
144
190
|
## Manual Auth
|
|
145
191
|
|
|
146
|
-
|
|
192
|
+
Create a `.env` file in the project root:
|
|
147
193
|
|
|
148
194
|
**Option A — Token (recommended for all account types):**
|
|
149
195
|
|
|
@@ -152,10 +198,9 @@ HULY_WORKSPACE=your-workspace-slug
|
|
|
152
198
|
HULY_TOKEN=your-token-here
|
|
153
199
|
```
|
|
154
200
|
|
|
155
|
-
To get a token
|
|
156
|
-
1. Go to [huly.app](https://huly.app) → open browser DevTools → Application → Local Storage → `https://huly.app` → copy the `token` value.
|
|
201
|
+
To get a token: go to [huly.app](https://huly.app) → open browser DevTools → Application → Local Storage → `https://huly.app` → copy the `token` value.
|
|
157
202
|
|
|
158
|
-
> Tokens expire after some time. If you get an auth error, run `
|
|
203
|
+
> Tokens expire after some time. If you get an auth error, run `npx huly-mcp-sdk setup` again or refresh the token from DevTools.
|
|
159
204
|
|
|
160
205
|
**Option B — Email + password:**
|
|
161
206
|
|
|
@@ -171,6 +216,7 @@ HULY_WORKSPACE=your-workspace-slug
|
|
|
171
216
|
|
|
172
217
|
```bash
|
|
173
218
|
HULY_ACCOUNTS_URL=https://your-huly-instance.com/account
|
|
219
|
+
HULY_FRONT_URL=https://your-huly-instance.com
|
|
174
220
|
```
|
|
175
221
|
|
|
176
222
|
---
|
|
@@ -184,6 +230,14 @@ HULY_ACCOUNTS_URL=https://your-huly-instance.com/account
|
|
|
184
230
|
|
|
185
231
|
---
|
|
186
232
|
|
|
233
|
+
## Links
|
|
234
|
+
|
|
235
|
+
- npm: https://www.npmjs.com/package/huly-mcp-sdk
|
|
236
|
+
- GitHub: https://github.com/varaprasadreddy9676/huly-mcp
|
|
237
|
+
- MCP Registry: https://registry.modelcontextprotocol.io (search "huly-mcp")
|
|
238
|
+
|
|
239
|
+
---
|
|
240
|
+
|
|
187
241
|
## License
|
|
188
242
|
|
|
189
243
|
[Eclipse Public License 2.0](https://www.eclipse.org/legal/epl-2.0/)
|
package/dist/schemas.d.ts
CHANGED
|
@@ -62,6 +62,8 @@ export declare const UpdateIssueSchema: z.ZodObject<{
|
|
|
62
62
|
priority: z.ZodOptional<z.ZodEnum<["NoPriority", "Urgent", "High", "Medium", "Low"]>>;
|
|
63
63
|
dueDate: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
64
64
|
assignee: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
65
|
+
componentLabel: z.ZodOptional<z.ZodString>;
|
|
66
|
+
milestoneLabel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
65
67
|
}, "strip", z.ZodTypeAny, {
|
|
66
68
|
identifier: string;
|
|
67
69
|
title?: string | undefined;
|
|
@@ -69,6 +71,8 @@ export declare const UpdateIssueSchema: z.ZodObject<{
|
|
|
69
71
|
statusName?: string | undefined;
|
|
70
72
|
dueDate?: string | null | undefined;
|
|
71
73
|
assignee?: string | null | undefined;
|
|
74
|
+
componentLabel?: string | undefined;
|
|
75
|
+
milestoneLabel?: string | null | undefined;
|
|
72
76
|
}, {
|
|
73
77
|
identifier: string;
|
|
74
78
|
title?: string | undefined;
|
|
@@ -76,6 +80,8 @@ export declare const UpdateIssueSchema: z.ZodObject<{
|
|
|
76
80
|
statusName?: string | undefined;
|
|
77
81
|
dueDate?: string | null | undefined;
|
|
78
82
|
assignee?: string | null | undefined;
|
|
83
|
+
componentLabel?: string | undefined;
|
|
84
|
+
milestoneLabel?: string | null | undefined;
|
|
79
85
|
}>;
|
|
80
86
|
export declare const AddCommentSchema: z.ZodObject<{
|
|
81
87
|
identifier: z.ZodString;
|
|
@@ -250,3 +256,36 @@ export declare const SetParentSchema: z.ZodObject<{
|
|
|
250
256
|
identifier: string;
|
|
251
257
|
parentIdentifier?: string | null | undefined;
|
|
252
258
|
}>;
|
|
259
|
+
export declare const ListCommentsSchema: z.ZodObject<{
|
|
260
|
+
identifier: z.ZodString;
|
|
261
|
+
limit: z.ZodDefault<z.ZodNumber>;
|
|
262
|
+
}, "strip", z.ZodTypeAny, {
|
|
263
|
+
identifier: string;
|
|
264
|
+
limit: number;
|
|
265
|
+
}, {
|
|
266
|
+
identifier: string;
|
|
267
|
+
limit?: number | undefined;
|
|
268
|
+
}>;
|
|
269
|
+
export declare const LogTimeSchema: z.ZodObject<{
|
|
270
|
+
identifier: z.ZodString;
|
|
271
|
+
hours: z.ZodNumber;
|
|
272
|
+
description: z.ZodOptional<z.ZodString>;
|
|
273
|
+
}, "strip", z.ZodTypeAny, {
|
|
274
|
+
identifier: string;
|
|
275
|
+
hours: number;
|
|
276
|
+
description?: string | undefined;
|
|
277
|
+
}, {
|
|
278
|
+
identifier: string;
|
|
279
|
+
hours: number;
|
|
280
|
+
description?: string | undefined;
|
|
281
|
+
}>;
|
|
282
|
+
export declare const UpdateDocumentSchema: z.ZodObject<{
|
|
283
|
+
documentId: z.ZodString;
|
|
284
|
+
markdown: z.ZodString;
|
|
285
|
+
}, "strip", z.ZodTypeAny, {
|
|
286
|
+
documentId: string;
|
|
287
|
+
markdown: string;
|
|
288
|
+
}, {
|
|
289
|
+
documentId: string;
|
|
290
|
+
markdown: string;
|
|
291
|
+
}>;
|
package/dist/schemas.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SetParentSchema = exports.AddBlockedBySchema = exports.AddRelationSchema = exports.RemoveLabelSchema = exports.AddLabelSchema = exports.CreateLabelSchema = exports.ListLabelsSchema = exports.SearchIssuesSchema = exports.CreateDocumentSchema = exports.GetDocumentSchema = exports.ListDocumentsSchema = exports.CreateProjectSchema = exports.CreateComponentSchema = exports.ListComponentsSchema = exports.CreateMilestoneSchema = exports.ListMilestonesSchema = exports.AddCommentSchema = exports.UpdateIssueSchema = exports.DeleteIssueSchema = exports.CreateIssueSchema = exports.GetIssueSchema = exports.ListIssuesSchema = exports.GetProjectSchema = void 0;
|
|
3
|
+
exports.UpdateDocumentSchema = exports.LogTimeSchema = exports.ListCommentsSchema = exports.SetParentSchema = exports.AddBlockedBySchema = exports.AddRelationSchema = exports.RemoveLabelSchema = exports.AddLabelSchema = exports.CreateLabelSchema = exports.ListLabelsSchema = exports.SearchIssuesSchema = exports.CreateDocumentSchema = exports.GetDocumentSchema = exports.ListDocumentsSchema = exports.CreateProjectSchema = exports.CreateComponentSchema = exports.ListComponentsSchema = exports.CreateMilestoneSchema = exports.ListMilestonesSchema = exports.AddCommentSchema = exports.UpdateIssueSchema = exports.DeleteIssueSchema = exports.CreateIssueSchema = exports.GetIssueSchema = exports.ListIssuesSchema = exports.GetProjectSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const PriorityEnum = zod_1.z.enum(['NoPriority', 'Urgent', 'High', 'Medium', 'Low']);
|
|
6
6
|
exports.GetProjectSchema = zod_1.z.object({
|
|
@@ -31,7 +31,9 @@ exports.UpdateIssueSchema = zod_1.z.object({
|
|
|
31
31
|
statusName: zod_1.z.string().optional().describe('New status name'),
|
|
32
32
|
priority: PriorityEnum.optional().describe('New priority'),
|
|
33
33
|
dueDate: zod_1.z.string().nullable().optional().describe('New due date (ISO 8601) or null to clear'),
|
|
34
|
-
assignee: zod_1.z.string().nullable().optional().describe('Assignee name (first/last/full) or null to unassign')
|
|
34
|
+
assignee: zod_1.z.string().nullable().optional().describe('Assignee name (first/last/full) or null to unassign'),
|
|
35
|
+
componentLabel: zod_1.z.string().optional().describe('Component name to assign, or null to unassign'),
|
|
36
|
+
milestoneLabel: zod_1.z.string().nullable().optional().describe('Milestone name to assign, or null to clear')
|
|
35
37
|
});
|
|
36
38
|
exports.AddCommentSchema = zod_1.z.object({
|
|
37
39
|
identifier: zod_1.z.string().describe('Issue identifier, e.g. "PROJ-123"'),
|
|
@@ -105,4 +107,17 @@ exports.SetParentSchema = zod_1.z.object({
|
|
|
105
107
|
identifier: zod_1.z.string().describe('Child issue identifier, e.g. "PROJ-123"'),
|
|
106
108
|
parentIdentifier: zod_1.z.string().nullable().optional().describe('Parent issue identifier, or null to clear parent')
|
|
107
109
|
});
|
|
110
|
+
exports.ListCommentsSchema = zod_1.z.object({
|
|
111
|
+
identifier: zod_1.z.string().describe('Issue identifier, e.g. "PROJ-123"'),
|
|
112
|
+
limit: zod_1.z.number().int().min(1).max(100).default(20).describe('Max comments to return')
|
|
113
|
+
});
|
|
114
|
+
exports.LogTimeSchema = zod_1.z.object({
|
|
115
|
+
identifier: zod_1.z.string().describe('Issue identifier, e.g. "PROJ-123"'),
|
|
116
|
+
hours: zod_1.z.number().positive().describe('Hours spent (e.g. 2.5)'),
|
|
117
|
+
description: zod_1.z.string().optional().describe('What was done (optional note)')
|
|
118
|
+
});
|
|
119
|
+
exports.UpdateDocumentSchema = zod_1.z.object({
|
|
120
|
+
documentId: zod_1.z.string().describe('Document _id from list_documents or create_document'),
|
|
121
|
+
markdown: zod_1.z.string().min(1).describe('Markdown content to set as the document body')
|
|
122
|
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AAC,wBAAwB,CAAC;CACvF,CAAC,CAAA;AAEW,QAAA,aAAa,GAAG,OAAC,CAAC,MAAM,CAAC;IACpC,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,mCAAmC,CAAC;IACpE,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,wBAAwB,CAAC;IAC/D,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,+BAA+B,CAAC;CAC7E,CAAC,CAAA;AAEW,QAAA,oBAAoB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC3C,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,qDAAqD,CAAC;IACtF,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,8CAA8C,CAAC;CACrF,CAAC,CAAA"}
|
package/dist/server.js
CHANGED
|
@@ -5,6 +5,7 @@ const mcp_js_1 = require("@modelcontextprotocol/sdk/server/mcp.js");
|
|
|
5
5
|
const projects_1 = require("./tools/projects");
|
|
6
6
|
const issues_1 = require("./tools/issues");
|
|
7
7
|
const comments_1 = require("./tools/comments");
|
|
8
|
+
const log_time_1 = require("./tools/log-time");
|
|
8
9
|
const members_1 = require("./tools/members");
|
|
9
10
|
const milestones_1 = require("./tools/milestones");
|
|
10
11
|
const documents_1 = require("./tools/documents");
|
|
@@ -14,7 +15,7 @@ const relations_1 = require("./tools/relations");
|
|
|
14
15
|
const components_1 = require("./tools/components");
|
|
15
16
|
const schemas_1 = require("./schemas");
|
|
16
17
|
function createServer() {
|
|
17
|
-
const server = new mcp_js_1.McpServer({ name: 'huly-mcp', version: '0.
|
|
18
|
+
const server = new mcp_js_1.McpServer({ name: 'huly-mcp', version: '0.4.0' });
|
|
18
19
|
// Projects
|
|
19
20
|
server.tool('list_projects', 'List all projects in the Huly workspace', {}, projects_1.listProjects);
|
|
20
21
|
server.tool('get_project', 'Get a project by its identifier (e.g. "PROJ")', schemas_1.GetProjectSchema.shape, projects_1.getProject);
|
|
@@ -23,10 +24,13 @@ function createServer() {
|
|
|
23
24
|
server.tool('list_issues', 'List issues in a project with optional filters', schemas_1.ListIssuesSchema.shape, issues_1.listIssues);
|
|
24
25
|
server.tool('get_issue', 'Get full details of an issue by identifier (e.g. "PROJ-123")', schemas_1.GetIssueSchema.shape, issues_1.getIssue);
|
|
25
26
|
server.tool('create_issue', 'Create a new issue in a project', schemas_1.CreateIssueSchema.shape, issues_1.createIssue);
|
|
26
|
-
server.tool('update_issue', 'Update an existing issue (title, status, priority, due date, assignee)', schemas_1.UpdateIssueSchema.shape, issues_1.updateIssue);
|
|
27
|
+
server.tool('update_issue', 'Update an existing issue (title, status, priority, due date, assignee, component, milestone)', schemas_1.UpdateIssueSchema.shape, issues_1.updateIssue);
|
|
27
28
|
server.tool('delete_issue', 'Permanently delete an issue by identifier (e.g. "PROJ-123")', schemas_1.DeleteIssueSchema.shape, issues_1.deleteIssue);
|
|
28
29
|
// Comments
|
|
29
30
|
server.tool('add_comment', 'Add a comment to an issue', schemas_1.AddCommentSchema.shape, comments_1.addComment);
|
|
31
|
+
server.tool('list_comments', 'List all comments on an issue', schemas_1.ListCommentsSchema.shape, comments_1.listComments);
|
|
32
|
+
// Time tracking
|
|
33
|
+
server.tool('log_time', 'Log hours spent on an issue', schemas_1.LogTimeSchema.shape, log_time_1.logTime);
|
|
30
34
|
// Labels
|
|
31
35
|
server.tool('list_labels', 'List all labels in the workspace', schemas_1.ListLabelsSchema.shape, labels_1.listLabels);
|
|
32
36
|
server.tool('create_label', 'Create a new label with an optional hex color', schemas_1.CreateLabelSchema.shape, labels_1.createLabel);
|
|
@@ -49,6 +53,7 @@ function createServer() {
|
|
|
49
53
|
server.tool('list_documents', 'List documents in a teamspace', schemas_1.ListDocumentsSchema.shape, documents_1.listDocuments);
|
|
50
54
|
server.tool('get_document', 'Get metadata and content of a document (content requires HULY_FRONT_URL env)', schemas_1.GetDocumentSchema.shape, documents_1.getDocument);
|
|
51
55
|
server.tool('create_document', 'Create a new document in a teamspace', schemas_1.CreateDocumentSchema.shape, documents_1.createDocument);
|
|
56
|
+
server.tool('update_document', 'Set or replace the content of a document from Markdown (supports headings, paragraphs, code blocks, tables, bullet lists)', schemas_1.UpdateDocumentSchema.shape, documents_1.updateDocument);
|
|
52
57
|
// Search
|
|
53
58
|
server.tool('search_issues', 'Full-text search across all issues', schemas_1.SearchIssuesSchema.shape, search_1.searchIssues);
|
|
54
59
|
return server;
|
package/dist/server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":";;AAyCA,oCAuDC;AAhGD,oEAAmE;AACnE,+CAA0E;AAC1E,2CAA4F;AAC5F,+CAA2D;AAC3D,+CAA0C;AAC1C,6CAA6C;AAC7C,mDAAoE;AACpE,iDAA8G;AAC9G,2CAA6C;AAC7C,2CAA+E;AAC/E,iDAAwE;AACxE,mDAAoE;AACpE,uCA2BkB;AAElB,SAAgB,YAAY;IAC1B,MAAM,MAAM,GAAG,IAAI,kBAAS,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,CAAA;IAEpE,WAAW;IACX,MAAM,CAAC,IAAI,CAAC,eAAe,EAAE,yCAAyC,EAAE,EAAE,EAAE,uBAAY,CAAC,CAAA;IACzF,MAAM,CAAC,IAAI,CAAC,aAAa,EAAE,+CAA+C,EAAE,0BAAgB,CAAC,KAAK,EAAE,qBAAU,CAAC,CAAA;IAC/G,MAAM,CAAC,IAAI,CAAC,gBAAgB,EAAE,gEAAgE,EAAE,6BAAmB,CAAC,KAAK,EAAE,wBAAa,CAAC,CAAA;IAEz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AAC,IAAI,CAAC,iBAAiB,EAAE,sCAAsC,EAAE,8BAAoB,CAAC,KAAK,EAAE,0BAAc,CAAC,CAAA;IAClH,MAAM,CAAC,IAAI,CAAC,iBAAiB,EAAE,2HAA2H,EAAE,8BAAoB,CAAC,KAAK,EAAE,0BAAc,CAAC,CAAA;IAEvM,SAAS;IACT,MAAM,CAAC,IAAI,CAAC,eAAe,EAAE,oCAAoC,EAAE,4BAAkB,CAAC,KAAK,EAAE,qBAAY,CAAC,CAAA;IAE1G,OAAO,MAAM,CAAA;AACf,CAAC"}
|
package/dist/tools/comments.d.ts
CHANGED
package/dist/tools/comments.js
CHANGED
|
@@ -3,11 +3,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.addComment = void 0;
|
|
6
|
+
exports.listComments = exports.addComment = void 0;
|
|
7
7
|
const tracker_1 = __importDefault(require("@hcengineering/tracker"));
|
|
8
8
|
const chunter_1 = __importDefault(require("@hcengineering/chunter"));
|
|
9
|
+
const contact_1 = __importDefault(require("@hcengineering/contact"));
|
|
9
10
|
const connection_1 = require("../connection");
|
|
10
11
|
const errors_1 = require("../utils/errors");
|
|
12
|
+
const format_1 = require("../utils/format");
|
|
13
|
+
const core_1 = require("@hcengineering/core");
|
|
11
14
|
exports.addComment = (0, errors_1.wrapToolHandler)(async (args) => {
|
|
12
15
|
const client = await (0, connection_1.getConnection)();
|
|
13
16
|
const issue = await client.findOne(tracker_1.default.class.Issue, { identifier: args.identifier });
|
|
@@ -16,4 +19,28 @@ exports.addComment = (0, errors_1.wrapToolHandler)(async (args) => {
|
|
|
16
19
|
await client.addCollection(chunter_1.default.class.ChatMessage, issue.space, issue._id, tracker_1.default.class.Issue, 'comments', { message: args.message });
|
|
17
20
|
return `✅ Comment added to **${args.identifier}**.`;
|
|
18
21
|
});
|
|
22
|
+
exports.listComments = (0, errors_1.wrapToolHandler)(async (args) => {
|
|
23
|
+
const client = await (0, connection_1.getConnection)();
|
|
24
|
+
const issue = await client.findOne(tracker_1.default.class.Issue, { identifier: args.identifier });
|
|
25
|
+
if (issue == null)
|
|
26
|
+
throw new Error(`Issue '${args.identifier}' not found.`);
|
|
27
|
+
const comments = await client.findAll(chunter_1.default.class.ChatMessage, { attachedTo: issue._id }, { limit: args.limit, sort: { createdOn: core_1.SortingOrder.Ascending } });
|
|
28
|
+
if (comments.length === 0)
|
|
29
|
+
return `No comments found on **${args.identifier}**.`;
|
|
30
|
+
// Filter comments with valid authors
|
|
31
|
+
const commentsWithAuthors = comments.filter((c) => c.createdBy != null);
|
|
32
|
+
// Resolve author details
|
|
33
|
+
const authorIds = [...new Set(commentsWithAuthors.map((c) => c.createdBy))];
|
|
34
|
+
const members = authorIds.length > 0
|
|
35
|
+
? await client.findAll(contact_1.default.class.Member, { _id: { $in: authorIds } })
|
|
36
|
+
: [];
|
|
37
|
+
const memberMap = new Map(members.map((m) => [m._id, m.name ?? m._id]));
|
|
38
|
+
const lines = commentsWithAuthors.map((comment) => {
|
|
39
|
+
const author = memberMap.get(comment.createdBy) ?? 'Unknown';
|
|
40
|
+
const date = (0, format_1.formatDate)(comment.createdOn);
|
|
41
|
+
const message = comment.message ?? '';
|
|
42
|
+
return `**${author}** @ ${date}:\n> ${message.split('\n').join('\n> ')}`;
|
|
43
|
+
});
|
|
44
|
+
return `## Comments on ${args.identifier} (${comments.length})\n\n${lines.join('\n\n')}`;
|
|
45
|
+
});
|
|
19
46
|
//# sourceMappingURL=comments.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"comments.js","sourceRoot":"","sources":["../../src/tools/comments.ts"],"names":[],"mappings":";;;;;;AAAA,qEAA4C;AAC5C,qEAA4C;AAC5C,8CAA6C;AAC7C,4CAAiD;
|
|
1
|
+
{"version":3,"file":"comments.js","sourceRoot":"","sources":["../../src/tools/comments.ts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mBAAU,EAAC,OAAO,CAAC,SAAS,CAAC,CAAA;QAC1C,MAAM,OAAO,GAAI,OAAO,CAAC,OAAkB,IAAI,EAAE,CAAA;QACjD,OAAO,KAAK,MAAM,QAAQ,IAAI,QAAQ,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAA;IAC1E,CAAC,CAAC,CAAA;IAEF,OAAO,kBAAkB,IAAI,CAAC,UAAU,KAAK,QAAQ,CAAC,MAAM,QAAQ,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAA;AAC1F,CAAC,CAAC,CAAA"}
|
|
@@ -30,3 +30,12 @@ export declare const createDocument: (args: {
|
|
|
30
30
|
text: string;
|
|
31
31
|
}>;
|
|
32
32
|
}>;
|
|
33
|
+
export declare const updateDocument: (args: {
|
|
34
|
+
documentId: string;
|
|
35
|
+
markdown: string;
|
|
36
|
+
}) => Promise<{
|
|
37
|
+
content: Array<{
|
|
38
|
+
type: "text";
|
|
39
|
+
text: string;
|
|
40
|
+
}>;
|
|
41
|
+
}>;
|