@geeks.ltd/geeks-amp-mcp 1.0.4 → 1.0.6

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
@@ -1,12 +1,14 @@
1
1
  # Geeks AMP MCP Server
2
2
 
3
- Local MCP server for Cursor that authenticates to your AMP backend via OAuth 2.0 (Authorization Code + PKCE) and proxies tool calls to AMP’s `MCPServer.ashx`.
3
+ Local MCP server for Cursor and Claude that authenticates to your AMP backend via OAuth 2.0 (Authorization Code + PKCE) and proxies tool calls to AMP’s `MCPServer.ashx`.
4
+
5
+ **Using this as a developer?** See **[DEVELOPER.md](DEVELOPER.md)** for Cursor and Claude setup, example prompts, and how AMP MCP can help in day-to-day work.
4
6
 
5
7
  ## Flow
6
8
 
7
9
  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
10
  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_user_projects`, `get_projects`, `create_amp`, `get_amp_item_with_test_cases`, `add_amp_update`, `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>`.
11
+ 3. **Tools** – `get_user_projects`, `get_projects`, `get_amp_item`, `get_active_workplans`, `get_workplan_items`, `get_amp_comments`, `get_amp_item_with_test_cases`, `create_amp`, `add_amp_update`, `submit_amp_progress_update`, `add_amp_test_case_references`, `submit_pen_test_review`, `audit_tdd_amp`, and `audit_pen_test_amp` are forwarded to AMP with `Authorization: Bearer <token>`. `get_auth_status` reports the local authentication state without calling AMP.
10
12
 
11
13
  ## Prerequisites
12
14
 
@@ -66,8 +68,12 @@ In `.cursor/mcp.json` (project or global), use the **local server** via npx (no
66
68
  - **get_auth_status** – Returns `Authenticated: YES` or `Authenticated: NO` (no browser).
67
69
  - **get_user_projects** – Non-archived projects the authenticated user belongs to: `{ projects: [{ id, key, name }] }`, ordered by key. Use this before `create_amp`.
68
70
  - **get_projects** – Legacy global project search (optional `searchTerm`, `limit`); returns id + name only, not user-scoped. Do not use for create flows.
71
+ - **get_amp_item** – Rich details for an authorized AMP by `ampReference` (`12345` or `AMP-12345`): metadata, project, type, priority, status/progress/stage, completion, assignees, workplans, tags, URLs, linked AMPs, extension relationships (`extendedFrom`, `extensions`), pen-test review fields, and test case references. It does not return full comment history; use `get_amp_comments` for the conversation.
72
+ - **get_active_workplans** – Active workplans for a project (there may be several). Required: `project` (key or GUID). Returns dates, teams, estimate/duration, completion %, and item counts. Use `get_workplan_items` with a workplan name or GUID to load that plan's AMPs.
73
+ - **get_workplan_items** – All items in a workplan, assigned to any user. Required: `project`. Optional: `workplan` (name or GUID from `get_active_workplans`; omit for the newest active plan), `assignee` (name, email, or user GUID), `progress` (`Not started`, `TDD`, `Developing`, `Testing`, `Done`, `Blocked`). Returns workplan metadata, applied filters, and items in workplan order.
74
+ - **get_amp_comments** – Authorized AMP comment history, newest first. Required: `ampReference`. Optional: `column` (`Team`, `Client`, `Director`, or `all`) and `limit` (1–500). With no column, AMP returns every column visible to the authenticated user's role; with no limit, it returns all visible comments. The response reports visible/returned counts and truncation, and includes decoded text, author, column, status/progress changes, assignees, and attachment URLs.
69
75
  - **create_amp** – Create a new work item (status New). Required: `project` (key or GUID from `get_user_projects`), `subject`, `type`, `priority`. Optional: `description`, `url`, `note`, `visualSpecLink`, `linkedWorkItems`, `parentAmpReference`. Response includes `reference`, `projectId`, `projectKey`, `projectName`, `url`, etc.
70
- - **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`.
76
+ - **get_amp_item_with_test_cases** – Existing TDD/pen-test-focused subset by `ampReference`. It requires authenticated access. Prefer `get_amp_item` plus `get_amp_comments` for general agent workflows.
71
77
  - **add_amp_update** – Team-column update (mirrors Form_EnterComment team fields except assignees/attachments). Required: `ampReference` plus at least one of `message`, `teamPercentageDone` (0–100, step 10), `teamProgress` (Not started, TDD, Developing, Testing, Done, Blocked), or `stage` (Test, Local, UAT, Live, Pre-Live). Stage changes post a separate `"Done on: {stage}"` comment.
72
78
  - **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"`.
