@validate.qa/mcp 1.0.1 → 1.2.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/README.md +64 -11
- package/dist/index.js +1158 -185
- package/dist/index.js.map +1 -1
- package/package.json +6 -5
package/README.md
CHANGED
|
@@ -3,15 +3,23 @@
|
|
|
3
3
|
MCP server for Validate.QA.
|
|
4
4
|
|
|
5
5
|
This package lets AI IDEs like Claude Code and Cursor connect directly to your
|
|
6
|
-
Validate.QA workspace over stdio
|
|
6
|
+
Validate.QA workspace over **stdio**. Your AI can create, edit, run, and heal tests
|
|
7
7
|
from inside the editor while Validate.QA handles execution, scheduling, and
|
|
8
8
|
reporting on the platform side.
|
|
9
9
|
|
|
10
|
+
**Chat apps (Claude Desktop, Grok, Grok Bot)** do not use this package. Paste the
|
|
11
|
+
hosted connector URL `{API}/mcp` from Project Settings → MCP (OAuth; no PAT).
|
|
12
|
+
Operator runbook: [docs/MCP-CONNECTORS.md](../../docs/MCP-CONNECTORS.md).
|
|
13
|
+
|
|
14
|
+
**MCP Army (free forever).** This package works on the MCP Army plan with your own AI. Tools that use
|
|
15
|
+
Validate.QA's AI (such as `heal_test`) return a `PLAN_FEATURE_LOCKED` error until the workspace upgrades to Solo Dev (everything in MCP Army, plus Validate.QA's AI and higher limits).
|
|
16
|
+
Limits and the full list: [docs/MCP-ARMY.md](../../docs/MCP-ARMY.md).
|
|
17
|
+
|
|
10
18
|
## Requirements
|
|
11
19
|
|
|
12
20
|
- Node.js 18+
|
|
13
21
|
- A Validate.QA API URL
|
|
14
|
-
- A `pat_...` personal access token
|
|
22
|
+
- A `pat_...` personal access token (runner tokens `urt_` / `rt_` are rejected on `/api/mcp`)
|
|
15
23
|
- A Validate.QA project ID
|
|
16
24
|
|
|
17
25
|
## Quick Start
|
|
@@ -53,7 +61,9 @@ The package resolves config in this order:
|
|
|
53
61
|
1. CLI args: `--api-url`, `--token`, `--project-id`
|
|
54
62
|
2. Environment variables: `VALIDATEQA_API_URL`, `VALIDATEQA_TOKEN`,
|
|
55
63
|
`VALIDATEQA_PROJECT_ID`
|
|
56
|
-
3. `.validateqa.json` in the current working directory
|
|
64
|
+
3. `.validateqa.json` in the current working directory (API URL and project only)
|
|
65
|
+
4. For the token only: the token `init` saved in `~/.validateqa/credentials.json`
|
|
66
|
+
for that API origin and project
|
|
57
67
|
|
|
58
68
|
Example `.validateqa.json`:
|
|
59
69
|
|
|
@@ -65,11 +75,22 @@ Example `.validateqa.json`:
|
|
|
65
75
|
```
|
|
66
76
|
|
|
67
77
|
`token` is intentionally not read from `.validateqa.json`; pass it via CLI or
|
|
68
|
-
environment variable
|
|
78
|
+
environment variable, or let `init` save it for you.
|
|
79
|
+
|
|
80
|
+
## Finding bugs with your own browser agent
|
|
81
|
+
|
|
82
|
+
An agent that explores the app with its own browser tools (for example Playwright MCP) can lock in what it finds:
|
|
83
|
+
|
|
84
|
+
1. `start_here({ feature })`: one read with the feature's pages, existing tests, known selectors, whether test credentials are set, open bugs, and the rules for saved test code.
|
|
85
|
+
2. `save_regression_test` for each bug, with code that asserts the correct behaviour. The test runs later on an account with none of the browser's changes, so it signs in and redoes every step that made the state the agent saw. It returns at once; the test runs in the cloud while the agent keeps exploring.
|
|
86
|
+
3. `collect_verdicts` at the end: for each saved test, whether it reproduces its bug, passes, or broke before its check.
|
|
87
|
+
|
|
88
|
+
Set `VALIDATEQA_TOOLSET=agent` (or `--toolset agent`) to offer only the 12 tools this loop needs (about 9 KB of tool definitions instead of about 41 KB), which suits smaller models. The default is every tool.
|
|
69
89
|
|
|
70
90
|
## Claude Code Example
|
|
71
91
|
|
|
72
|
-
Create `.mcp.json` in your repo
|
|
92
|
+
Create `.mcp.json` in your repo (or run `init`, below). Keep the token out of
|
|
93
|
+
files you commit: set `VALIDATEQA_TOKEN` in your environment instead of `--token`.
|
|
73
94
|
|
|
74
95
|
```json
|
|
75
96
|
{
|
|
@@ -80,8 +101,6 @@ Create `.mcp.json` in your repo:
|
|
|
80
101
|
"@validate.qa/mcp",
|
|
81
102
|
"--api-url",
|
|
82
103
|
"https://api.myorg.validate.qa",
|
|
83
|
-
"--token",
|
|
84
|
-
"pat_xxxxxxxxxxxx",
|
|
85
104
|
"--project-id",
|
|
86
105
|
"proj_xxxxxxxxxxxx"
|
|
87
106
|
]
|
|
@@ -92,7 +111,7 @@ Create `.mcp.json` in your repo:
|
|
|
92
111
|
|
|
93
112
|
## Cursor Example
|
|
94
113
|
|
|
95
|
-
Create `.cursor/mcp.json` in your repo:
|
|
114
|
+
Create `.cursor/mcp.json` in your repo (token from `VALIDATEQA_TOKEN`, as above):
|
|
96
115
|
|
|
97
116
|
```json
|
|
98
117
|
{
|
|
@@ -103,8 +122,6 @@ Create `.cursor/mcp.json` in your repo:
|
|
|
103
122
|
"@validate.qa/mcp",
|
|
104
123
|
"--api-url",
|
|
105
124
|
"https://api.myorg.validate.qa",
|
|
106
|
-
"--token",
|
|
107
|
-
"pat_xxxxxxxxxxxx",
|
|
108
125
|
"--project-id",
|
|
109
126
|
"proj_xxxxxxxxxxxx"
|
|
110
127
|
]
|
|
@@ -131,9 +148,45 @@ This can create or update:
|
|
|
131
148
|
- `.windsurf/mcp.json` for Windsurf
|
|
132
149
|
- `.vscode/mcp.json` for VS Code
|
|
133
150
|
|
|
151
|
+
These files hold the API URL and project, never the token, so they are safe to
|
|
152
|
+
commit. The token is saved in `~/.validateqa/credentials.json` (readable only by
|
|
153
|
+
you), keyed by the API origin and project; each teammate runs their own `init`.
|
|
154
|
+
If that file cannot be written, the config files carry the token instead and
|
|
155
|
+
`init` adds them to `.gitignore`.
|
|
156
|
+
|
|
157
|
+
## Playwright Test Agents (`init-agents`)
|
|
158
|
+
|
|
159
|
+
To run Playwright's planner / generator / healer agents with Validate.QA layered
|
|
160
|
+
on top:
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
npx @validate.qa/mcp init-agents --loop claude --dir .
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
Options:
|
|
167
|
+
|
|
168
|
+
- `--loop claude|vscode|opencode` (default: `claude`)
|
|
169
|
+
- `--dir <repo>` (default: current directory)
|
|
170
|
+
|
|
171
|
+
`init-agents`:
|
|
172
|
+
|
|
173
|
+
1. Runs `npx playwright init-agents --loop=<loop>` in the target repository.
|
|
174
|
+
2. Appends a delimited `<!-- validate.qa:start -->` … `<!-- validate.qa:end -->`
|
|
175
|
+
rules section to each generated planner, generator, and healer file
|
|
176
|
+
(idempotent on re-run).
|
|
177
|
+
3. Adds `validate.qa` (`VALIDATEQA_TOOLSET=agent`) alongside `playwright-test` in
|
|
178
|
+
the loop's MCP config (`.mcp.json`, `.vscode/mcp.json`, or `opencode.json`)
|
|
179
|
+
without overwriting existing entries or writing any token. The server reads
|
|
180
|
+
its project from `.validateqa.json` and its token from your token store, so
|
|
181
|
+
run `init` from your dashboard once first, or set `VALIDATEQA_TOKEN`,
|
|
182
|
+
`VALIDATEQA_PROJECT_ID` and `VALIDATEQA_API_URL` (see
|
|
183
|
+
[Configuration Resolution](#configuration-resolution)).
|
|
184
|
+
|
|
134
185
|
## More Docs
|
|
135
186
|
|
|
136
|
-
- Full MCP guide:
|
|
187
|
+
- Full MCP guide (stdio + tool reference):
|
|
137
188
|
[docs/MCP.md](https://github.com/Validate-QA/validate.qa/blob/main/docs/MCP.md)
|
|
189
|
+
- Remote connectors / OAuth / directory submission:
|
|
190
|
+
[docs/MCP-CONNECTORS.md](https://github.com/Validate-QA/validate.qa/blob/main/docs/MCP-CONNECTORS.md)
|
|
138
191
|
- Package source:
|
|
139
192
|
[packages/mcp-server](https://github.com/Validate-QA/validate.qa/tree/main/packages/mcp-server)
|