backlog-mcp-server 0.7.0 → 0.8.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 (86) hide show
  1. package/README.ja.md +89 -41
  2. package/README.md +102 -43
  3. package/package.json +15 -10
  4. package/build/backlog/backlogErrorHandler.js +0 -8
  5. package/build/backlog/customFields.js +0 -70
  6. package/build/backlog/parseBacklogAPIError.js +0 -38
  7. package/build/createTranslationHelper.js +0 -28
  8. package/build/handlers/builders/composeToolHandler.js +0 -26
  9. package/build/handlers/transformers/wrapWithErrorHandling.js +0 -4
  10. package/build/handlers/transformers/wrapWithFieldPicking.js +0 -55
  11. package/build/handlers/transformers/wrapWithTokenLimit.js +0 -21
  12. package/build/handlers/transformers/wrapWithToolResult.js +0 -39
  13. package/build/index.js +0 -101
  14. package/build/registerTools.js +0 -37
  15. package/build/tools/addDocument.js +0 -40
  16. package/build/tools/addIssue.js +0 -97
  17. package/build/tools/addIssueComment.js +0 -44
  18. package/build/tools/addProject.js +0 -39
  19. package/build/tools/addPullRequest.js +0 -65
  20. package/build/tools/addPullRequestComment.js +0 -52
  21. package/build/tools/addVersionMilestone.js +0 -51
  22. package/build/tools/addWatching.js +0 -25
  23. package/build/tools/addWiki.js +0 -29
  24. package/build/tools/countIssues.js +0 -105
  25. package/build/tools/deleteIssue.js +0 -29
  26. package/build/tools/deleteProject.js +0 -29
  27. package/build/tools/deleteVersion.js +0 -35
  28. package/build/tools/deleteWatching.js +0 -17
  29. package/build/tools/dynamicTools/toolsets.js +0 -103
  30. package/build/tools/getCategories.js +0 -30
  31. package/build/tools/getCustomFields.js +0 -37
  32. package/build/tools/getDocument.js +0 -20
  33. package/build/tools/getDocumentTree.js +0 -20
  34. package/build/tools/getDocuments.js +0 -25
  35. package/build/tools/getGitRepositories.js +0 -29
  36. package/build/tools/getGitRepository.js +0 -41
  37. package/build/tools/getIssue.js +0 -29
  38. package/build/tools/getIssueComments.js +0 -45
  39. package/build/tools/getIssueTypes.js +0 -30
  40. package/build/tools/getIssues.js +0 -149
  41. package/build/tools/getMyself.js +0 -14
  42. package/build/tools/getNotifications.js +0 -35
  43. package/build/tools/getNotificationsCount.js +0 -20
  44. package/build/tools/getPriorities.js +0 -13
  45. package/build/tools/getProject.js +0 -29
  46. package/build/tools/getProjectList.js +0 -23
  47. package/build/tools/getPullRequest.js +0 -44
  48. package/build/tools/getPullRequestComments.js +0 -60
  49. package/build/tools/getPullRequests.js +0 -65
  50. package/build/tools/getPullRequestsCount.js +0 -57
  51. package/build/tools/getResolutions.js +0 -13
  52. package/build/tools/getSpace.js +0 -14
  53. package/build/tools/getUsers.js +0 -14
  54. package/build/tools/getVersionMilestoneList.js +0 -37
  55. package/build/tools/getWatchingListCount.js +0 -17
  56. package/build/tools/getWatchingListItems.js +0 -17
  57. package/build/tools/getWiki.js +0 -21
  58. package/build/tools/getWikiPages.js +0 -37
  59. package/build/tools/getWikisCount.js +0 -29
  60. package/build/tools/markNotificationAsRead.js +0 -26
  61. package/build/tools/markWatchingAsRead.js +0 -26
  62. package/build/tools/resetUnreadNotificationCount.js +0 -13
  63. package/build/tools/shared/customFieldFiltersSchema.js +0 -78
  64. package/build/tools/tools.js +0 -163
  65. package/build/tools/updateIssue.js +0 -119
  66. package/build/tools/updateProject.js +0 -57
  67. package/build/tools/updatePullRequest.js +0 -68
  68. package/build/tools/updatePullRequestComment.js +0 -51
  69. package/build/tools/updateVersionMilestone.js +0 -57
  70. package/build/tools/updateWatching.js +0 -18
  71. package/build/tools/updateWiki.js +0 -37
  72. package/build/types/mcp.js +0 -1
  73. package/build/types/result.js +0 -3
  74. package/build/types/tool.js +0 -1
  75. package/build/types/toolsets.js +0 -1
  76. package/build/types/zod/backlogOutputDefinition.js +0 -468
  77. package/build/utils/generateFieldsDescription.js +0 -47
  78. package/build/utils/logger.js +0 -20
  79. package/build/utils/resolveIdOrKey.js +0 -25
  80. package/build/utils/runToolSafely.js +0 -18
  81. package/build/utils/tokenCounter.js +0 -11
  82. package/build/utils/toolRegistrar.js +0 -12
  83. package/build/utils/toolsetUtils.js +0 -48
  84. package/build/utils/wrapServerWithToolRegistry.js +0 -16
  85. package/build/version.js +0 -1
  86. package/build/version.template.js +0 -1