73
79
  - **add_amp_test_case_references** – `ampReference`, required `testCaseReferences` (array of strings), optional `message` after refs; same as AMP “Update test cases” (`[#+REF#]` markers).
@@ -75,6 +81,8 @@ In `.cursor/mcp.json` (project or global), use the **local server** via npx (no
75
81
  - **audit_tdd_amp** – Same as above plus auth status message for `/audit-tdd-amp` flows.
76
82
  - **audit_pen_test_amp** – AMP item + pen test review status + test cases, plus auth status message for `/run-pen-test` flows.
77
83
 
84
+ For general agent workflows, call `get_amp_item` to understand the work item, then `get_amp_comments` for acceptance details, blockers, and conversation history before using write tools such as `add_amp_update`.
85
+
78
86
  ## Cursor command: `/run-pen-test`
79
87
 
80
88
  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
@@ -139,6 +139,81 @@ async function main() {
139
139
  const token = await ensureAccessToken();
140
140
  return callAmpTool("get_amp_item_with_test_cases", { ampReference }, token);
141
141
  });
142
+ // get_amp_item – rich authorized work-item details without comment history
143
+ server.tool("get_amp_item", "Get rich details for an AMP work item, including project, type, priority, status, progress, stage, assignees, workplans, tags, links, extension relationships (extendedFrom / extensions), URLs, completion, and test case references. Use get_amp_comments separately for its conversation history.", {
144
+ ampReference: z
145
+ .string()
146
+ .min(1)
147
+ .describe("AMP item reference number, e.g. '12345' or 'AMP-12345'"),
148
+ }, async ({ ampReference }) => {
149
+ const token = await ensureAccessToken();
150
+ return callAmpTool("get_amp_item", { ampReference }, token);
151
+ });
152
+ // get_active_workplans – list a project's active workplans (there may be several)
153
+ server.tool("get_active_workplans", "List a project's active workplans (there may be more than one) with dates, teams, estimates, completion, and item counts. Use get_workplan_items with a workplan name or GUID to load that plan's AMPs. Use get_user_projects for a project key.", {
154
+ project: z
155
+ .string()
156
+ .min(1)
157
+ .describe("Project key (preferred) or GUID from get_user_projects"),
158
+ }, async ({ project }) => {
159
+ const token = await ensureAccessToken();
160
+ return callAmpTool("get_active_workplans", { project }, token);
161
+ });
162
+ // get_workplan_items – all items in the project's active workplan (optional assignee/progress filters)
163
+ server.tool("get_workplan_items", "List all AMP items in a workplan, assigned to any user, in workplan order. Optional filters: assignee (name, email, or GUID) and progress (Not started, TDD, Developing, Testing, Done, Blocked). Pass workplan name or GUID from get_active_workplans when the project has several active plans; omit workplan to use the newest active one. Use get_user_projects for a project key.", {
164
+ project: z
165
+ .string()
166
+ .min(1)
167
+ .describe("Project key (preferred) or GUID from get_user_projects"),
168
+ workplan: z
169
+ .string()
170
+ .optional()
171
+ .describe("Optional workplan name or GUID. Omit to use the project's current active workplan."),
172
+ assignee: z
173
+ .string()
174
+ .optional()
175
+ .describe("Optional team assignee filter (name, email, or user GUID). Omit to include items assigned to any user."),
176
+ progress: z
177
+ .enum(teamProgressValues)
178
+ .optional()
179
+ .describe("Optional team progress filter: Not started, TDD, Developing, Testing, Done, Blocked"),
180
+ }, async ({ project, workplan, assignee, progress, }) => {
181
+ const token = await ensureAccessToken();
182
+ const args = { project };
183
+ if (workplan !== undefined && workplan.trim() !== "")
184
+ args.workplan = workplan.trim();
185
+ if (assignee !== undefined && assignee.trim() !== "")
186
+ args.assignee = assignee.trim();
187
+ if (progress !== undefined)
188
+ args.progress = progress;
189
+ return callAmpTool("get_workplan_items", args, token);
190
+ });
191
+ // get_amp_comments – authorized, role-filtered AMP conversation history
192
+ server.tool("get_amp_comments", "Get comments on an AMP that the authenticated user is allowed to view, ordered newest first. Returns all visible comments by default. Optionally filter to Team, Client, or Director and/or limit the result.", {
193
+ ampReference: z
194
+ .string()
195
+ .min(1)
196
+ .describe("AMP item reference number, e.g. '12345' or 'AMP-12345'"),
197
+ column: z
198
+ .string()
199
+ .optional()
200
+ .describe("Optional comment column: 'Team', 'Client', 'Director', or 'all'. Defaults to all columns visible to the user."),
201
+ limit: z
202
+ .number()
203
+ .int()
204
+ .min(1)
205
+ .max(500)
206
+ .optional()
207
+ .describe("Optional maximum number of newest comments to return (1-500). Omit to return all visible comments."),
208
+ }, async ({ ampReference, column, limit, }) => {
209
+ const token = await ensureAccessToken();
210
+ const args = { ampReference };
211
+ if (column !== undefined)
212
+ args.column = column;
213
+ if (limit !== undefined)
214
+ args.limit = limit;
215
+ return callAmpTool("get_amp_comments", args, token);
216
+ });
142
217
  // create_amp – new work item (status New)
