@alternative-path/qa-path-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.
Files changed (97) hide show
  1. package/LICENSE +23 -0
  2. package/QUICK_INSTALL.md +133 -0
  3. package/README.md +226 -0
  4. package/TOOLS_DOCUMENTATION.md +675 -0
  5. package/dist/__tests__/tools/module-tools.test.d.ts +2 -0
  6. package/dist/__tests__/tools/module-tools.test.d.ts.map +1 -0
  7. package/dist/__tests__/tools/module-tools.test.js +145 -0
  8. package/dist/__tests__/tools/module-tools.test.js.map +1 -0
  9. package/dist/__tests__/tools/project-tools.test.d.ts +2 -0
  10. package/dist/__tests__/tools/project-tools.test.d.ts.map +1 -0
  11. package/dist/__tests__/tools/project-tools.test.js +674 -0
  12. package/dist/__tests__/tools/project-tools.test.js.map +1 -0
  13. package/dist/__tests__/tools/query-tools.test.d.ts +2 -0
  14. package/dist/__tests__/tools/query-tools.test.d.ts.map +1 -0
  15. package/dist/__tests__/tools/query-tools.test.js +225 -0
  16. package/dist/__tests__/tools/query-tools.test.js.map +1 -0
  17. package/dist/__tests__/tools/testgroup-launch-tools.test.d.ts +2 -0
  18. package/dist/__tests__/tools/testgroup-launch-tools.test.d.ts.map +1 -0
  19. package/dist/__tests__/tools/testgroup-launch-tools.test.js +553 -0
  20. package/dist/__tests__/tools/testgroup-launch-tools.test.js.map +1 -0
  21. package/dist/__tests__/utils/mcp-error-mapper.test.d.ts +2 -0
  22. package/dist/__tests__/utils/mcp-error-mapper.test.d.ts.map +1 -0
  23. package/dist/__tests__/utils/mcp-error-mapper.test.js +240 -0
  24. package/dist/__tests__/utils/mcp-error-mapper.test.js.map +1 -0
  25. package/dist/__tests__/utils/mcp-response.test.d.ts +2 -0
  26. package/dist/__tests__/utils/mcp-response.test.d.ts.map +1 -0
  27. package/dist/__tests__/utils/mcp-response.test.js +72 -0
  28. package/dist/__tests__/utils/mcp-response.test.js.map +1 -0
  29. package/dist/agents/test-planner-context.d.ts +7 -0
  30. package/dist/agents/test-planner-context.d.ts.map +1 -0
  31. package/dist/agents/test-planner-context.js +283 -0
  32. package/dist/agents/test-planner-context.js.map +1 -0
  33. package/dist/agents/test-planner-prompt.d.ts +34 -0
  34. package/dist/agents/test-planner-prompt.d.ts.map +1 -0
  35. package/dist/agents/test-planner-prompt.js +82 -0
  36. package/dist/agents/test-planner-prompt.js.map +1 -0
  37. package/dist/api-client.d.ts +52 -0
  38. package/dist/api-client.d.ts.map +1 -0
  39. package/dist/api-client.js +285 -0
  40. package/dist/api-client.js.map +1 -0
  41. package/dist/constants.d.ts +7 -0
  42. package/dist/constants.d.ts.map +1 -0
  43. package/dist/constants.js +7 -0
  44. package/dist/constants.js.map +1 -0
  45. package/dist/index.d.ts +3 -0
  46. package/dist/index.d.ts.map +1 -0
  47. package/dist/index.js +175 -0
  48. package/dist/index.js.map +1 -0
  49. package/dist/services/project-context-service.d.ts +15 -0
  50. package/dist/services/project-context-service.d.ts.map +1 -0
  51. package/dist/services/project-context-service.js +36 -0
  52. package/dist/services/project-context-service.js.map +1 -0
  53. package/dist/tools/auth-tools.d.ts +16 -0
  54. package/dist/tools/auth-tools.d.ts.map +1 -0
  55. package/dist/tools/auth-tools.js +66 -0
  56. package/dist/tools/auth-tools.js.map +1 -0
  57. package/dist/tools/automation-tools.d.ts +28 -0
  58. package/dist/tools/automation-tools.d.ts.map +1 -0
  59. package/dist/tools/automation-tools.js +541 -0
  60. package/dist/tools/automation-tools.js.map +1 -0
  61. package/dist/tools/export-import-tools.d.ts +18 -0
  62. package/dist/tools/export-import-tools.d.ts.map +1 -0
  63. package/dist/tools/export-import-tools.js +61 -0
  64. package/dist/tools/export-import-tools.js.map +1 -0
  65. package/dist/tools/module-tools.d.ts +43 -0
  66. package/dist/tools/module-tools.d.ts.map +1 -0
  67. package/dist/tools/module-tools.js +289 -0
  68. package/dist/tools/module-tools.js.map +1 -0
  69. package/dist/tools/project-context-tools.d.ts +19 -0
  70. package/dist/tools/project-context-tools.d.ts.map +1 -0
  71. package/dist/tools/project-context-tools.js +133 -0
  72. package/dist/tools/project-context-tools.js.map +1 -0
  73. package/dist/tools/project-tools.d.ts +47 -0
  74. package/dist/tools/project-tools.d.ts.map +1 -0
  75. package/dist/tools/project-tools.js +362 -0
  76. package/dist/tools/project-tools.js.map +1 -0
  77. package/dist/tools/query-tools.d.ts +22 -0
  78. package/dist/tools/query-tools.d.ts.map +1 -0
  79. package/dist/tools/query-tools.js +127 -0
  80. package/dist/tools/query-tools.js.map +1 -0
  81. package/dist/tools/testcase-tools.d.ts +135 -0
  82. package/dist/tools/testcase-tools.d.ts.map +1 -0
  83. package/dist/tools/testcase-tools.js +845 -0
  84. package/dist/tools/testcase-tools.js.map +1 -0
  85. package/dist/tools/testgroup-launch-tools.d.ts +37 -0
  86. package/dist/tools/testgroup-launch-tools.d.ts.map +1 -0
  87. package/dist/tools/testgroup-launch-tools.js +727 -0
  88. package/dist/tools/testgroup-launch-tools.js.map +1 -0
  89. package/dist/utils/mcp-error-mapper.d.ts +27 -0
  90. package/dist/utils/mcp-error-mapper.d.ts.map +1 -0
  91. package/dist/utils/mcp-error-mapper.js +79 -0
  92. package/dist/utils/mcp-error-mapper.js.map +1 -0
  93. package/dist/utils/mcp-response.d.ts +26 -0
  94. package/dist/utils/mcp-response.d.ts.map +1 -0
  95. package/dist/utils/mcp-response.js +34 -0
  96. package/dist/utils/mcp-response.js.map +1 -0
  97. package/package.json +60 -0
