targetprocess-mcp-server 1.0.8 → 1.0.10
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 +23 -3
- package/build/config.js +1 -1
- package/build/index.js +29 -0
- package/build/tp.js +12 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -33,6 +33,28 @@ It acts as a **bridge between LLM agents and the Targetprocess API**, providing:
|
|
|
33
33
|
|
|
34
34
|
- search for a card with 'Text Element' title
|
|
35
35
|
|
|
36
|
+
---
|
|
37
|
+
## Available tools:
|
|
38
|
+
Releases
|
|
39
|
+
- `get_current_releases` — List all current releases (no params needed)
|
|
40
|
+
- `get_release_bugs` — Get bugs for a release (name, optional results)
|
|
41
|
+
- `get_release_features` — Get features for a release (name, optional results)
|
|
42
|
+
- `get_release_user_stories` — Get user stories for a release (name, optional results)
|
|
43
|
+
- `get_release_user_stories_with_description` — Same as above but includes full descriptions (name, withDescription)
|
|
44
|
+
- `get_release_open_bugs` — Get only active/open bugs for a release (name, withDescription, optional results)
|
|
45
|
+
- `get_release_open_user_stories` — Get only active/open user stories for a release (name, withDescription, optional results)
|
|
46
|
+
|
|
47
|
+
Cards — Read
|
|
48
|
+
- `get_bug_content` — Fetch full content of a bug by ID (id)
|
|
49
|
+
- `get_user_story_content` — Fetch full content of a user story by ID (id)
|
|
50
|
+
- `get_bug_comments` — Get comments on a bug (id, optional results)
|
|
51
|
+
- `get_user_story_comments` — Get comments on a user story (id, optional results)
|
|
52
|
+
- `search_all_cards_by_keyword` — Search bugs, stories, and features by keyword (keyword)
|
|
53
|
+
|
|
54
|
+
Cards — Write
|
|
55
|
+
- `add_comment` — Post a comment to any card (id, comment)
|
|
56
|
+
- `create_bug` — Create a new bug linked to a card (card object with id+type, title, bugContent)
|
|
57
|
+
- `create_test_plan` — Create a test plan linked to a user story (title, userStoryId)
|
|
36
58
|
---
|
|
37
59
|
|
|
38
60
|
## Installation
|
|
@@ -87,9 +109,7 @@ It acts as a **bridge between LLM agents and the Targetprocess API**, providing:
|
|
|
87
109
|
### Claude Code
|
|
88
110
|
```bash
|
|
89
111
|
claude mcp add tarteprocess -s user \
|
|
90
|
-
|
|
91
|
-
-- env TP_BASE_URL=<tp-api-endpoint> \
|
|
92
|
-
npx -y targetprocess-mcp-server
|
|
112
|
+
-e TP_TOKEN=<your-tp-token> -e TP_BASE_URL=<tp-api-endpoint> -- npx -y targetprocess-mcp-server
|
|
93
113
|
```
|
|
94
114
|
|
|
95
115
|
## Local Development
|
package/build/config.js
CHANGED
|
@@ -3,7 +3,7 @@ export const config = {
|
|
|
3
3
|
tp: {
|
|
4
4
|
url: process.env.TP_BASE_URL || "",
|
|
5
5
|
token: process.env.TP_TOKEN || "",
|
|
6
|
-
ownerId: process.env.TP_OWNER_ID || "",
|
|
6
|
+
ownerId: process.env.TP_OWNER_ID || "1504",
|
|
7
7
|
projectId: process.env.TP_PROJECT_ID || "",
|
|
8
8
|
teamId: process.env.TP_TEAM_ID || "",
|
|
9
9
|
}
|
package/build/index.js
CHANGED
|
@@ -632,6 +632,35 @@ server.registerTool('create_test_plan', {
|
|
|
632
632
|
}],
|
|
633
633
|
};
|
|
634
634
|
});
|
|
635
|
+
server.registerTool('get_logged_in_user', {
|
|
636
|
+
title: 'Get logged in user',
|
|
637
|
+
description: 'Get logged in user',
|
|
638
|
+
}, async () => {
|
|
639
|
+
const ctx = await tp.getContext();
|
|
640
|
+
if (!ctx) {
|
|
641
|
+
return {
|
|
642
|
+
content: [{
|
|
643
|
+
type: 'text',
|
|
644
|
+
text: `Failed to get context, JSON: ${JSON.stringify(ctx, null, 2)}`
|
|
645
|
+
}],
|
|
646
|
+
};
|
|
647
|
+
}
|
|
648
|
+
const loggedInUser = ctx.LoggedUser;
|
|
649
|
+
if (!loggedInUser) {
|
|
650
|
+
return {
|
|
651
|
+
content: [{
|
|
652
|
+
type: 'text',
|
|
653
|
+
text: `Failed to get logged in user in this context, JSON: ${JSON.stringify(ctx, null, 2)}`
|
|
654
|
+
}],
|
|
655
|
+
};
|
|
656
|
+
}
|
|
657
|
+
return {
|
|
658
|
+
content: [{
|
|
659
|
+
type: 'text',
|
|
660
|
+
text: JSON.stringify(loggedInUser)
|
|
661
|
+
}],
|
|
662
|
+
};
|
|
663
|
+
});
|
|
635
664
|
async function main() {
|
|
636
665
|
const transport = new StdioServerTransport();
|
|
637
666
|
await server.connect(transport);
|
package/build/tp.js
CHANGED
|
@@ -100,9 +100,6 @@ export class TpClient {
|
|
|
100
100
|
"Project": {
|
|
101
101
|
"Id": 59901
|
|
102
102
|
},
|
|
103
|
-
[card.type]: {
|
|
104
|
-
"Id": card.id
|
|
105
|
-
},
|
|
106
103
|
"customFields": [{
|
|
107
104
|
"name": "Origin",
|
|
108
105
|
"type": "DropDown",
|
|
@@ -115,6 +112,11 @@ export class TpClient {
|
|
|
115
112
|
}],
|
|
116
113
|
"Description": bugContent,
|
|
117
114
|
};
|
|
115
|
+
if (card.type === "UserStory") {
|
|
116
|
+
bug["UserStory"] = {
|
|
117
|
+
"Id": card.id
|
|
118
|
+
};
|
|
119
|
+
}
|
|
118
120
|
return this.post({
|
|
119
121
|
pathParam: { "bugs": '' },
|
|
120
122
|
param: { "format": "json" },
|
|
@@ -177,7 +179,7 @@ export class TpClient {
|
|
|
177
179
|
const commentData = {
|
|
178
180
|
description: comment,
|
|
179
181
|
owner: {
|
|
180
|
-
id:
|
|
182
|
+
id: config.tp.ownerId
|
|
181
183
|
},
|
|
182
184
|
general: {
|
|
183
185
|
id: userStoryId,
|
|
@@ -294,4 +296,10 @@ export class TpClient {
|
|
|
294
296
|
}
|
|
295
297
|
});
|
|
296
298
|
}
|
|
299
|
+
async getContext() {
|
|
300
|
+
return this.get({
|
|
301
|
+
pathParam: { "Context": '' },
|
|
302
|
+
param: { "format": "json", }
|
|
303
|
+
});
|
|
304
|
+
}
|
|
297
305
|
}
|