143
218
  server.tool("create_amp", "Create a new AMP work item with status New. Required project is a project key (preferred) or GUID from get_user_projects. User must belong to the project. Extension items add Team + Client column comments automatically.", {
144
219
  project: z
package/dist/tools.js CHANGED
@@ -35,6 +35,82 @@ export const TOOL_DEFINITIONS = [
35
35
  required: ["ampReference"],
36
36
  },
37
37
  },
38
+ {
39
+ name: "get_amp_item",
40
+ description: "Get rich details for an AMP work item, including project, type, priority, status, progress, stage, assignees, workplans, tags, links, extension relationships (extendedFrom / extensions), URLs, completion, and test case references. Use get_amp_comments separately for its conversation history.",
41
+ inputSchema: {
42
+ type: "object",
43
+ properties: {
44
+ ampReference: {
45
+ type: "string",
46
+ description: "AMP item reference number, e.g. '12345' or 'AMP-12345'",
47
+ },
48
+ },
49
+ required: ["ampReference"],
50
+ },
51
+ },
52
+ {
53
+ name: "get_active_workplans",
54
+ description: "List a project's active workplans (there may be more than one) with dates, teams, estimates, completion, and item counts. Use get_workplan_items with a workplan name or GUID to load that plan's AMPs. Use get_user_projects for a project key.",
55
+ inputSchema: {
56
+ type: "object",
57
+ properties: {
58
+ project: {
59
+ type: "string",
60
+ description: "Project key (preferred) or GUID from get_user_projects",
61
+ },
62
+ },
63
+ required: ["project"],
64
+ },
65
+ },
66
+ {
67
+ name: "get_workplan_items",
68
+ description: "List all AMP items in a workplan, assigned to any user, in workplan order. Optional filters: assignee (name, email, or GUID) and progress (Not started, TDD, Developing, Testing, Done, Blocked). Pass workplan name or GUID from get_active_workplans when the project has several active plans; omit workplan to use the newest active one. Use get_user_projects for a project key.",
69
+ inputSchema: {
70
+ type: "object",
71
+ properties: {
72
+ project: {
73
+ type: "string",
74
+ description: "Project key (preferred) or GUID from get_user_projects",
75
+ },
76
+ workplan: {
77
+ type: "string",
78
+ description: "Optional workplan name or GUID. Omit to use the project's current active workplan.",
79
+ },
80
+ assignee: {
81
+ type: "string",
82
+ description: "Optional team assignee filter (name, email, or user GUID). Omit to include items assigned to any user.",
83
+ },
84
+ progress: {
85
+ type: "string",
86
+ description: "Optional team progress filter: Not started, TDD, Developing, Testing, Done, or Blocked",
87
+ },
88
+ },
89
+ required: ["project"],
90
+ },
91
+ },
92
+ {
93
+ name: "get_amp_comments",
94
+ description: "Get comments on an AMP that the authenticated user is allowed to view, ordered newest first. Returns all visible comments by default. Optionally filter to Team, Client, or Director and/or limit the result.",
95
+ inputSchema: {
96
+ type: "object",
97
+ properties: {
98
+ ampReference: {
99
+ type: "string",
100
+ description: "AMP item reference number, e.g. '12345' or 'AMP-12345'",
101
+ },
102
+ column: {
103
+ type: "string",
104
+ description: "Optional comment column: 'Team', 'Client', 'Director', or 'all'. Defaults to all columns visible to the user.",
105
+ },
106
+ limit: {
107
+ type: "number",
108
+ description: "Optional maximum number of newest comments to return (1-500). Omit to return all visible comments.",
109
+ },
110
+ },
111
+ required: ["ampReference"],
112
+ },
113
+ },
38
114
  {
39
115
  name: "get_user_projects",
40
116
  description: "List non-archived projects the authenticated user belongs to (id, key, name), ordered by key. Use before create_amp to pick a valid project key or GUID.",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geeks.ltd/geeks-amp-mcp",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
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",