@pschroee/redmine-mcp 0.3.1 → 0.3.3
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 +4 -4
- package/dist/redmine/client.d.ts +1 -0
- package/dist/redmine/client.js +24 -2
- package/dist/server.js +1 -1
- package/dist/tools/core.js +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -11,7 +11,7 @@ npm install -g @pschroee/redmine-mcp
|
|
|
11
11
|
Or use directly with npx:
|
|
12
12
|
|
|
13
13
|
```bash
|
|
14
|
-
npx @pschroee/redmine-mcp --url=https://your-redmine.com --api-key=your-api-key
|
|
14
|
+
npx @pschroee/redmine-mcp@latest --url=https://your-redmine.com --api-key=your-api-key
|
|
15
15
|
```
|
|
16
16
|
|
|
17
17
|
## Configuration
|
|
@@ -51,19 +51,19 @@ npx @pschroee/redmine-mcp --url=https://your-redmine.com --api-key=your-api-key
|
|
|
51
51
|
### Load all tools (default)
|
|
52
52
|
|
|
53
53
|
```bash
|
|
54
|
-
npx @pschroee/redmine-mcp --url=https://redmine.example.com --api-key=abc123
|
|
54
|
+
npx @pschroee/redmine-mcp@latest --url=https://redmine.example.com --api-key=abc123
|
|
55
55
|
```
|
|
56
56
|
|
|
57
57
|
### Load only specific groups
|
|
58
58
|
|
|
59
59
|
```bash
|
|
60
|
-
npx @pschroee/redmine-mcp --tools=core,metadata
|
|
60
|
+
npx @pschroee/redmine-mcp@latest --tools=core,metadata
|
|
61
61
|
```
|
|
62
62
|
|
|
63
63
|
### Exclude specific groups
|
|
64
64
|
|
|
65
65
|
```bash
|
|
66
|
-
npx @pschroee/redmine-mcp --exclude=wiki,files
|
|
66
|
+
npx @pschroee/redmine-mcp@latest --exclude=wiki,files
|
|
67
67
|
```
|
|
68
68
|
|
|
69
69
|
## Claude Configuration
|
package/dist/redmine/client.d.ts
CHANGED
|
@@ -21,6 +21,7 @@ export declare class RedmineClient {
|
|
|
21
21
|
include?: string;
|
|
22
22
|
limit?: number;
|
|
23
23
|
offset?: number;
|
|
24
|
+
query_id?: number;
|
|
24
25
|
}): Promise<RedmineResult<RedmineIssuesResponse>>;
|
|
25
26
|
getIssue(id: number, include?: string): Promise<RedmineResult<{
|
|
26
27
|
issue: RedmineIssue;
|
package/dist/redmine/client.js
CHANGED
|
@@ -48,9 +48,29 @@ export class RedmineClient {
|
|
|
48
48
|
}
|
|
49
49
|
// ==================== ISSUES ====================
|
|
50
50
|
async listIssues(params) {
|
|
51
|
+
let projectId = params?.project_id;
|
|
52
|
+
// Auto-fetch project_id from query if query_id is provided without project_id
|
|
53
|
+
if (params?.query_id && !projectId) {
|
|
54
|
+
const queriesResult = await this.listQueries();
|
|
55
|
+
if ("error" in queriesResult) {
|
|
56
|
+
return queriesResult;
|
|
57
|
+
}
|
|
58
|
+
const savedQuery = queriesResult.queries.find(q => q.id === params.query_id);
|
|
59
|
+
if (!savedQuery) {
|
|
60
|
+
return {
|
|
61
|
+
error: true,
|
|
62
|
+
status: 404,
|
|
63
|
+
message: `Query with ID ${params.query_id} not found`,
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
// Use the query's project_id if it has one (project-specific query)
|
|
67
|
+
if (savedQuery.project_id) {
|
|
68
|
+
projectId = savedQuery.project_id;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
51
71
|
const query = new URLSearchParams();
|
|
52
|
-
if (
|
|
53
|
-
query.set("project_id", String(
|
|
72
|
+
if (projectId)
|
|
73
|
+
query.set("project_id", String(projectId));
|
|
54
74
|
if (params?.subproject_id)
|
|
55
75
|
query.set("subproject_id", params.subproject_id);
|
|
56
76
|
if (params?.tracker_id)
|
|
@@ -81,6 +101,8 @@ export class RedmineClient {
|
|
|
81
101
|
query.set("limit", String(params.limit));
|
|
82
102
|
if (params?.offset)
|
|
83
103
|
query.set("offset", String(params.offset));
|
|
104
|
+
if (params?.query_id)
|
|
105
|
+
query.set("query_id", String(params.query_id));
|
|
84
106
|
const queryString = query.toString();
|
|
85
107
|
const path = `/issues.json${queryString ? `?${queryString}` : ""}`;
|
|
86
108
|
return this.request("GET", path);
|
package/dist/server.js
CHANGED
|
@@ -3,7 +3,7 @@ import { registerTools } from "./tools/index.js";
|
|
|
3
3
|
export function createServer(redmineClient, toolGroups) {
|
|
4
4
|
const server = new McpServer({
|
|
5
5
|
name: "redmine-mcp",
|
|
6
|
-
version: "0.3.
|
|
6
|
+
version: "0.3.3",
|
|
7
7
|
});
|
|
8
8
|
registerTools(server, redmineClient, toolGroups);
|
|
9
9
|
return server;
|
package/dist/tools/core.js
CHANGED
|
@@ -19,6 +19,7 @@ export function registerCoreTools(server, client) {
|
|
|
19
19
|
include: z.string().optional().describe("Include associated data: attachments, relations, journals, watchers, children"),
|
|
20
20
|
limit: z.number().optional().describe("Maximum results (default 25, max 100)"),
|
|
21
21
|
offset: z.number().optional().describe("Skip first N results"),
|
|
22
|
+
query_id: z.number().optional().describe("Use a saved query ID to filter issues (get IDs from list_queries). For project-specific queries, project_id is automatically fetched from the query if not provided."),
|
|
22
23
|
},
|
|
23
24
|
}, async (params) => {
|
|
24
25
|
const result = await client.listIssues(params);
|