@geeks.ltd/geeks-amp-mcp 1.0.1 → 1.0.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 CHANGED
@@ -6,7 +6,7 @@ Local MCP server for Cursor that authenticates to your AMP backend via OAuth 2.0
6
6
 
7
7
  1. **First use** – When you call an AMP tool, the server opens your browser to AMP’s login. After you sign in, AMP redirects to `http://127.0.0.1:5005/callback`. The server exchanges the code for access and refresh tokens and stores them (e.g. in `~/.amp-mcp/credentials.json`).
8
8
  2. **Later uses** – The server reuses the stored access token. When it expires, it uses the refresh token; if refresh fails, it runs the browser flow again.
9
- 3. **Tools** – `get_projects`, `get_amp_item_with_test_cases`, `submit_amp_progress_update`, `add_amp_test_case_references`, `get_auth_status`, `audit_tdd_amp` are forwarded to AMP with `Authorization: Bearer <token>`.
9
+ 3. **Tools** – `get_projects`, `get_amp_item_with_test_cases`, `submit_amp_progress_update`, `add_amp_test_case_references`, `submit_pen_test_review`, `get_auth_status`, `audit_tdd_amp`, `audit_pen_test_amp` are forwarded to AMP with `Authorization: Bearer <token>`.
10
10
 
11
11
  ## Prerequisites
12
12
 
@@ -65,7 +65,13 @@ In `.cursor/mcp.json` (project or global), use the **local server** via npx (no
65
65
 
66
66
  - **get_auth_status** – Returns `Authenticated: YES` or `Authenticated: NO` (no browser).
67
67
  - **get_projects** – List AMP projects (optional `searchTerm`, `limit`).
68
- - **get_amp_item_with_test_cases** – AMP item + test case refs by `ampReference` (e.g. `12345` or `AMP-12345`). Response JSON includes `ampItem.teamPercentageDone` (team board % done) alongside `progress` (workflow stage).
68
+ - **get_amp_item_with_test_cases** – AMP item + test case refs by `ampReference` (e.g. `12345` or `AMP-12345`). Response JSON includes `ampItem.teamPercentageDone` (team board % done) alongside `progress` (workflow stage), and pen test review fields: `hasPenTestReview`, `penTestReviewCompleted`, `penTestReviewCompletedBy`, `penTestReviewCommentId`.
69
69
  - **submit_amp_progress_update** – Team board: optional `teamPercentageDone` (0, 10, …, 100) and/or `message`; at least one required. Omits `message` when only updating % so AMP can default the comment to `"{n}% completed"`.
70
70
  - **add_amp_test_case_references** – `ampReference`, required `testCaseReferences` (array of strings), optional `message` after refs; same as AMP “Update test cases” (`[#+REF#]` markers).
71
+ - **submit_pen_test_review** – Record a completed Cursor AI pen test review: required `ampReference` and `scope` (branch, commits, files, or PR reviewed); optional `findings` (one per line, or `"None"`), `falsePositives` (`"N/A"` if none), `knownRisks` (`"N/A"` if none), `summary`. Posts a team comment with `[#PENTEST:COMPLETE#]` and sets review metadata on the work item.
71
72
  - **audit_tdd_amp** – Same as above plus auth status message for `/audit-tdd-amp` flows.
73
+ - **audit_pen_test_amp** – AMP item + pen test review status + test cases, plus auth status message for `/run-pen-test` flows.
74
+
75
+ ## Cursor command: `/run-pen-test`
76
+
77
+ Copy `.cursor/commands/run-pen-test.md` into your project (or use it from a repo that includes it). The command loads AMP context via MCP, runs a security review, and after human confirmation calls `submit_pen_test_review` to persist the outcome on AMP.
package/dist/index.js CHANGED
@@ -65,7 +65,7 @@ async function main() {
65
65
  return callAmpTool("get_projects", args, token);
66
66
  });
67
67
  // get_amp_item_with_test_cases – ensure token, then call AMP