package/README.ja.md CHANGED
@@ -42,11 +42,14 @@ Backlog API とやり取りするための Model Context Protocol(MCP)サー
42
42
  "command": "docker",
43
43
  "args": [
44
44
  "run",
45
- "--pull", "always",
45
+ "--pull",
46
+ "always",
46
47
  "-i",
47
48
  "--rm",
48
- "-e", "BACKLOG_DOMAIN",
49
- "-e", "BACKLOG_API_KEY",
49
+ "-e",
50
+ "BACKLOG_DOMAIN",
51
+ "-e",
52
+ "BACKLOG_API_KEY",
50
53
  "ghcr.io/nulab/backlog-mcp-server"
51
54
  ],
52
55
  "env": {
@@ -79,9 +82,7 @@ docker pull ghcr.io/nulab/backlog-mcp-server:latest
79
82
  "mcpServers": {
80
83
  "backlog": {
81
84
  "command": "npx",
82
- "args": [
83
- "backlog-mcp-server"
84
- ],
85
+ "args": ["backlog-mcp-server"],
85
86
  "env": {
86
87
  "BACKLOG_DOMAIN": "your-domain.backlog.com",
87
88
  "BACKLOG_API_KEY": "your-api-key"
@@ -96,6 +97,7 @@ docker pull ghcr.io/nulab/backlog-mcp-server:latest
96
97
  ### オプション3: 手動セットアップ (Node.js)
97
98
 
98
99
  1. クローンしてインストール:
100
+
99
101
  ```bash
100
102
  git clone https://github.com/nulab/backlog-mcp-server.git
101
103
  cd backlog-mcp-server
@@ -103,23 +105,39 @@ docker pull ghcr.io/nulab/backlog-mcp-server:latest
103
105
  npm run build
104
106
  ```
105
107
 
106
- 2. MCPとして使用するJSONを設定します:
107
- ```json
108
- {
109
- "mcpServers": {
110
- "backlog": {
111
- "command": "node",
112
- "args": [
113
- "your-repository-location/build/index.js"
114
- ],
115
- "env": {
116
- "BACKLOG_DOMAIN": "your-domain.backlog.com",
117
- "BACKLOG_API_KEY": "your-api-key"
118
- }
108
+ 2. テンプレートから `.env` を作成し、必須の環境変数を設定します:
109
+
110
+ ```bash
111
+ cp .env.example .env
112
+ ```
113
+
114
+ `.env` に以下を設定してください:
115
+
116
+ - `BACKLOG_DOMAIN=your-domain.backlog.com`
117
+ - `BACKLOG_API_KEY=your-api-key`
118
+
119
+ 3. ローカルで起動します:
120
+
121
+ ```bash
122
+ npm run dev
123
+ ```
124
+
125
+ 4. MCPとして使用するJSONを設定します:
126
+
127
+ ```json
128
+ {
129
+ "mcpServers": {
130
+ "backlog": {
131
+ "command": "node",
132
+ "args": ["your-repository-location/build/index.js"],
133
+ "env": {
134
+ "BACKLOG_DOMAIN": "your-domain.backlog.com",
135
+ "BACKLOG_API_KEY": "your-api-key"
119
136
  }
120
137
  }
121
138
  }
122
- ```
139
+ }
140
+ ```
123
141
 
124
142
  ## ツール設定
125
143
 
@@ -129,15 +147,15 @@ docker pull ghcr.io/nulab/backlog-mcp-server:latest
129
147
 
130
148
  次のツールセットが利用可能です(`"all"` が使用されるとデフォルトで有効になります):
131
149
 
132
- | ツールセット | 説明 |
133
- |-----------------|--------------------------------------------------------------------------------------|
134
- | `space` | Backlogスペース設定と一般情報を管理するためのツール |
135
- | `project` | プロジェクト、カテゴリ、カスタムフィールド、課題タイプを管理するためのツール |
136
- | `issue` | 課題とそのコメント、発生バージョン/マイルストーンを管理するためのツール |
137
- | `wiki` | Wikiページを管理するためのツール |
138
- | `git` | Gitリポジトリとプルリクエストを管理するためのツール |
139
- | `notifications` | ユーザー通知を管理するためのツール |
140
- | `document` | ドキュメントおよびドキュメントツリーを参照するためのツール |
150
+ | ツールセット | 説明 |
151
+ | --------------- | ---------------------------------------------------------------------------- |
152
+ | `space` | Backlogスペース設定と一般情報を管理するためのツール |
153
+ | `project` | プロジェクト、カテゴリ、カスタムフィールド、課題タイプを管理するためのツール |
154
+ | `issue` | 課題とそのコメント、発生バージョン/マイルストーンを管理するためのツール |
155
+ | `wiki` | Wikiページを管理するためのツール |
156
+ | `git` | Gitリポジトリとプルリクエストを管理するためのツール |
157
+ | `notifications` | ユーザー通知を管理するためのツール |
158
+ | `document` | ドキュメントおよびドキュメントツリーを参照するためのツール |
141
159
 
142
160
  ### ツールセットの指定
143
161
 
@@ -190,29 +208,41 @@ CLI経由での有効化:
190
208
  MCPサーバーがAIエージェントで設定されると、会話で直接ツールを使用できます。以下にいくつかの例を示します:
191
209
 
192
210
  - プロジェクトの一覧表示
211
+
193
212
  ```
194
213
  私のBacklogプロジェクトをすべてリストアップしてください。
195
214
  ```
215
+
196
216
  - 新しい課題の作成
217
+
197
218
  ```
198
219
  PROJECT-KEYプロジェクトに「ログインページのエラーを修正」というタイトルの高優先度のバグ課題を作成してください。
199
220
  ```
221
+
200
222
  - プロジェクト詳細の取得
223
+
201
224
  ```
202
225
  PROJECT-KEYプロジェクトの詳細を表示してください。
203
226
  ```
227
+
204
228
  - Gitリポジトリの操作
229
+
205
230
  ```
206
231
  PROJECT-KEYプロジェクト内のすべてのGitリポジトリをリストアップしてください。
207
232
  ```
233
+
208
234
  - プルリクエストの管理
235
+
209
236
  ```
210
237
  PROJECT-KEYプロジェクトの「repo-name」リポジトリ内のすべてのオープンなプルリクエストを表示してください。
211
238
  ```
239
+
212
240
  ```
213
241
  PROJECT-KEYプロジェクトの「repo-name」リポジトリで、ブランチ「feature/new-feature」から「main」への新しいプルリクエストを作成してください。
214
242
  ```
243
+
215
244
  - ウォッチアイテム
245
+
216
246
  ```
217
247
  私がウォッチしているすべてのアイテムを表示してください。
218
248
  ```
@@ -248,9 +278,12 @@ PROJECT-KEYプロジェクトの「repo-name」リポジトリで、ブランチ
248
278
  "run",
249
279
  "-i",
250
280
  "--rm",
251
- "-e", "BACKLOG_DOMAIN",
252
- "-e", "BACKLOG_API_KEY",
253
- "-v", "/yourcurrentdir/.backlog-mcp-serverrc.json:/root/.backlog-mcp-serverrc.json:ro",
281
+ "-e",
282
+ "BACKLOG_DOMAIN",
283
+ "-e",
284
+ "BACKLOG_API_KEY",
285
+ "-v",
286
+ "/yourcurrentdir/.backlog-mcp-serverrc.json:/root/.backlog-mcp-serverrc.json:ro",
254
287
  "ghcr.io/nulab/backlog-mcp-server"
255
288
  ],
256
289
  "env": {
@@ -281,6 +314,7 @@ npx github:nulab/backlog-mcp-server --export-translations
281
314
  ```
282
315
 
283
316
  ### 日本語翻訳テンプレートの使用
317
+
284
318
  サンプルの日本語設定ファイルは次の場所に提供されています:
285
319
 
286
320
  ```bash
@@ -292,6 +326,7 @@ translationConfig/.backlog-mcp-serverrc.json.example
292
326
  その後、必要に応じてファイルを編集して説明をカスタマイズできます。
293
327
 
294
328
  ### 環境変数の使用
329
+
295
330
  または、環境変数を介してツールの説明をオーバーライドすることもできます。
296
331
 
297
332
  環境変数名は、ツールキーに基づいており、`BACKLOG_MCP_` がプレフィックスとして付き、大文字で記述されます。
@@ -308,9 +343,12 @@ translationConfig/.backlog-mcp-serverrc.json.example
308
343
  "run",
309
344
  "-i",
310
345
  "--rm",
311
- "-e", "BACKLOG_DOMAIN",
312
- "-e", "BACKLOG_API_KEY",
313
- "-e", "BACKLOG_MCP_TOOL_ADD_ISSUE_COMMENT_DESCRIPTION",
346
+ "-e",
347
+ "BACKLOG_DOMAIN",
348
+ "-e",
349
+ "BACKLOG_API_KEY",
350
+ "-e",
351
+ "BACKLOG_MCP_TOOL_ADD_ISSUE_COMMENT_DESCRIPTION",
314
352
  "ghcr.io/nulab/backlog-mcp-server"
315
353
  ],
316
354
  "env": {
@@ -372,6 +410,7 @@ get_project(projectIdOrKey: "PROJECT-KEY", fields: "{ name key description }")
372
410
  ```
373
411
 
374
412
  利点:
413
+
375
414
  - 必要なフィールドのみを要求することでレスポンスサイズを削減
376
415
  - 特定のデータポイントに焦点を当てる
377
416
  - 大規模なレスポンスのパフォーマンスを向上
@@ -379,6 +418,7 @@ get_project(projectIdOrKey: "PROJECT-KEY", fields: "{ name key description }")
379
418
  #### トークン制限
380
419
 
381
420
  大規模なレスポンスは、トークン制限を超えないように自動的に制限されます:
421
+
382
422
  - デフォルト制限:50,000トークン
383
423
  - `MAX_TOKENS` 環境変数で設定可能
384
424
  - 制限を超えるレスポンスはメッセージと共に切り捨てられます
@@ -390,6 +430,7 @@ MAX_TOKENS=10000
390
430
  ```
391
431
 
392
432
  レスポンスが制限を超えた場合、警告と共に切り捨てられます。
433
+
393
434
  > 注:これはベストエフォートの緩和策であり、保証された強制ではありません。
394
435
 
395
436
  ### 完全なカスタム設定例
@@ -405,12 +446,18 @@ MAX_TOKENS=10000
405
446
  "run",
406
447
  "-i",
407
448
  "--rm",
408
- "-e", "BACKLOG_DOMAIN",
409
- "-e", "BACKLOG_API_KEY",
410
- "-e", "MAX_TOKENS",
411
- "-e", "OPTIMIZE_RESPONSE",
412
- "-e", "PREFIX",
413
- "-e", "ENABLE_TOOLSETS",
449
+ "-e",
450
+ "BACKLOG_DOMAIN",
451
+ "-e",
452
+ "BACKLOG_API_KEY",
453
+ "-e",
454
+ "MAX_TOKENS",
455
+ "-e",
456
+ "OPTIMIZE_RESPONSE",
457
+ "-e",
458
+ "PREFIX",
459
+ "-e",
460
+ "ENABLE_TOOLSETS",
414
461
  "ghcr.io/nulab/backlog-mcp-server"
415
462
  ],
416
463
  "env": {
@@ -455,6 +502,7 @@ npm test
455
502
  利用可能なツールセット:`space`、`project`、`issue`、`wiki`、`git`、`notifications`。
456
503
 
457
504
  例:
505
+
458
506
  ```bash
459
507
  node build/index.js --optimize-response --max-tokens=100000 --prefix="backlog_" --enable-toolsets space,issue
460
508
  ```
package/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
  ![Build](https://github.com/nulab/backlog-mcp-server/actions/workflows/ci.yml/badge.svg)
5
5
  ![Last Commit](https://img.shields.io/github/last-commit/nulab/backlog-mcp-server.svg)
6
6
 
7
- [📘 日本語でのご利用ガイド](./README.ja.md)
7
+ [📘 日本語でのご利用ガイド](./README.ja.md)
8
8
 
9
9
  A Model Context Protocol (MCP) server for interacting with the Backlog API. This server provides tools for managing projects, issues, wiki pages, and more in Backlog through AI agents like Claude Desktop / Cline / Cursor etc.
10
10
 
@@ -42,11 +42,14 @@ The easiest way to use this MCP server is through MCP configurations:
42
42
  "command": "docker",
43
43
  "args": [
44
44
  "run",
45
- "--pull", "always",
45
+ "--pull",
46
+ "always",
46
47
  "-i",
47
48
  "--rm",
48
- "-e", "BACKLOG_DOMAIN",
49
- "-e", "BACKLOG_API_KEY",
49
+ "-e",
50
+ "BACKLOG_DOMAIN",
51
+ "-e",
52
+ "BACKLOG_API_KEY",
50
53
  "ghcr.io/nulab/backlog-mcp-server"
51
54
  ],
52
55
  "env": {
@@ -79,9 +82,7 @@ You can also run the server directly using `npx` without cloning the repository.
79
82
  "mcpServers": {
80
83
  "backlog": {
81
84
  "command": "npx",
82
- "args": [
83
- "backlog-mcp-server"
84
- ],
85
+ "args": ["backlog-mcp-server"],
85
86
  "env": {
86
87
  "BACKLOG_DOMAIN": "your-domain.backlog.com",
87
88
  "BACKLOG_API_KEY": "your-api-key"
@@ -96,6 +97,7 @@ Replace `your-domain.backlog.com` with your Backlog domain and `your-api-key` wi
96
97
  ### Option 3: Manual Setup (Node.js)
97
98
 
98
99
  1. Clone and install:
100
+
99
101
  ```bash
100
102
  git clone https://github.com/nulab/backlog-mcp-server.git
101
103
  cd backlog-mcp-server
@@ -103,23 +105,39 @@ Replace `your-domain.backlog.com` with your Backlog domain and `your-api-key` wi
103
105
  npm run build
104
106
  ```
105
107
 
106
- 2. Set your json to use as MCP
107
- ```json
108
- {
109
- "mcpServers": {
110
- "backlog": {
111
- "command": "node",
112
- "args": [
113
- "your-repository-location/build/index.js"
114
- ],
115
- "env": {
116
- "BACKLOG_DOMAIN": "your-domain.backlog.com",
117
- "BACKLOG_API_KEY": "your-api-key"
118
- }
108
+ 2. Create `.env` from template and set required variables:
109
+
110
+ ```bash
111
+ cp .env.example .env
112
+ ```
113
+
114
+ Set the following values in `.env`:
115
+
116
+ - `BACKLOG_DOMAIN=your-domain.backlog.com`
117
+ - `BACKLOG_API_KEY=your-api-key`
118
+
119
+ 3. Run locally:
120
+
121
+ ```bash
122
+ npm run dev
123
+ ```
124
+
125
+ 4. Set your json to use as MCP
126
+
127
+ ```json
128
+ {
129
+ "mcpServers": {
130
+ "backlog": {
131
+ "command": "node",
132
+ "args": ["your-repository-location/build/index.js"],
133
+ "env": {
134
+ "BACKLOG_DOMAIN": "your-domain.backlog.com",
135
+ "BACKLOG_API_KEY": "your-api-key"
119
136
  }
120
137
  }
121
138
  }
122
- ```
139
+ }
140
+ ```
123
141
 
124
142
  ## Tool Configuration
125
143
 
@@ -129,15 +147,15 @@ You can selectively enable or disable specific **toolsets** using the `--enable-
129
147
 
130
148
  The following toolsets are available (enabled by default when `"all"` is used):
131
149
 
132
- | Toolset | Description |
133
- |-----------------|--------------------------------------------------------------------------------------|
134
- | `space` | Tools for managing Backlog space settings and general information |
135
- | `project` | Tools for managing projects, categories, custom fields, and issue types |
136
- | `issue` | Tools for managing issues and their comments, version milestones |
137
- | `wiki` | Tools for managing wiki pages |
138
- | `git` | Tools for managing Git repositories and pull requests |
139
- | `notifications` | Tools for managing user notifications |
140
- | `document` | Tools for viewing documents and document trees |
150
+ | Toolset | Description |
151
+ | --------------- | ----------------------------------------------------------------------- |
152
+ | `space` | Tools for managing Backlog space settings and general information |
153
+ | `project` | Tools for managing projects, categories, custom fields, and issue types |
154
+ | `issue` | Tools for managing issues and their comments, version milestones |
155
+ | `wiki` | Tools for managing wiki pages |
156
+ | `git` | Tools for managing Git repositories and pull requests |
157
+ | `notifications` | Tools for managing user notifications |
158
+ | `document` | Tools for viewing documents and document trees |
141
159
 
142
160
  ### Specifying Toolsets
143
161
 
@@ -182,13 +200,17 @@ With dynamic toolsets enabled, the LLM will be able to list and activate toolset
182
200
  ## Available Tools
183
201
 
184
202
  ### Toolset: `space`
203
+
185
204
  Tools for managing Backlog space settings and general information.
205
+
186
206
  - `get_space`: Returns information about the Backlog space.
187
207
  - `get_users`: Returns list of users in the Backlog space.
188
208
  - `get_myself`: Returns information about the authenticated user.
189
209
 
190
210
  ### Toolset: `project`
211
+
191
212
  Tools for managing projects, categories, custom fields, and issue types.
213
+
192
214
  - `get_project_list`: Returns list of projects.
193
215
  - `add_project`: Creates a new project.
194
216
  - `get_project`: Returns information about a specific project.
@@ -196,7 +218,9 @@ Tools for managing projects, categories, custom fields, and issue types.
196
218
  - `delete_project`: Deletes a project.
197
219
 
198
220
  ### Toolset: `issue`
221
+
199
222
  Tools for managing issues, their comments, and related items like priorities, categories, custom fields, issue types, resolutions, and watching lists.
223
+
200
224
  - `get_issue`: Returns information about a specific issue.
201
225
  - `get_issues`: Returns list of issues.
202
226
  - `count_issues`: Returns count of issues.
@@ -222,14 +246,18 @@ Tools for managing issues, their comments, and related items like priorities, ca
222
246
  - `delete_version_milestone`: Deletes a version milestone.
223
247
 
224
248
  ### Toolset: `wiki`
249
+
225
250
  Tools for managing wiki pages.
251
+
226
252
  - `get_wiki_pages`: Returns list of Wiki pages.
227
253
  - `get_wikis_count`: Returns count of wiki pages in a project.
228
254
  - `get_wiki`: Returns information about a specific wiki page.
229
255
  - `add_wiki`: Creates a new wiki page.
230
256
 
231
257
  ### Toolset: `git`
258
+
232
259
  Tools for managing Git repositories and pull requests.
260
+
233
261
  - `get_git_repositories`: Returns list of Git repositories for a project.
234
262
  - `get_git_repository`: Returns information about a specific Git repository.
235
263
  - `get_pull_requests`: Returns list of pull requests for a repository.
@@ -242,14 +270,18 @@ Tools for managing Git repositories and pull requests.
242
270
  - `update_pull_request_comment`: Updates a comment on a pull request.
243
271
 
244
272
  ### Toolset: `notifications`
273
+
245
274
  Tools for managing user notifications.
275
+
246
276
  - `get_notifications`: Returns list of notifications.
247
277
  - `get_notifications_count`: Returns count of notifications.
248
278
  - `reset_unread_notification_count`: Resets unread notification count.
249
279
  - `mark_notification_as_read`: Marks a notification as read.
250
280
 
251
281
  ### Toolset: `document`
282
+
252
283
  Tools for managing documents and document trees in Backlog projects.
284
+
253
285
  - `get_document_tree`: Returns the hierarchical tree of documents for a project, including folders and ne
254
286
  - `get_documents`: Returns a flat list of documents in a project or folder.
255
287
  - `get_document`: Returns detailed information about a specific document, including metadata, content, an
@@ -259,31 +291,43 @@ Tools for managing documents and document trees in Backlog projects.
259
291
  Once the MCP server is configured in AI agents, you can use the tools directly in your conversations. Here are some examples:
260
292
 
261
293
  - Listing Projects
294
+
262
295
  ```
263
296
  Could you list all my Backlog projects?
264
297
  ```
298
+
265
299
  - Creating a New Issue
300
+
266
301
  ```
267
302
  Create a new bug issue in the PROJECT-KEY project with high priority titled "Fix login page error"
268
303
  ```
304
+
269
305
  - Getting Project Details
306
+
270
307
  ```
271
308
  Show me the details of the PROJECT-KEY project
272
309
  ```
310
+
273
311
  - Working with Git Repositories
312
+
274
313
  ```
275
314
  List all Git repositories in the PROJECT-KEY project
276
315
  ```
316
+
277
317
  - Managing Pull Requests
318
+
278
319
  ```
279
320
  Show me all open pull requests in the repository "repo-name" of PROJECT-KEY project
280
321
  ```
322
+
281
323
  ```
282
324
  Create a new pull request from branch "feature/new-feature" to "main" in the repository "repo-name" of PROJECT-KEY project
283
325
  ```
326
+
284
327
  - Watching Items
328
+
285
329
  ```
286
- Show me all items I'm watching
330
+ Show me all items I'm watching
287
331
  ```
288
332
 
289
333
  ### i18n / Overriding Descriptions
@@ -306,7 +350,7 @@ When the server starts, it determines the final description for each tool based
306
350
  2. Entries in `.backlog-mcp-serverrc.json` - Supported configuration file formats: .json, .yaml, .yml
307
351
  3. Built-in fallback values (English)
308
352
 
309
- Sample config:
353
+ Sample config:
310
354
 
311
355
  ```json
312
356
  {
@@ -317,9 +361,12 @@ Sample config:
317
361
  "run",
318
362
  "-i",
319
363
  "--rm",
320
- "-e", "BACKLOG_DOMAIN",
321
- "-e", "BACKLOG_API_KEY",
322
- "-v", "/yourcurrentdir/.backlog-mcp-serverrc.json:/root/.backlog-mcp-serverrc.json:ro",
364
+ "-e",
365
+ "BACKLOG_DOMAIN",
366
+ "-e",
367
+ "BACKLOG_API_KEY",
368
+ "-v",
369
+ "/yourcurrentdir/.backlog-mcp-serverrc.json:/root/.backlog-mcp-serverrc.json:ro",
323
370
  "ghcr.io/nulab/backlog-mcp-server"
324
371
  ],
325
372
  "env": {
@@ -343,13 +390,14 @@ Example:
343
390
  docker run -i --rm ghcr.io/nulab/backlog-mcp-server node build/index.js --export-translations
344
391
  ```
345
392
 
346
- or
393
+ or
347
394
 
348
395
  ```bash
349
396
  npx github:nulab/backlog-mcp-server --export-translations
350
397
  ```
351
398
 
352
399
  ### Using a Japanese Translation Template
400
+
353
401
  A sample Japanese configuration file is provided at:
354
402
 
355
403
  ```bash
@@ -361,9 +409,10 @@ To use it, copy it to your home directory as .backlog-mcp-serverrc.json:
361
409
  You can then edit the file to customize the descriptions as needed.
362
410
 
363
411
  ### Using Environment Variables
412
+
364
413
  Alternatively, you can override tool descriptions via environment variables.
365
414
 
366
- The environment variable names are based on the tool keys, prefixed with BACKLOG_MCP_ and written in uppercase.
415
+ The environment variable names are based on the tool keys, prefixed with BACKLOG*MCP* and written in uppercase.
367
416
 
368
417
  Example:
369
418
  To override the TOOL_ADD_ISSUE_COMMENT_DESCRIPTION:
@@ -441,6 +490,7 @@ get_project(projectIdOrKey: "PROJECT-KEY", fields: "{ name key description }")
441
490
  ```
442
491
 
443
492
  Benefits:
493
+
444
494
  - Reduce response size by requesting only needed fields
445
495
  - Focus on specific data points
446
496
  - Improve performance for large responses
@@ -448,6 +498,7 @@ Benefits:
448
498
  #### Token Limiting
449
499
 
450
500
  Large responses are automatically limited to prevent exceeding token limits:
501
+
451
502
  - Default limit: 50,000 tokens
452
503
  - Configurable via `MAX_TOKENS` environment variable
453
504
  - Responses exceeding the limit are truncated with a message
@@ -459,6 +510,7 @@ MAX_TOKENS=10000
459
510
  ```
460
511
 
461
512
  If a response exceeds the limit, it will be truncated with a warning.
513
+
462
514
  > Note: This is a best-effort mitigation, not a guaranteed enforcement.
463
515
 
464
516
  ### Full Custom Configuration Example
@@ -474,12 +526,18 @@ This section demonstrates advanced configuration using multiple environment vari
474
526
  "run",
475
527
  "-i",
476
528
  "--rm",
477
- "-e", "BACKLOG_DOMAIN",
478
- "-e", "BACKLOG_API_KEY",
479
- "-e", "MAX_TOKENS",
480
- "-e", "OPTIMIZE_RESPONSE",
481
- "-e", "PREFIX",
482
- "-e", "ENABLE_TOOLSETS",
529
+ "-e",
530
+ "BACKLOG_DOMAIN",
531
+ "-e",
532
+ "BACKLOG_API_KEY",
533
+ "-e",
534
+ "MAX_TOKENS",
535
+ "-e",
536
+ "OPTIMIZE_RESPONSE",
537
+ "-e",
538
+ "PREFIX",
539
+ "-e",
540
+ "ENABLE_TOOLSETS",
483
541
  "ghcr.io/nulab/backlog-mcp-server"
484
542
  ],
485
543
  "env": {
@@ -524,6 +582,7 @@ The server supports several command line options:
524
582
  Available toolsets: `space`, `project`, `issue`, `wiki`, `git`, `notifications`.
525
583
 
526
584
  Example:
585
+
527
586
  ```bash
528
587
  node build/index.js --optimize-response --max-tokens=100000 --prefix="backlog_" --enable-toolsets space,issue
529
588
  ```
package/package.json CHANGED
@@ -1,20 +1,27 @@
1
1
  {
2
2
  "name": "backlog-mcp-server",
3
- "version": "0.7.0",
3
+ "version": "0.8.0",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "backlog-mcp-server": "./build/index.js"
7
7
  },
8
8
  "license": "MIT",
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/nulab/backlog-mcp-server.git"
12
+ },
9
13
  "scripts": {
10
14
  "dev": "tsx src/index.ts",
11
15
  "build": "tsc && chmod 755 build/index.js",
12
- "test": "NODE_OPTIONS=--experimental-vm-modules jest",
13
- "test:coverage": "NODE_OPTIONS=--experimental-vm-modules jest --coverage",
16
+ "test": "vitest run",
17
+ "test:watch": "vitest",
18
+ "test:coverage": "vitest run --coverage",
14
19
  "lint": "eslint . --ext .ts",
15
20
  "lint:fix": "eslint . --ext .ts --fix",
16
21
  "format": "prettier --check \"**/*.{ts,tsx}\"",
17
- "format:fix": "prettier --write \"**/*.{ts,tsx}\""
22
+ "format:fix": "prettier --write \"**/*.{ts,tsx}\"",
23
+ "typecheck": "tsc --noEmit",
24
+ "typecheck:all": "tsc --noEmit --project tsconfig.test.json"
18
25
  },
19
26
  "files": [
20
27
  "build"
@@ -33,22 +40,20 @@
33
40
  },
34
41
  "devDependencies": {
35
42
  "@eslint/js": "^9.24.0",
36
- "tsx": "^4.20.6",
37
43
  "@release-it/conventional-changelog": "^10.0.2",
38
- "@types/jest": "^29.5.14",
39
44
  "@types/node": "^22.14.1",
40
45
  "@types/yargs": "^17.0.33",
41
46
  "@typescript-eslint/eslint-plugin": "^8.30.1",
42
47
  "@typescript-eslint/parser": "^8.30.1",
43
48
  "@typescript-eslint/utils": "^8.30.1",
49
+ "@vitest/coverage-v8": "^4.0.0",
44
50
  "eslint": "^9.24.0",
45
51
  "eslint-config-prettier": "^10.1.2",
46
52
  "eslint-plugin-prettier": "^5.2.6",
47
- "jest": "^29.7.0",
48
53
  "prettier": "^3.5.3",
49
54
  "release-it": "^19.0.0",
50
- "ts-jest": "^29.3.2",
51
- "ts-node": "^10.9.2",
52
- "typescript": "^5.8.3"
55
+ "tsx": "^4.20.6",
56
+ "typescript": "^5.8.3",
57
+ "vitest": "^4.0.0"
53
58
  }
54
59
  }
@@ -1,8 +0,0 @@
1
- import { parseBacklogAPIError } from './parseBacklogAPIError.js';
2
- export const backlogErrorHandler = (err) => {
3
- const parsed = parseBacklogAPIError(err);
4
- return {
5
- kind: 'error',
6
- message: parsed.message,
7
- };
8
- };