package/LICENSE ADDED
@@ -0,0 +1,23 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Alternative Path
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
23
+
@@ -0,0 +1,133 @@
1
+ # Quick Install Guide for QA-Path MCP
2
+
3
+ Quick reference to install and configure the QA-Path MCP server in Cursor, VS Code, Claude, or any MCP client.
4
+
5
+ ## Prerequisites
6
+
7
+ - **Node.js** 18.0.0 or higher
8
+ - Access to a QA-Path instance and an API key (from your profile / API tokens)
9
+
10
+ ## Step 1: Install the Package
11
+
12
+ Choose one method:
13
+
14
+ ### Method A: Using npx (Recommended — no install)
15
+
16
+ Use `npx` in your MCP config; the package is downloaded and run on demand.
17
+
18
+ ### Method B: Global install
19
+
20
+ ```bash
21
+ npm install -g @alternative-path/qa-path-mcp
22
+ ```
23
+
24
+ ### Method C: Local install
25
+
26
+ ```bash
27
+ npm install @alternative-path/qa-path-mcp
28
+ ```
29
+
30
+ ## Step 2: Get Your Credentials
31
+
32
+ You need:
33
+
34
+ 1. **API URL** — Your QA-Path API base URL (typically the auth/base API path).
35
+ - Example: `https://api.qa-path.com/api/auth`
36
+ - The client uses this as the API root (paths like `/auth/login` are appended as needed).
37
+
38
+ 2. **Project ID (Optional)** — UUID of your project (from project settings in the web app).
39
+ - Example: `977dfeb2-e572-44da-8fe6-5c88f61609e4`
40
+
41
+ 3. **Authentication**:
42
+ - **API key (required)** — `QA_PATH_API_KEY` from your QA-Path profile (API tokens). The server logs in with this on startup.
43
+
44
+ ## Step 3: Configure in Cursor
45
+
46
+ ### Where Cursor stores MCP config
47
+
48
+ - **Global (all projects)**
49
+ - Windows: `%USERPROFILE%\.cursor\mcp.json`
50
+ - Mac/Linux: `~/.cursor/mcp.json`
51
+ - **This project only**
52
+ - `.cursor/mcp.json` in the project root (can be committed for the team)
53
+
54
+ You can also add or edit MCP servers in **Cursor Settings → MCP**.
55
+
56
+ ### Add the QA-Path server
57
+
58
+ Open the chosen `mcp.json` and add (or merge) the `mcpServers` entry:
59
+
60
+ **Required env (API key):**
61
+
62
+ ```json
63
+ {
64
+ "mcpServers": {
65
+ "qa-path": {
66
+ "command": "npx",
67
+ "args": ["-y", "@alternative-path/qa-path-mcp"],
68
+ "env": {
69
+ "QA_PATH_API_URL": "https://api.qa-path.com/api/auth",
70
+ "QA_PATH_API_KEY": "your-api-key"
71
+ }
72
+ }
73
+ }
74
+ }
75
+ ```
76
+
77
+ **If you installed globally (Method B), use the binary:**
78
+
79
+ ```json
80
+ "qa-path": {
81
+ "command": "qa-path-mcp",
82
+ "env": { ... }
83
+ }
84
+ ```
85
+
86
+ **If you installed locally (Method C), use node and the path:**
87
+
88
+ ```json
89
+ "qa-path": {
90
+ "command": "node",
91
+ "args": ["./node_modules/@alternative-path/qa-path-mcp/dist/index.js"],
92
+ "env": { ... }
93
+ }
94
+ ```
95
+
96
+ ### Optional env vars
97
+
98
+ - **`QA_PATH_PROJECT_ID`** — Default project (optional; you can set the active project at runtime via `set_active_project`).
99
+ - WebSocket URL and origin for NLP script generation come from the organization service (`agentServiceUrl`). No separate env vars are used.
100
+
101
+ ## Step 4: Restart Cursor
102
+
103
+ Close and reopen Cursor (or reload the window) so the new MCP server config is loaded.
104
+
105
+ ## Step 5: Test It
106
+
107
+ In the Cursor chat, try:
108
+
109
+ - *"List all projects using qa-path"*
110
+ - *"List all modules in the current project"*
111
+ - *"Check if I'm logged in to QA-Path"*
112
+
113
+ The server logs in with your API key on startup. Use *"Check auth status"* or *"List projects"* to confirm.
114
+
115
+ ## Troubleshooting
116
+
117
+ | Issue | What to do |
118
+ |-------|------------|
119
+ | **"Command not found" or "Cannot find module"** | Use the npx method (Method A); no install needed. |
120
+ | **"Authentication failed"** | Ensure `QA_PATH_API_URL` is correct (e.g. `https://api.qa-path.com/api/auth`). Check `QA_PATH_API_KEY` is set and valid. |
121
+ | **"Project ID is required"** | Set `QA_PATH_PROJECT_ID` in the server `env`, or pass `projectId` in the tool call when the tool supports it. |
122
+ | **"Network error"** | Confirm `QA_PATH_API_URL` is correct and reachable; check firewall/VPN. |
123
+ | **NLP script generation fails** | Ensure the organization service returns a valid `agentServiceUrl` for your project. |
124
+
125
+ ## More help
126
+
127
+ - [README.md](./README.md) — full docs and auth options
128
+ - [TOOLS_DOCUMENTATION.md](./TOOLS_DOCUMENTATION.md) — all tools and prompts
129
+ - [SHIPPING_GUIDE.md](./SHIPPING_GUIDE.md) — for package maintainers
130
+
131
+ ---
132
+
133
+ You're ready to use QA-Path MCP.
package/README.md ADDED
@@ -0,0 +1,226 @@
1
+ # QA-Path MCP Server
2
+
3
+ QA-Path is a Model Context Protocol (MCP) server that provides comprehensive test case management capabilities for the QA-Path Test Management System. It allows you to manage test cases, modules, components, and subcomponents directly from Cursor, VS Code, Claude, or any MCP-compatible client.
4
+
5
+ **Quick links:** [Install from npm](QUICK_INSTALL.md) · [All tools](TOOLS_DOCUMENTATION.md)
6
+
7
+ ## Features
8
+
9
+ - **qa-path-test-planner agent**: Standard, repeatable test planning via an MCP prompt that uses embedded context (no manual context file required)
10
+ - **Module Management**: Create, update, delete, and list modules, components, and subcomponents
11
+ - **Test Case Management**: Full CRUD operations for test cases
12
+ - **Test Case Operations**: Clone, move, and bulk create test cases
13
+ - **Export/Import**: Export test cases to Excel and import from Excel files
14
+ - **Permission-Aware**: Respects the same permissions as the web application
15
+ - **API key auth**: Authenticate with your QA-Path API key
16
+
17
+ ## Installation
18
+
19
+ ### Prerequisites
20
+
21
+ - Node.js 18.0.0 or higher
22
+ - Access to a QA-Path Test Management System instance
23
+ - An API key from your QA-Path profile (API tokens)
24
+
25
+ ### Quick Install (Recommended)
26
+
27
+ **Option 1: Using npx (No installation required)**
28
+
29
+ Simply use `npx` in your MCP configuration - it will download and run the package automatically:
30
+
31
+ ```json
32
+ {
33
+ "mcpServers": {
34
+ "qa-path": {
35
+ "command": "npx",
36
+ "args": ["-y", "@alternative-path/qa-path-mcp"],
37
+ "env": {
38
+ "QA_PATH_API_URL": "https://qa-path.com/api/auth",
39
+ "QA_PATH_API_KEY": "your-api-key"
40
+ }
41
+ }
42
+ }
43
+ }
44
+ ```
45
+
46
+ **Option 2: Global Installation**
47
+
48
+ ```bash
49
+ npm install -g @alternative-path/qa-path-mcp
50
+ ```
51
+
52
+ Then use in your MCP configuration:
53
+ ```json
54
+ {
55
+ "mcpServers": {
56
+ "qa-path": {
57
+ "command": "qa-path-mcp",
58
+ "env": {
59
+ "QA_PATH_API_URL": "https://qa-path.com/api/auth",
60
+ "QA_PATH_API_KEY": "your-api-key"
61
+ }
62
+ }
63
+ }
64
+ }
65
+ ```
66
+
67
+ **Option 3: Local Installation**
68
+
69
+ ```bash
70
+ npm install @alternative-path/qa-path-mcp
71
+ ```
72
+
73
+ Then use the full path:
74
+ ```json
75
+ {
76
+ "mcpServers": {
77
+ "qa-path": {
78
+ "command": "node",
79
+ "args": ["./node_modules/@alternative-path/qa-path-mcp/dist/index.js"],
80
+ "env": {
81
+ "QA_PATH_API_URL": "https://your-domain.com/api/auth",
82
+ "QA_PATH_API_KEY": "your-api-key"
83
+ }
84
+ }
85
+ }
86
+ }
87
+ ```
88
+
89
+ ### Install from Source (Development)
90
+
91
+ ```bash
92
+ git clone <repository-url>
93
+ cd qapath-mcp
94
+ npm install
95
+ npm run build
96
+ ```
97
+
98
+ ## Configuration
99
+
100
+ QA-Path requires configuration via environment variables (e.g. in your MCP config or shell).
101
+
102
+ ### Required Configuration
103
+
104
+ ```bash
105
+ # API base URL — use your app URL + /api/auth (e.g. http://localhost:3000/api/auth)
106
+ QA_PATH_API_URL=http://localhost:3000/api/auth
107
+
108
+ # API key (required) — from your QA-Path profile / API tokens
109
+ QA_PATH_API_KEY=your-api-key-here
110
+ ```
111
+
112
+ ### Optional Configuration
113
+
114
+ ```bash
115
+ # Project can be set at runtime via set_active_project; optional default:
116
+ # QA_PATH_PROJECT_ID=your-project-id-here
117
+ ```
118
+
119
+ ### Example `.env` file
120
+
121
+ ```bash
122
+ # API Configuration
123
+ QA_PATH_API_URL=http://localhost:3000/api/auth
124
+ QA_PATH_API_KEY=your-api-key-here
125
+ ```
126
+
127
+ ## Usage with Cursor
128
+
129
+ 1. Open Cursor settings
130
+ 2. Navigate to MCP settings
131
+ 3. Add the following configuration:
132
+
133
+ ```json
134
+ {
135
+ "mcpServers": {
136
+ "qa-path": {
137
+ "command": "npx",
138
+ "args": ["-y", "@alternative-path/qa-path-mcp"],
139
+ "env": {
140
+ "QA_PATH_API_URL": "http://localhost:3000/api/auth",
141
+ "QA_PATH_API_KEY": "your-api-key"
142
+ }
143
+ }
144
+ }
145
+ }
146
+ ```
147
+
148
+ ## Usage with VS Code
149
+
150
+ 1. Install the MCP extension for VS Code
151
+ 2. Configure the MCP server in your VS Code settings:
152
+
153
+ ```json
154
+ {
155
+ "mcp.servers": {
156
+ "qa-path": {
157
+ "command": "npx",
158
+ "args": ["-y", "@alternative-path/qa-path-mcp"],
159
+ "env": {
160
+ "QA_PATH_API_URL": "http://localhost:3000/api/auth",
161
+ "QA_PATH_API_KEY": "your-api-key"
162
+ }
163
+ }
164
+ }
165
+ }
166
+ ```
167
+
168
+ ## Tools and Prompts
169
+
170
+ For a complete list of all MCP tools and prompts, including parameters, sample prompts, and examples, see **[TOOLS_DOCUMENTATION.md](TOOLS_DOCUMENTATION.md)**.
171
+
172
+ ## Permissions
173
+
174
+ QA-Path respects the same permission system as the web application. Users can only perform actions they have permission for. If you receive a 403 Forbidden error, check your user permissions in the web application.
175
+
176
+ ## Security
177
+
178
+ - **Authentication** is token-based (API key). The MCP server has the same permissions as the credentials you provide; use scoped or least-privilege tokens where your backend supports them.
179
+ - **Authorization and multi-tenant isolation** are enforced entirely on the server. This client does not perform access control; it only forwards authenticated requests.
180
+ - **Do not commit secrets.** Never put `QA_PATH_API_KEY` or other credentials in version control, shared configs, or screenshots. Use environment variables or a local `.env` file that is listed in `.gitignore`.
181
+
182
+ ## Troubleshooting
183
+
184
+ ### Authentication Errors
185
+
186
+ - **401 Unauthorized**: Check your `QA_PATH_API_KEY`
187
+ - **403 Forbidden**: You don't have permission for this action. Check your user role and permissions.
188
+
189
+ ### Connection Errors
190
+
191
+ - **Network error**: Verify that `QA_PATH_API_URL` is correct and the server is accessible
192
+ - **Timeout**: The server might be slow. Try increasing the timeout in the API client.
193
+
194
+ ### Project ID Errors
195
+
196
+ - Set an active project via the `set_active_project` tool (after `list_projects`), or pass `projectId` to individual tool calls
197
+ - Optionally set `QA_PATH_PROJECT_ID` in the environment as a default
198
+
199
+ ## Development
200
+
201
+ ### Building from Source
202
+
203
+ ```bash
204
+ npm install
205
+ npm run build
206
+ ```
207
+
208
+ ### Running in Development Mode
209
+
210
+ ```bash
211
+ npm run dev
212
+ ```
213
+
214
+ ### Testing
215
+
216
+ ```bash
217
+ npm test
218
+ ```
219
+
220
+ ## License
221
+
222
+ MIT — Copyright (c) 2026 Alternative Path
223
+
224
+ ## Support
225
+
226
+ For issues and questions, please contact the Alternative Path team or open an issue in the repository.