genat-mcp 2.2.1 → 2.2.2
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 +15 -2
- package/index.js +7 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -110,7 +110,7 @@ If the global binary is not on PATH, use the full path, e.g. `node $(npm root -g
|
|
|
110
110
|
## Requirements
|
|
111
111
|
|
|
112
112
|
- **Node.js** 20+
|
|
113
|
-
- **n8n** with
|
|
113
|
+
- **n8n** with a GenAT workflow imported and activated. Use [genat-accessibility-tests-with-login-jira.json](../workflows/genat-accessibility-tests-with-login-jira.json) (path `webhook-test/webhook-genat-login-jira`) for JIRA support, or [genat-accessibility-tests-with-login.json](../workflows/genat-accessibility-tests-with-login.json) (path `webhook-test/webhook-genat-login`). Set **N8N_WEBHOOK_URL** to the workflow's webhook URL.
|
|
114
114
|
- **DOM Analyzer** and **Accessibility Analyzer** services running (see main README: `npm run services` from repo root)
|
|
115
115
|
|
|
116
116
|
## Standalone script: run-genat.mjs
|
|
@@ -134,7 +134,7 @@ N8N_WEBHOOK_URL='https://your-n8n/webhook-test/webhook-genat-login' N8N_INSECURE
|
|
|
134
134
|
N8N_MAX_ASSERTIONS=30 N8N_SCOPE_TO_REGIONS=header,main N8N_ANALYZE_STATES=1 node node_modules/genat-mcp/run-genat.mjs https://example.com .
|
|
135
135
|
```
|
|
136
136
|
|
|
137
|
-
**Important:** Use `webhook-genat-login` (not `webhook-genat`).
|
|
137
|
+
**Important:** Use `webhook-genat-login` or `webhook-genat-login-jira` (not `webhook-genat`). For JIRA support, import and activate [genat-accessibility-tests-with-login-jira.json](../workflows/genat-accessibility-tests-with-login-jira.json) and set N8N_WEBHOOK_URL to its webhook URL.
|
|
138
138
|
|
|
139
139
|
**Optional – Cursor rule:** Copy the rule so the AI uses the correct webhook when creating workarounds (the MCP error responses also include this hint):
|
|
140
140
|
```bash
|
|
@@ -168,6 +168,7 @@ When creating run-genat.mjs: Use webhook-genat-login, NOT webhook-genat. Prefer
|
|
|
168
168
|
- **loginUsername** (string, optional): Login username. Overrides .env when provided. Requires loginPassword.
|
|
169
169
|
- **loginPassword** (string, optional): Login password. Overrides .env when provided. Requires loginUsername.
|
|
170
170
|
- **loginUrl** (string, optional): Login page URL if different from target URL.
|
|
171
|
+
- **jiraNumber** (string, optional): JIRA issue key (e.g. PROJ-123). When provided, the workflow fetches the issue and injects acceptance criteria into the AI prompt.
|
|
171
172
|
|
|
172
173
|
Login credentials: provide in the prompt (loginUsername, loginPassword) or in project `.env` (TEST_USER, TEST_PASSWORD, LOGIN_USER, LOGIN_PASSWORD). Tool params override .env. For sensitive environments, prefer .env (gitignored) since credentials in the prompt are visible in chat history.
|
|
173
174
|
|
|
@@ -177,6 +178,8 @@ Generated tests include keyboard accessibility checks (Tab order, focus) by defa
|
|
|
177
178
|
|
|
178
179
|
## Sample prompts
|
|
179
180
|
|
|
181
|
+
See [prompts.md](prompts.md) for a full list of prompts including specific parent folders, login, JIRA, and combined options.
|
|
182
|
+
|
|
180
183
|
**With login credentials in the prompt:**
|
|
181
184
|
|
|
182
185
|
```
|
|
@@ -197,6 +200,16 @@ Use GenAT for https://myapp.example.com/dashboard. Credentials are in .env.
|
|
|
197
200
|
Use GenAT to generate accessibility tests for https://myapp.example.com/dashboard using this project folder: . Write the files to the project.
|
|
198
201
|
```
|
|
199
202
|
|
|
203
|
+
**With JIRA acceptance criteria:**
|
|
204
|
+
|
|
205
|
+
```
|
|
206
|
+
Use GenAT for https://myapp.example.com/dashboard with jiraNumber PROJ-123. Write the files to the project.
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
```
|
|
210
|
+
Generate accessibility tests for https://example.com using JIRA ticket A11Y-456. Use parentProjectFolder . and writeToProject true.
|
|
211
|
+
```
|
|
212
|
+
|
|
200
213
|
## Publishing to npm
|
|
201
214
|
|
|
202
215
|
Until the package is published, `npm install genat-mcp` returns 404. To publish:
|
package/index.js
CHANGED
|
@@ -51,7 +51,7 @@ function insecureHttpsFetch(url, { method = 'GET', headers = {}, body }) {
|
|
|
51
51
|
const server = new McpServer(
|
|
52
52
|
{
|
|
53
53
|
name: 'GenAT',
|
|
54
|
-
version: '2.2.
|
|
54
|
+
version: '2.2.2',
|
|
55
55
|
},
|
|
56
56
|
{
|
|
57
57
|
capabilities: {
|
|
@@ -98,9 +98,13 @@ server.registerTool(
|
|
|
98
98
|
.string()
|
|
99
99
|
.optional()
|
|
100
100
|
.describe('Login page URL if different from target URL'),
|
|
101
|
+
jiraNumber: z
|
|
102
|
+
.string()
|
|
103
|
+
.optional()
|
|
104
|
+
.describe('JIRA issue key (e.g. PROJ-123) for acceptance criteria'),
|
|
101
105
|
},
|
|
102
106
|
},
|
|
103
|
-
async ({ url, parentProjectFolder, writeToProject, maxAssertions, scopeToRegions, analyzeStates, loginUsername, loginPassword, loginUrl }) => {
|
|
107
|
+
async ({ url, parentProjectFolder, writeToProject, maxAssertions, scopeToRegions, analyzeStates, loginUsername, loginPassword, loginUrl, jiraNumber }) => {
|
|
104
108
|
if (!url || typeof url !== 'string') {
|
|
105
109
|
return {
|
|
106
110
|
content: [{ type: 'text', text: JSON.stringify({ error: 'Missing or invalid "url"' }) }],
|
|
@@ -159,6 +163,7 @@ server.registerTool(
|
|
|
159
163
|
...(login.passwordSelector && { loginPasswordSelector: login.passwordSelector }),
|
|
160
164
|
...(login.submitSelector && { loginSubmitSelector: login.submitSelector }),
|
|
161
165
|
}),
|
|
166
|
+
...(jiraNumber && jiraNumber.trim() && { jiraNumber: jiraNumber.trim() }),
|
|
162
167
|
};
|
|
163
168
|
|
|
164
169
|
const useInsecureTls = N8N_INSECURE_TLS && N8N_WEBHOOK_URL.startsWith('https://');
|
package/package.json
CHANGED