68
- server.tool("get_amp_item_with_test_cases", "Get AMP (work item) details and all its test case references for a given AMP item. Use the reference number (e.g. 12345) or AMP-12345 format. Returns subject, note, status, progress (workflow stage), teamPercentageDone (team board % done, 0–100 in steps of 10), project, and a list of test case references (e.g. +AVFD) with the comment they appear in.", {
68
+ server.tool("get_amp_item_with_test_cases", "Get AMP (work item) details and all its test case references for a given AMP item. Use the reference number (e.g. 12345) or AMP-12345 format. Returns subject, note, status, progress (workflow stage), teamPercentageDone (team board % done, 0–100 in steps of 10), project, pen test review status (hasPenTestReview, penTestReviewCompleted, penTestReviewCompletedBy, penTestReviewCommentId), and a list of test case references (e.g. +AVFD) with the comment they appear in.", {
69
69
  ampReference: z.string().describe("AMP item reference number, e.g. '12345' or 'AMP-12345'"),
70
70
  }, async ({ ampReference }) => {
71
71
  const token = await ensureAccessToken();
@@ -113,6 +113,31 @@ async function main() {
113
113
  args.message = message.trim();
114
114
  return callAmpTool("add_amp_test_case_references", args, token);
115
115
  });
116
+ // submit_pen_test_review – record completed Cursor AI pen test review on AMP
117
+ server.tool("submit_pen_test_review", "Record a completed Cursor AI pen test review on an AMP work item. Posts a structured team comment and sets review metadata. Use after run-pen-test and human confirmation.", {
118
+ ampReference: z
119
+ .string()
120
+ .describe("AMP reference, e.g. '12345' or 'AMP-12345'"),
121
+ scope: z
122
+ .string()
123
+ .describe("Branch, commits, files, or PR reviewed"),
124
+ findings: z
125
+ .string()
126
+ .optional()
127
+ .describe("Findings, one per line; 'None' if none"),
128
+ falsePositives: z
129
+ .string()
130
+ .optional()
131
+ .describe("False positives explained; 'N/A' if none"),
132
+ knownRisks: z
133
+ .string()
134
+ .optional()
135
+ .describe("Accepted known risks; 'N/A' if none"),
136
+ summary: z.string().optional().describe("Short overall outcome"),
137
+ }, async (args) => {
138
+ const token = await ensureAccessToken();
139
+ return callAmpTool("submit_pen_test_review", args, token);
140
+ });
116
141
  // Optional: audit-tdd-amp – get AMP item + test cases and report auth status (for /audit-tdd-amp in Cursor)
117
142
  server.tool("audit_tdd_amp", "Get AMP item and its test case references, and report auth status. Use for /audit-tdd-amp flows in Cursor.", {
118
143
  ampReference: z.string().describe("AMP item reference number, e.g. '12345' or 'AMP-12345'"),
@@ -132,6 +157,27 @@ async function main() {
132
157
  ],
133
158
  };
134
159
  });
160
+ // Optional: audit-pen-test-amp – get AMP item + pen test review status and report auth (for /run-pen-test in Cursor)
161
+ server.tool("audit_pen_test_amp", "Get AMP item, pen test review status, and test case references, plus auth status. Use for /run-pen-test flows in Cursor.", {
162
+ ampReference: z
163
+ .string()
164
+ .describe("AMP item reference number, e.g. '12345' or 'AMP-12345'"),
165
+ }, async ({ ampReference }) => {
166
+ const token = await ensureAccessToken();
167
+ const result = await callAmpTool("get_amp_item_with_test_cases", { ampReference }, token);
168
+ const status = getAuthStatus();
169
+ return {
170
+ content: [
171
+ {
172
+ type: "text",
173
+ text: JSON.stringify({
174
+ message: status.message,
175
+ ampItemAndPenTestReview: result.content[0]?.text,
176
+ }),
177
+ },
178
+ ],
179
+ };
180
+ });
135
181
  const transport = new StdioServerTransport();
136
182
  await server.connect(transport);
137
183
  }
package/dist/tools.js CHANGED
@@ -23,7 +23,7 @@ export const TOOL_DEFINITIONS = [
23
23
  },
24
24
  {
25
25
  name: "get_amp_item_with_test_cases",
26
- description: "Get AMP (work item) details and all its test case references for a given AMP item. Use the reference number (e.g. 12345) or AMP-12345 format. Returns subject, note, status, progress (workflow stage), teamPercentageDone (team board % done), project, and a list of test case references (e.g. +AVFD) with the comment they appear in.",
26
+ description: "Get AMP (work item) details and all its test case references for a given AMP item. Use the reference number (e.g. 12345) or AMP-12345 format. Returns subject, note, status, progress (workflow stage), teamPercentageDone (team board % done), project, pen test review status (hasPenTestReview, penTestReviewCompleted, penTestReviewCompletedBy, penTestReviewCommentId), and a list of test case references (e.g. +AVFD) with the comment they appear in.",
27
27
  inputSchema: {
28
28
  type: "object",
29
29
  properties: {
@@ -80,6 +80,40 @@ export const TOOL_DEFINITIONS = [
80
80
  required: ["ampReference", "testCaseReferences"],
81
81
  },
82
82
  },
83
+ {
84
+ name: "submit_pen_test_review",
85
+ description: "Record a completed Cursor AI pen test review on an AMP work item. Posts a structured team comment and sets review metadata. Use after run-pen-test and human confirmation.",
86
+ inputSchema: {
87
+ type: "object",
88
+ properties: {
89
+ ampReference: {
90
+ type: "string",
91
+ description: "AMP reference, e.g. '12345' or 'AMP-12345'",
92
+ },
93
+ scope: {
94
+ type: "string",
95
+ description: "Branch, commits, files, or PR reviewed",
96
+ },
97
+ findings: {
98
+ type: "string",
99
+ description: "Findings, one per line; 'None' if none",
100
+ },
101
+ falsePositives: {
102
+ type: "string",
103
+ description: "False positives explained; 'N/A' if none",
104
+ },
105
+ knownRisks: {
106
+ type: "string",
107
+ description: "Accepted known risks; 'N/A' if none",
108
+ },
109
+ summary: {
110
+ type: "string",
111
+ description: "Short overall outcome",
112
+ },
113
+ },
114
+ required: ["ampReference", "scope"],
115
+ },
116
+ },
83
117
  {
84
118
  name: "get_auth_status",
85
119
  description: "Report whether the MCP server is authenticated to AMP. Returns 'Authenticated: YES' or 'Authenticated: NO' without opening the browser.",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geeks.ltd/geeks-amp-mcp",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "Local MCP server for AMP (OAuth 2.0 PKCE, token storage, proxy to AMP MCPServer.ashx)",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -45,4 +45,4 @@
45
45
  "tsx": "^4.0.0",
46
46
  "typescript": "^5.0.0"
47
47
  }
48
- }
48
+ }