@benglo/storu-mcp 1.0.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/dist/api-client.d.ts +82 -0
- package/dist/api-client.d.ts.map +1 -0
- package/dist/api-client.js +97 -0
- package/dist/api-client.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +143 -0
- package/dist/index.js.map +1 -0
- package/dist/tools.d.ts +11 -0
- package/dist/tools.d.ts.map +1 -0
- package/dist/tools.js +300 -0
- package/dist/tools.js.map +1 -0
- package/package.json +37 -0
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
export interface ApiResponse<T> {
|
|
2
|
+
success: boolean;
|
|
3
|
+
data?: T;
|
|
4
|
+
error?: string;
|
|
5
|
+
meta?: {
|
|
6
|
+
total: number;
|
|
7
|
+
page: number;
|
|
8
|
+
limit: number;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
export interface ListAppsFilters {
|
|
12
|
+
}
|
|
13
|
+
export interface ListEpicsFilters {
|
|
14
|
+
app_id?: string;
|
|
15
|
+
status?: string;
|
|
16
|
+
}
|
|
17
|
+
export interface ListStoriesFilters {
|
|
18
|
+
app_id?: string;
|
|
19
|
+
epic_id?: string;
|
|
20
|
+
status?: string;
|
|
21
|
+
assignee_id?: string;
|
|
22
|
+
label_id?: string;
|
|
23
|
+
priority?: string;
|
|
24
|
+
no_epic?: boolean;
|
|
25
|
+
sort?: string;
|
|
26
|
+
page?: number;
|
|
27
|
+
limit?: number;
|
|
28
|
+
}
|
|
29
|
+
export interface CreateEpicData {
|
|
30
|
+
application_id: string;
|
|
31
|
+
title: string;
|
|
32
|
+
description?: string;
|
|
33
|
+
status?: string;
|
|
34
|
+
sort_order?: number;
|
|
35
|
+
}
|
|
36
|
+
export interface CreateStoryData {
|
|
37
|
+
application_id: string;
|
|
38
|
+
epic_id?: string;
|
|
39
|
+
title: string;
|
|
40
|
+
description?: string;
|
|
41
|
+
acceptance_criteria?: string[];
|
|
42
|
+
status?: string;
|
|
43
|
+
priority?: string;
|
|
44
|
+
assignee_id?: string;
|
|
45
|
+
sort_order?: number;
|
|
46
|
+
label_ids?: string[];
|
|
47
|
+
}
|
|
48
|
+
export interface UpdateStoryData {
|
|
49
|
+
version: number;
|
|
50
|
+
title?: string;
|
|
51
|
+
description?: string;
|
|
52
|
+
acceptance_criteria?: string[];
|
|
53
|
+
status?: string;
|
|
54
|
+
priority?: string;
|
|
55
|
+
assignee_id?: string;
|
|
56
|
+
epic_id?: string | null;
|
|
57
|
+
sort_order?: number;
|
|
58
|
+
label_ids?: string[];
|
|
59
|
+
}
|
|
60
|
+
export interface CreateReleaseData {
|
|
61
|
+
application_id: string;
|
|
62
|
+
title: string;
|
|
63
|
+
description?: string;
|
|
64
|
+
story_ids?: string[];
|
|
65
|
+
}
|
|
66
|
+
export declare class StoruApiClient {
|
|
67
|
+
private readonly baseUrl;
|
|
68
|
+
private readonly apiKey;
|
|
69
|
+
constructor(baseUrl: string, apiKey: string);
|
|
70
|
+
private request;
|
|
71
|
+
listApps(): Promise<ApiResponse<unknown[]>>;
|
|
72
|
+
listEpics(filters?: ListEpicsFilters): Promise<ApiResponse<unknown[]>>;
|
|
73
|
+
listStories(filters?: ListStoriesFilters): Promise<ApiResponse<unknown[]>>;
|
|
74
|
+
getStory(id: string): Promise<ApiResponse<unknown>>;
|
|
75
|
+
createEpic(data: CreateEpicData): Promise<ApiResponse<unknown>>;
|
|
76
|
+
createStory(data: CreateStoryData): Promise<ApiResponse<unknown>>;
|
|
77
|
+
updateStory(id: string, data: UpdateStoryData): Promise<ApiResponse<unknown>>;
|
|
78
|
+
batchStories(stories: CreateStoryData[]): Promise<ApiResponse<unknown[]>>;
|
|
79
|
+
createRelease(data: CreateReleaseData): Promise<ApiResponse<unknown>>;
|
|
80
|
+
publishRelease(id: string): Promise<ApiResponse<unknown>>;
|
|
81
|
+
}
|
|
82
|
+
//# sourceMappingURL=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AC,WAAW,CAAC,OAAO,EAAE,CAAC,CAAC;IAgB9E,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;IAInD,UAAU,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;IAO/D,WAAW,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;IAOjE,WAAW,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;IAO7E,YAAY,CAAC,OAAO,EAAE,eAAe,EAAE,GAAG,OAAO,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC,CAAC;IAOzE,aAAa,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;IAOrE,cAAc,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;CAKhE"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
export class StoruApiClient {
|
|
2
|
+
baseUrl;
|
|
3
|
+
apiKey;
|
|
4
|
+
constructor(baseUrl, apiKey) {
|
|
5
|
+
this.baseUrl = baseUrl.replace(/\/$/, "");
|
|
6
|
+
this.apiKey = apiKey;
|
|
7
|
+
}
|
|
8
|
+
async request(path, options = {}) {
|
|
9
|
+
const url = `${this.baseUrl}${path}`;
|
|
10
|
+
const response = await fetch(url, {
|
|
11
|
+
...options,
|
|
12
|
+
headers: {
|
|
13
|
+
"Content-Type": "application/json",
|
|
14
|
+
"X-API-Key": this.apiKey,
|
|
15
|
+
...(options.headers ?? {}),
|
|
16
|
+
},
|
|
17
|
+
});
|
|
18
|
+
const json = (await response.json());
|
|
19
|
+
return json;
|
|
20
|
+
}
|
|
21
|
+
async listApps() {
|
|
22
|
+
return this.request("/api/apps");
|
|
23
|
+
}
|
|
24
|
+
async listEpics(filters = {}) {
|
|
25
|
+
const params = new URLSearchParams();
|
|
26
|
+
if (filters.app_id)
|
|
27
|
+
params.set("app_id", filters.app_id);
|
|
28
|
+
if (filters.status)
|
|
29
|
+
params.set("status", filters.status);
|
|
30
|
+
const query = params.toString() ? `?${params.toString()}` : "";
|
|
31
|
+
return this.request(`/api/epics${query}`);
|
|
32
|
+
}
|
|
33
|
+
async listStories(filters = {}) {
|
|
34
|
+
const params = new URLSearchParams();
|
|
35
|
+
if (filters.app_id)
|
|
36
|
+
params.set("app_id", filters.app_id);
|
|
37
|
+
if (filters.epic_id)
|
|
38
|
+
params.set("epic_id", filters.epic_id);
|
|
39
|
+
if (filters.status)
|
|
40
|
+
params.set("status", filters.status);
|
|
41
|
+
if (filters.assignee_id)
|
|
42
|
+
params.set("assignee_id", filters.assignee_id);
|
|
43
|
+
if (filters.label_id)
|
|
44
|
+
params.set("label_id", filters.label_id);
|
|
45
|
+
if (filters.priority)
|
|
46
|
+
params.set("priority", filters.priority);
|
|
47
|
+
if (filters.no_epic)
|
|
48
|
+
params.set("no_epic", "true");
|
|
49
|
+
if (filters.sort)
|
|
50
|
+
params.set("sort", filters.sort);
|
|
51
|
+
if (filters.page !== undefined)
|
|
52
|
+
params.set("page", String(filters.page));
|
|
53
|
+
if (filters.limit !== undefined)
|
|
54
|
+
params.set("limit", String(filters.limit));
|
|
55
|
+
const query = params.toString() ? `?${params.toString()}` : "";
|
|
56
|
+
return this.request(`/api/stories${query}`);
|
|
57
|
+
}
|
|
58
|
+
async getStory(id) {
|
|
59
|
+
return this.request(`/api/stories/${id}`);
|
|
60
|
+
}
|
|
61
|
+
async createEpic(data) {
|
|
62
|
+
return this.request("/api/epics", {
|
|
63
|
+
method: "POST",
|
|
64
|
+
body: JSON.stringify(data),
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
async createStory(data) {
|
|
68
|
+
return this.request("/api/stories", {
|
|
69
|
+
method: "POST",
|
|
70
|
+
body: JSON.stringify(data),
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
async updateStory(id, data) {
|
|
74
|
+
return this.request(`/api/stories/${id}`, {
|
|
75
|
+
method: "PATCH",
|
|
76
|
+
body: JSON.stringify(data),
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
async batchStories(stories) {
|
|
80
|
+
return this.request("/api/stories/batch", {
|
|
81
|
+
method: "POST",
|
|
82
|
+
body: JSON.stringify({ stories }),
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
async createRelease(data) {
|
|
86
|
+
return this.request("/api/releases", {
|
|
87
|
+
method: "POST",
|
|
88
|
+
body: JSON.stringify(data),
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
async publishRelease(id) {
|
|
92
|
+
return this.request(`/api/releases/${id}/publish`, {
|
|
93
|
+
method: "POST",
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
//# sourceMappingURL=api-client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api-client.js","sourceRoot":"","sources":["../src/api-client.ts"],"names":[],"mappings":"AA0EA,MAAM,OAAO,cAAc;IACR,OAAO,CAAS;IAChB,MAAM,CAAS;IAEhC,YAAY,OAAe,EAAE,MAAc;QACzC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QAC1C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAEO,KAAK,CAAC,OAAO,CACnB,IAAY,EACZ,UAAuB,EAAE;QAEzB,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC,OAAO,GAAG,IAAI,EAAE,CAAC;QACrC,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,EAAE;YAChC,GAAG,OAAO;YACV,OAAO,EAAE;gBACP,cAAc,EAAE,kBAAkB;gBAClC,WAAW,EAAE,IAAI,CAAC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;SAC3B,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,IAAqB;QACrC,OAAO,IAAI,CAAC,OAAO,CAAU,cAAc,EAAE;YAC3C,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;SAC3B,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,EAAU,EAAE,IAAqB;QACjD,OAAO,IAAI,CAAC,OAAO,CAAU,gBAAgB,EAAE,EAAE,EAAE;YACjD,MAAM,EAAE,OAAO;YACf,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;SAC3B,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,YAAY,CAAC,OAA0B;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAY,oBAAoB,EAAE;YACnD,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,CAAC;SAClC,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,aAAa,CAAC,IAAuB;QACzC,OAAO,IAAI,CAAC,OAAO,CAAU,eAAe,EAAE;YAC5C,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;SAC3B,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,cAAc,CAAC,EAAU;QAC7B,OAAO,IAAI,CAAC,OAAO,CAAU,iBAAiB,EAAE,UAAU,EAAE;YAC1D,MAAM,EAAE,MAAM;SACf,CAAC,CAAC;IACL,CAAC;CACF"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
2
|
+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
3
|
+
import { ListToolsRequestSchema, CallToolRequestSchema, } from "@modelcontextprotocol/sdk/types.js";
|
|
4
|
+
import { StoruApiClient } from "./api-client.js";
|
|
5
|
+
import { tools } from "./tools.js";
|
|
6
|
+
const apiUrl = process.env.STORU_API_URL;
|
|
7
|
+
const apiKey = process.env.STORU_API_KEY;
|
|
8
|
+
if (!apiUrl) {
|
|
9
|
+
process.stderr.write("Error: STORU_API_URL environment variable is required\n");
|
|
10
|
+
process.exit(1);
|
|
11
|
+
}
|
|
12
|
+
if (!apiKey) {
|
|
13
|
+
process.stderr.write("Error: STORU_API_KEY environment variable is required\n");
|
|
14
|
+
process.exit(1);
|
|
15
|
+
}
|
|
16
|
+
const client = new StoruApiClient(apiUrl, apiKey);
|
|
17
|
+
const server = new Server({
|
|
18
|
+
name: "storu",
|
|
19
|
+
version: "1.0.0",
|
|
20
|
+
}, {
|
|
21
|
+
capabilities: {
|
|
22
|
+
tools: {},
|
|
23
|
+
},
|
|
24
|
+
});
|
|
25
|
+
server.setRequestHandler(ListToolsRequestSchema, () => {
|
|
26
|
+
return { tools };
|
|
27
|
+
});
|
|
28
|
+
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
29
|
+
const { name, arguments: args } = request.params;
|
|
30
|
+
const input = (args ?? {});
|
|
31
|
+
try {
|
|
32
|
+
let result;
|
|
33
|
+
switch (name) {
|
|
34
|
+
case "storu_list_apps": {
|
|
35
|
+
result = await client.listApps();
|
|
36
|
+
break;
|
|
37
|
+
}
|
|
38
|
+
case "storu_list_epics": {
|
|
39
|
+
result = await client.listEpics({
|
|
40
|
+
app_id: input.app_id,
|
|
41
|
+
status: input.status,
|
|
42
|
+
});
|
|
43
|
+
break;
|
|
44
|
+
}
|
|
45
|
+
case "storu_list_stories": {
|
|
46
|
+
result = await client.listStories({
|
|
47
|
+
app_id: input.app_id,
|
|
48
|
+
epic_id: input.epic_id,
|
|
49
|
+
status: input.status,
|
|
50
|
+
assignee_id: input.assignee_id,
|
|
51
|
+
label_id: input.label_id,
|
|
52
|
+
priority: input.priority,
|
|
53
|
+
no_epic: input.no_epic,
|
|
54
|
+
sort: input.sort,
|
|
55
|
+
page: input.page,
|
|
56
|
+
limit: input.limit,
|
|
57
|
+
});
|
|
58
|
+
break;
|
|
59
|
+
}
|
|
60
|
+
case "storu_get_story": {
|
|
61
|
+
const id = input.id;
|
|
62
|
+
result = await client.getStory(id);
|
|
63
|
+
break;
|
|
64
|
+
}
|
|
65
|
+
case "storu_create_epic": {
|
|
66
|
+
result = await client.createEpic({
|
|
67
|
+
application_id: input.application_id,
|
|
68
|
+
title: input.title,
|
|
69
|
+
description: input.description,
|
|
70
|
+
status: input.status,
|
|
71
|
+
sort_order: input.sort_order,
|
|
72
|
+
});
|
|
73
|
+
break;
|
|
74
|
+
}
|
|
75
|
+
case "storu_create_story": {
|
|
76
|
+
result = await client.createStory({
|
|
77
|
+
application_id: input.application_id,
|
|
78
|
+
title: input.title,
|
|
79
|
+
epic_id: input.epic_id,
|
|
80
|
+
description: input.description,
|
|
81
|
+
acceptance_criteria: input.acceptance_criteria,
|
|
82
|
+
status: input.status,
|
|
83
|
+
priority: input.priority,
|
|
84
|
+
assignee_id: input.assignee_id,
|
|
85
|
+
label_ids: input.label_ids,
|
|
86
|
+
});
|
|
87
|
+
break;
|
|
88
|
+
}
|
|
89
|
+
case "storu_update_story": {
|
|
90
|
+
const id = input.id;
|
|
91
|
+
result = await client.updateStory(id, {
|
|
92
|
+
version: input.version,
|
|
93
|
+
title: input.title,
|
|
94
|
+
description: input.description,
|
|
95
|
+
acceptance_criteria: input.acceptance_criteria,
|
|
96
|
+
status: input.status,
|
|
97
|
+
priority: input.priority,
|
|
98
|
+
assignee_id: input.assignee_id,
|
|
99
|
+
epic_id: input.epic_id,
|
|
100
|
+
label_ids: input.label_ids,
|
|
101
|
+
});
|
|
102
|
+
break;
|
|
103
|
+
}
|
|
104
|
+
case "storu_batch_stories": {
|
|
105
|
+
const stories = input.stories;
|
|
106
|
+
result = await client.batchStories(stories);
|
|
107
|
+
break;
|
|
108
|
+
}
|
|
109
|
+
case "storu_create_release": {
|
|
110
|
+
result = await client.createRelease({
|
|
111
|
+
application_id: input.application_id,
|
|
112
|
+
title: input.title,
|
|
113
|
+
description: input.description,
|
|
114
|
+
story_ids: input.story_ids,
|
|
115
|
+
});
|
|
116
|
+
break;
|
|
117
|
+
}
|
|
118
|
+
case "storu_publish_release": {
|
|
119
|
+
const id = input.id;
|
|
120
|
+
result = await client.publishRelease(id);
|
|
121
|
+
break;
|
|
122
|
+
}
|
|
123
|
+
default:
|
|
124
|
+
return {
|
|
125
|
+
content: [{ type: "text", text: `Unknown tool: ${name}` }],
|
|
126
|
+
isError: true,
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
return {
|
|
130
|
+
content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
catch (err) {
|
|
134
|
+
const message = err instanceof Error ? err.message : "Unknown error";
|
|
135
|
+
return {
|
|
136
|
+
content: [{ type: "text", text: `Error: ${message}` }],
|
|
137
|
+
isError: true,
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
const transport = new StdioServerTransport();
|
|
142
|
+
await server.connect(transport);
|
|
143
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EACL,sBAAsB,EACtB,qBAAqB,GACtB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAEnC,M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|
+
export interface ToolDefinition {
|
|
2
|
+
name: string;
|
|
3
|
+
description: string;
|
|
4
|
+
inputSchema: {
|
|
5
|
+
type: "object";
|
|
6
|
+
properties: Record<string, unknown>;
|
|
7
|
+
required?: string[];
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
export declare const tools: ToolDefinition[];
|
|
11
|
+
//# sourceMappingURL=tools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ,CAAC;QACf,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QACpC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;KACrB,CAAC;CACH;AAED,eAAO,MAAM,KAAK,EAAE,cAAc,EA6SjC,CAAC"}
|
package/dist/tools.js
ADDED
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
export const tools = [
|
|
2
|
+
{
|
|
3
|
+
name: "storu_list_apps",
|
|
4
|
+
description: "List all applications in Storu.",
|
|
5
|
+
inputSchema: {
|
|
6
|
+
type: "object",
|
|
7
|
+
properties: {},
|
|
8
|
+
},
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
name: "storu_list_epics",
|
|
12
|
+
description: "List epics, optionally filtered by application or status.",
|
|
13
|
+
inputSchema: {
|
|
14
|
+
type: "object",
|
|
15
|
+
properties: {
|
|
16
|
+
app_id: {
|
|
17
|
+
type: "string",
|
|
18
|
+
description: "Filter by application UUID",
|
|
19
|
+
},
|
|
20
|
+
status: {
|
|
21
|
+
type: "string",
|
|
22
|
+
enum: ["backlog", "in_progress", "done"],
|
|
23
|
+
description: "Filter by epic status",
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: "storu_list_stories",
|
|
30
|
+
description: "List stories with optional filters for app, epic, status, assignee, label, and priority.",
|
|
31
|
+
inputSchema: {
|
|
32
|
+
type: "object",
|
|
33
|
+
properties: {
|
|
34
|
+
app_id: {
|
|
35
|
+
type: "string",
|
|
36
|
+
description: "Filter by application UUID",
|
|
37
|
+
},
|
|
38
|
+
epic_id: {
|
|
39
|
+
type: "string",
|
|
40
|
+
description: "Filter by epic UUID",
|
|
41
|
+
},
|
|
42
|
+
status: {
|
|
43
|
+
type: "string",
|
|
44
|
+
enum: ["backlog", "in_progress", "in_review", "done"],
|
|
45
|
+
description: "Filter by story status",
|
|
46
|
+
},
|
|
47
|
+
assignee_id: {
|
|
48
|
+
type: "string",
|
|
49
|
+
description: "Filter by assignee profile UUID",
|
|
50
|
+
},
|
|
51
|
+
label_id: {
|
|
52
|
+
type: "string",
|
|
53
|
+
description: "Filter by label UUID",
|
|
54
|
+
},
|
|
55
|
+
priority: {
|
|
56
|
+
type: "string",
|
|
57
|
+
enum: ["low", "medium", "high", "critical"],
|
|
58
|
+
description: "Filter by priority",
|
|
59
|
+
},
|
|
60
|
+
no_epic: {
|
|
61
|
+
type: "boolean",
|
|
62
|
+
description: "When true, return only stories with no epic",
|
|
63
|
+
},
|
|
64
|
+
sort: {
|
|
65
|
+
type: "string",
|
|
66
|
+
enum: ["sort_order", "created_at", "updated_at", "priority"],
|
|
67
|
+
description: "Sort field",
|
|
68
|
+
},
|
|
69
|
+
page: {
|
|
70
|
+
type: "number",
|
|
71
|
+
description: "Page number (1-based)",
|
|
72
|
+
},
|
|
73
|
+
limit: {
|
|
74
|
+
type: "number",
|
|
75
|
+
description: "Number of results per page (max 100)",
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
name: "storu_get_story",
|
|
82
|
+
description: "Get full details for a single story including labels and activity log.",
|
|
83
|
+
inputSchema: {
|
|
84
|
+
type: "object",
|
|
85
|
+
properties: {
|
|
86
|
+
id: {
|
|
87
|
+
type: "string",
|
|
88
|
+
description: "Story UUID",
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
required: ["id"],
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
name: "storu_create_epic",
|
|
96
|
+
description: "Create a new epic in an application.",
|
|
97
|
+
inputSchema: {
|
|
98
|
+
type: "object",
|
|
99
|
+
properties: {
|
|
100
|
+
application_id: {
|
|
101
|
+
type: "string",
|
|
102
|
+
description: "Application UUID",
|
|
103
|
+
},
|
|
104
|
+
title: {
|
|
105
|
+
type: "string",
|
|
106
|
+
description: "Epic title",
|
|
107
|
+
},
|
|
108
|
+
description: {
|
|
109
|
+
type: "string",
|
|
110
|
+
description: "Epic description",
|
|
111
|
+
},
|
|
112
|
+
status: {
|
|
113
|
+
type: "string",
|
|
114
|
+
enum: ["backlog", "in_progress", "done"],
|
|
115
|
+
description: "Initial status (defaults to backlog)",
|
|
116
|
+
},
|
|
117
|
+
sort_order: {
|
|
118
|
+
type: "number",
|
|
119
|
+
description: "Sort position",
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
required: ["application_id", "title"],
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
name: "storu_create_story",
|
|
127
|
+
description: "Create a new story in an application.",
|
|
128
|
+
inputSchema: {
|
|
129
|
+
type: "object",
|
|
130
|
+
properties: {
|
|
131
|
+
application_id: {
|
|
132
|
+
type: "string",
|
|
133
|
+
description: "Application UUID",
|
|
134
|
+
},
|
|
135
|
+
title: {
|
|
136
|
+
type: "string",
|
|
137
|
+
description: "Story title",
|
|
138
|
+
},
|
|
139
|
+
epic_id: {
|
|
140
|
+
type: "string",
|
|
141
|
+
description: "Parent epic UUID (optional)",
|
|
142
|
+
},
|
|
143
|
+
description: {
|
|
144
|
+
type: "string",
|
|
145
|
+
description: "Story description",
|
|
146
|
+
},
|
|
147
|
+
acceptance_criteria: {
|
|
148
|
+
type: "array",
|
|
149
|
+
items: { type: "string" },
|
|
150
|
+
description: "List of acceptance criteria",
|
|
151
|
+
},
|
|
152
|
+
status: {
|
|
153
|
+
type: "string",
|
|
154
|
+
enum: ["backlog", "in_progress", "in_review", "done"],
|
|
155
|
+
description: "Initial status (defaults to backlog)",
|
|
156
|
+
},
|
|
157
|
+
priority: {
|
|
158
|
+
type: "string",
|
|
159
|
+
enum: ["low", "medium", "high", "critical"],
|
|
160
|
+
description: "Story priority (defaults to medium)",
|
|
161
|
+
},
|
|
162
|
+
assignee_id: {
|
|
163
|
+
type: "string",
|
|
164
|
+
description: "Assignee profile UUID (optional)",
|
|
165
|
+
},
|
|
166
|
+
label_ids: {
|
|
167
|
+
type: "array",
|
|
168
|
+
items: { type: "string" },
|
|
169
|
+
description: "Label UUIDs to attach",
|
|
170
|
+
},
|
|
171
|
+
},
|
|
172
|
+
required: ["application_id", "title"],
|
|
173
|
+
},
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
name: "storu_update_story",
|
|
177
|
+
description: "Update an existing story. Requires the current version number for optimistic concurrency.",
|
|
178
|
+
inputSchema: {
|
|
179
|
+
type: "object",
|
|
180
|
+
properties: {
|
|
181
|
+
id: {
|
|
182
|
+
type: "string",
|
|
183
|
+
description: "Story UUID",
|
|
184
|
+
},
|
|
185
|
+
version: {
|
|
186
|
+
type: "number",
|
|
187
|
+
description: "Current story version (for optimistic locking)",
|
|
188
|
+
},
|
|
189
|
+
title: {
|
|
190
|
+
type: "string",
|
|
191
|
+
description: "New title",
|
|
192
|
+
},
|
|
193
|
+
description: {
|
|
194
|
+
type: "string",
|
|
195
|
+
description: "New description",
|
|
196
|
+
},
|
|
197
|
+
acceptance_criteria: {
|
|
198
|
+
type: "array",
|
|
199
|
+
items: { type: "string" },
|
|
200
|
+
description: "New acceptance criteria list",
|
|
201
|
+
},
|
|
202
|
+
status: {
|
|
203
|
+
type: "string",
|
|
204
|
+
enum: ["backlog", "in_progress", "in_review", "done"],
|
|
205
|
+
description: "New status (must follow valid transitions)",
|
|
206
|
+
},
|
|
207
|
+
priority: {
|
|
208
|
+
type: "string",
|
|
209
|
+
enum: ["low", "medium", "high", "critical"],
|
|
210
|
+
description: "New priority",
|
|
211
|
+
},
|
|
212
|
+
assignee_id: {
|
|
213
|
+
type: "string",
|
|
214
|
+
description: "New assignee profile UUID",
|
|
215
|
+
},
|
|
216
|
+
epic_id: {
|
|
217
|
+
type: "string",
|
|
218
|
+
description: "New epic UUID (or null to remove)",
|
|
219
|
+
},
|
|
220
|
+
label_ids: {
|
|
221
|
+
type: "array",
|
|
222
|
+
items: { type: "string" },
|
|
223
|
+
description: "Replacement label UUIDs",
|
|
224
|
+
},
|
|
225
|
+
},
|
|
226
|
+
required: ["id", "version"],
|
|
227
|
+
},
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
name: "storu_batch_stories",
|
|
231
|
+
description: "Create multiple stories at once (up to 50). Requires stories:write scope.",
|
|
232
|
+
inputSchema: {
|
|
233
|
+
type: "object",
|
|
234
|
+
properties: {
|
|
235
|
+
stories: {
|
|
236
|
+
type: "array",
|
|
237
|
+
items: {
|
|
238
|
+
type: "object",
|
|
239
|
+
properties: {
|
|
240
|
+
application_id: { type: "string", description: "Application UUID" },
|
|
241
|
+
title: { type: "string", description: "Story title" },
|
|
242
|
+
epic_id: { type: "string", description: "Parent epic UUID" },
|
|
243
|
+
description: { type: "string" },
|
|
244
|
+
status: { type: "string" },
|
|
245
|
+
priority: { type: "string" },
|
|
246
|
+
assignee_id: { type: "string" },
|
|
247
|
+
},
|
|
248
|
+
required: ["application_id", "title"],
|
|
249
|
+
},
|
|
250
|
+
minItems: 1,
|
|
251
|
+
maxItems: 50,
|
|
252
|
+
description: "Array of story objects to create",
|
|
253
|
+
},
|
|
254
|
+
},
|
|
255
|
+
required: ["stories"],
|
|
256
|
+
},
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
name: "storu_create_release",
|
|
260
|
+
description: "Create a new release for an application.",
|
|
261
|
+
inputSchema: {
|
|
262
|
+
type: "object",
|
|
263
|
+
properties: {
|
|
264
|
+
application_id: {
|
|
265
|
+
type: "string",
|
|
266
|
+
description: "Application UUID",
|
|
267
|
+
},
|
|
268
|
+
title: {
|
|
269
|
+
type: "string",
|
|
270
|
+
description: "Release title",
|
|
271
|
+
},
|
|
272
|
+
description: {
|
|
273
|
+
type: "string",
|
|
274
|
+
description: "Release description",
|
|
275
|
+
},
|
|
276
|
+
story_ids: {
|
|
277
|
+
type: "array",
|
|
278
|
+
items: { type: "string" },
|
|
279
|
+
description: "Story UUIDs to include in this release",
|
|
280
|
+
},
|
|
281
|
+
},
|
|
282
|
+
required: ["application_id", "title"],
|
|
283
|
+
},
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
name: "storu_publish_release",
|
|
287
|
+
description: "Publish a draft release. Requires releases:publish scope. Rate-limited to 1 publish per app per hour.",
|
|
288
|
+
inputSchema: {
|
|
289
|
+
type: "object",
|
|
290
|
+
properties: {
|
|
291
|
+
id: {
|
|
292
|
+
type: "string",
|
|
293
|
+
description: "Release UUID",
|
|
294
|
+
},
|
|
295
|
+
},
|
|
296
|
+
required: ["id"],
|
|
297
|
+
},
|
|
298
|
+
},
|
|
299
|
+
];
|
|
300
|
+
//# sourceMappingURL=tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAUA,MAAM,CAAC,MAAM,KAAK,GAAqB;IACrC;QACE,IAAI,EAAE,iBAAiB;QACvB,WAAW,EAAE,iCAAiC;QAC9C,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE,EAAE;SACf;KACF;IACD;QACE,IAAI,EAAE,kBAAkB;QACxB,WAAW,EAAE,2DAA2D;QACxE,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAA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;YACD,QAAQ,EAAE,CAAC,IAAI,CAAC;SACjB;KACF;CACF,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@benglo/storu-mcp",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "MCP server exposing Storu project management tools",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"bin": {
|
|
8
|
+
"storu-mcp": "dist/index.js"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"dist"
|
|
12
|
+
],
|
|
13
|
+
"scripts": {
|
|
14
|
+
"build": "tsc",
|
|
15
|
+
"dev": "node --watch dist/index.js",
|
|
16
|
+
"prepublishOnly": "npm run build",
|
|
17
|
+
"test": "vitest run",
|
|
18
|
+
"test:watch": "vitest"
|
|
19
|
+
},
|
|
20
|
+
"keywords": ["storu", "mcp", "model-context-protocol", "claude", "agile"],
|
|
21
|
+
"license": "MIT",
|
|
22
|
+
"repository": {
|
|
23
|
+
"type": "git",
|
|
24
|
+
"url": "https://github.com/RealShift/storu.git",
|
|
25
|
+
"directory": "packages/mcp-server"
|
|
26
|
+
},
|
|
27
|
+
"publishConfig": {
|
|
28
|
+
"access": "public"
|
|
29
|
+
},
|
|
30
|
+
"dependencies": {
|
|
31
|
+
"@modelcontextprotocol/sdk": "^1.0.0"
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"typescript": "^5.0.0",
|
|
35
|
+
"vitest": "^3.0.0"
|
|
36
|
+
}
|
|
37
|
+
}
|