@testomatio/mcp 1.0.14 → 2.0.0-beta.9
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 +113 -369
- package/index.js +17 -1618
- package/package.json +9 -18
- package/src/api/http-client.js +68 -0
- package/src/api/testomatio-client.js +46 -0
- package/src/cli/main.js +37 -0
- package/src/config/constants.js +3 -0
- package/src/config/load-config.js +37 -0
- package/src/config/package-version.js +19 -0
- package/src/core/errors.js +24 -0
- package/src/core/logger.js +31 -0
- package/src/helpers/mcp-response.js +11 -0
- package/src/index.js +20 -0
- package/src/mcp/configs/entity-crud-config.js +99 -0
- package/src/mcp/configs/issues-config.js +9 -0
- package/src/mcp/definitions/issues.js +131 -0
- package/src/mcp/definitions/labels.js +173 -0
- package/src/mcp/definitions/plans.js +317 -0
- package/src/mcp/definitions/rungroups.js +155 -0
- package/src/mcp/definitions/runs.js +364 -0
- package/src/mcp/definitions/snippets.js +187 -0
- package/src/mcp/definitions/steps.js +187 -0
- package/src/mcp/definitions/suites.js +329 -0
- package/src/mcp/definitions/system.js +10 -0
- package/src/mcp/definitions/tags.js +43 -0
- package/src/mcp/definitions/testruns.js +235 -0
- package/src/mcp/definitions/tests.js +331 -0
- package/src/mcp/registry/handlers.js +96 -0
- package/src/mcp/registry/issues.js +106 -0
- package/src/mcp/registry/listings.js +108 -0
- package/src/mcp/registry/payloads.js +271 -0
- package/src/mcp/server.js +49 -0
- package/src/mcp/tool-definitions.js +27 -0
- package/src/mcp/tool-registry.js +81 -0
package/README.md
CHANGED
|
@@ -1,449 +1,193 @@
|
|
|
1
1
|
# Testomat.io MCP Server
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Model Context Protocol (MCP) server that enables AI assistants (Claude, Cursor, OpenCode, etc.) to interact with Testomat.io Public API v2.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
## Installation
|
|
5
|
+
## Features
|
|
8
6
|
|
|
9
|
-
|
|
7
|
+
- **Full CRUD** for core entities:
|
|
8
|
+
- Tests, Suites, Plans, Runs, TestRuns, RunGroups, Steps, Snippets, Labels
|
|
9
|
+
- Tags (read-only access)
|
|
10
|
+
- Issues (global + scoped helpers for tests/suites/runs/testruns/plans)
|
|
11
|
+
- **Smart Search** - delegates to list endpoints with query/filter forwarding
|
|
12
|
+
- **Issue Linking** - link/unlink issues to any resource
|
|
13
|
+
- **API Compatibility** - automatic handling of payload format differences (flat vs wrapped)
|
|
14
|
+
- **Run Management** - status transitions via `status_event` parameter
|
|
10
15
|
|
|
11
|
-
|
|
12
|
-
- npm or yarn package manager
|
|
13
|
-
- Testomat.io account with API access
|
|
16
|
+
## Quick Start
|
|
14
17
|
|
|
15
|
-
###
|
|
18
|
+
### Installation
|
|
16
19
|
|
|
17
20
|
```bash
|
|
18
|
-
|
|
21
|
+
npm install -g @testomatio/mcp
|
|
19
22
|
```
|
|
20
23
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
### Command Line Options
|
|
24
|
-
|
|
25
|
-
The MCP server can be started using command line arguments or environment variables:
|
|
24
|
+
### Configuration
|
|
26
25
|
|
|
27
|
-
|
|
26
|
+
**Required credentials:**
|
|
27
|
+
- `TESTOMATIO_PROJECT_TOKEN` - Your project API token
|
|
28
|
+
- `TESTOMATIO_PROJECT_ID` - Your project ID
|
|
28
29
|
|
|
30
|
+
**Run server:**
|
|
29
31
|
```bash
|
|
30
|
-
|
|
31
|
-
npx @testomatio/mcp@latest -t testomat_YOUR_TOKEN_HERE -p your-project-id
|
|
32
|
-
|
|
33
|
-
# Using long flags
|
|
34
|
-
npx @testomatio/mcp@latest --token testomat_YOUR_TOKEN_HERE --project your-project-id
|
|
35
|
-
|
|
36
|
-
# With custom base URL
|
|
37
|
-
npx @testomatio/mcp@latest --token testomat_YOUR_TOKEN_HERE --project your-project-id --base-url https://your-instance.testomat.io
|
|
32
|
+
testomatio-mcp --token <PROJECT_TOKEN> --project <PROJECT_ID>
|
|
38
33
|
```
|
|
39
34
|
|
|
40
|
-
|
|
41
|
-
|
|
35
|
+
**Or with environment variables:**
|
|
42
36
|
```bash
|
|
43
|
-
|
|
44
|
-
export
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
# Run with project ID
|
|
48
|
-
npx @testomatio/mcp@latest --project your-project-id
|
|
49
|
-
|
|
50
|
-
# Or run directly with environment variables
|
|
51
|
-
TESTOMATIO_API_TOKEN=testomat_YOUR_TOKEN_HERE npx @testomatio/mcp@latest --project your-project-id
|
|
37
|
+
export TESTOMATIO_PROJECT_TOKEN=<PROJECT_TOKEN>
|
|
38
|
+
export TESTOMATIO_PROJECT_ID=<PROJECT_ID>
|
|
39
|
+
testomatio-mcp
|
|
52
40
|
```
|
|
53
41
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
2. Navigate to user tokens https://app.testomat.io/account/access_tokens
|
|
58
|
-
3. Create and copy **General API token** (starts with `testomat_`)
|
|
59
|
-
|
|
60
|
-
### Getting Your Project ID
|
|
61
|
-
|
|
62
|
-
Your project ID can be found in the URL when you're viewing your project:
|
|
63
|
-
```
|
|
64
|
-
https://app.testomat.io/projects/YOUR_PROJECT_ID
|
|
42
|
+
**Optional: custom base URL**
|
|
43
|
+
```bash
|
|
44
|
+
export TESTOMATIO_BASE_URL=https://beta.testomat.io
|
|
65
45
|
```
|
|
66
46
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
Testomatio uses specific ID formats for different resources:
|
|
70
|
-
|
|
71
|
-
- **Test IDs**: Start with `T` prefix followed by 7 alphanumeric characters (e.g., `Ta1b2c3d4`)
|
|
72
|
-
- **Suite IDs**: Start with `S` prefix followed by 7 alphanumeric characters (e.g., `Sx9y8z7w6`)
|
|
73
|
-
- **Total length**: 8 characters including the prefix
|
|
74
|
-
- **Format**: `[Prefix][7 alphanumeric characters]`
|
|
47
|
+
## Usage with AI Assistants
|
|
75
48
|
|
|
76
|
-
|
|
49
|
+
### Cursor IDE
|
|
77
50
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
To use this MCP server with Cursor, add the following configuration to your Cursor settings:
|
|
81
|
-
|
|
82
|
-
### Option 1: Using npx (Recommended)
|
|
83
|
-
|
|
84
|
-
Add this to your Cursor MCP settings (`cursor-settings.json` or through the Cursor settings UI):
|
|
51
|
+
Add to `.cursorrules` or settings.json:
|
|
85
52
|
|
|
86
53
|
```json
|
|
87
54
|
{
|
|
88
55
|
"mcpServers": {
|
|
89
56
|
"testomatio": {
|
|
90
|
-
"command": "
|
|
91
|
-
"args": ["
|
|
57
|
+
"command": "testomatio-mcp",
|
|
58
|
+
"args": ["--token", "<TOKEN>", "--project", "<PROJECT_ID>"],
|
|
59
|
+
"env": {
|
|
60
|
+
"TESTOMATIO_PROJECT_TOKEN": "<TOKEN>",
|
|
61
|
+
"TESTOMATIO_PROJECT_ID": "<PROJECT_ID>"
|
|
62
|
+
}
|
|
92
63
|
}
|
|
93
64
|
}
|
|
94
65
|
}
|
|
95
66
|
```
|
|
96
67
|
|
|
97
|
-
###
|
|
98
|
-
|
|
99
|
-
First, set your environment variables in your shell profile (`.bashrc`, `.zshrc`, etc.):
|
|
100
|
-
|
|
101
|
-
```bash
|
|
102
|
-
export TESTOMATIO_API_TOKEN=testomat_YOUR_TOKEN_HERE
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
Then add this to your Cursor MCP settings:
|
|
68
|
+
### Claude Desktop
|
|
106
69
|
|
|
107
70
|
```json
|
|
108
71
|
{
|
|
109
72
|
"mcpServers": {
|
|
110
73
|
"testomatio": {
|
|
111
|
-
"command": "
|
|
112
|
-
"args": ["
|
|
113
|
-
"env": {
|
|
114
|
-
"TESTOMATIO_API_TOKEN": "testomat_YOUR_TOKEN_HERE"
|
|
115
|
-
}
|
|
74
|
+
"command": "node",
|
|
75
|
+
"args": ["/path/to/mcp/index.js", "--token", "<TOKEN>", "--project", "<PROJECT_ID>"]
|
|
116
76
|
}
|
|
117
77
|
}
|
|
118
78
|
}
|
|
119
79
|
```
|
|
120
80
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
### Tools
|
|
124
|
-
|
|
125
|
-
#### Tests
|
|
126
|
-
* `get_tests` – Get all tests (params: `plan`, `query`, `state`, `suite_id`, `tag`, `labels`) — api: GET `/tests`
|
|
127
|
-
* `get_test` – Get a specific test by ID with all information including labels, tags, and metadata (params: `test_id`) — api: GET `/tests/{test_id}`
|
|
128
|
-
* `search_tests` – Search tests (params: `query`, `tql`, `labels`, `state`, `priority`, `filter`, `page`) — api: GET `/tests`
|
|
129
|
-
* `create_test` – Create a new test (params: `suite_id`, `title`, `description`, `code`, `file`, `state`, `tags`, `jira_issues`, `assigned_to`, `labels_ids`, `fields`) — api: POST `/tests`
|
|
130
|
-
* `update_test` – Update an existing test (params: `test_id`, `suite_id`, `title`, `description`, `code`, `file`, `state`, `tags`, `jira_issues`, `assigned_to`, `labels_ids`, `fields`) — api: PUT `/tests/{test_id}`
|
|
81
|
+
### OpenCode
|
|
131
82
|
|
|
132
|
-
|
|
133
|
-
* `search_suites` – Search suites (params: `query`, `labels`, `state`, `priority`, `page`) — api: GET `/suites`
|
|
134
|
-
* `get_root_suites` – List root-level suites (no params) — api: GET `/suites`
|
|
135
|
-
* `get_suite` – Get one suite (params: `suite_id`) — api: GET `/suites/{suite_id}`
|
|
136
|
-
* `create_suite` – Create a new suite (params: `title`, `description`, `parent_id`, `fields`) — api: POST `/suites`
|
|
137
|
-
* `create_folder` – Create a new folder (params: `title`, `description`, `parent_id`, `fields`) — api: POST `/suites`
|
|
83
|
+
Create `.opencode/opencode.json`:
|
|
138
84
|
|
|
139
|
-
|
|
140
|
-
* `get_labels` – Get all available labels with their IDs and configurations
|
|
141
|
-
* `create_label` – Create a new label with optional custom field
|
|
142
|
-
* `unlink_label` – Remove a label from a test or suite
|
|
143
|
-
|
|
144
|
-
### Custom Fields and Labels
|
|
145
|
-
|
|
146
|
-
The MCP server provides two distinct ways to assign values to tests, suites, and folders:
|
|
147
|
-
|
|
148
|
-
#### 1. Using `labels_ids` with label:value syntax
|
|
149
|
-
```javascript
|
|
85
|
+
```json
|
|
150
86
|
{
|
|
151
|
-
"
|
|
87
|
+
"$schema": "https://opencode.ai/config.json",
|
|
88
|
+
"mcp": {
|
|
89
|
+
"testomat": {
|
|
90
|
+
"type": "local",
|
|
91
|
+
"command": [
|
|
92
|
+
"node",
|
|
93
|
+
"node_modules/@testomatio/mcp/index.js",
|
|
94
|
+
"--token",
|
|
95
|
+
"<TOKEN>",
|
|
96
|
+
"--project",
|
|
97
|
+
"<PROJECT_ID>"
|
|
98
|
+
],
|
|
99
|
+
"enabled": true,
|
|
100
|
+
"environment": {
|
|
101
|
+
"TESTOMATIO_BASE_URL": "https://app.testomat.io"
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
152
105
|
}
|
|
153
106
|
```
|
|
154
|
-
- Direct label assignment with values using `label:value` format
|
|
155
|
-
- Good for simple label assignments
|
|
156
|
-
- Works with existing Testomatio labels
|
|
157
107
|
|
|
158
|
-
|
|
159
|
-
|
|
108
|
+
## Quick Examples
|
|
109
|
+
|
|
110
|
+
**List tests:**
|
|
111
|
+
```json
|
|
160
112
|
{
|
|
161
|
-
"
|
|
162
|
-
|
|
163
|
-
"severity": "critical",
|
|
164
|
-
"risk_score": "8.5",
|
|
165
|
-
"team": "backend"
|
|
166
|
-
}
|
|
113
|
+
"name": "tests_list",
|
|
114
|
+
"arguments": { "page": 1, "per_page": 50 }
|
|
167
115
|
}
|
|
168
116
|
```
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
- Maps to Testomatio's custom-fields API
|
|
173
|
-
|
|
174
|
-
**Available for:**
|
|
175
|
-
- `create_test` and `update_test` - Test custom fields
|
|
176
|
-
- `create_suite` - Suite custom fields
|
|
177
|
-
- `create_folder` - Folder custom fields
|
|
178
|
-
|
|
179
|
-
#### Example Usage
|
|
180
|
-
```javascript
|
|
181
|
-
// Create a test with custom fields
|
|
117
|
+
|
|
118
|
+
**Create test:**
|
|
119
|
+
```json
|
|
182
120
|
{
|
|
183
|
-
"
|
|
121
|
+
"name": "tests_create",
|
|
184
122
|
"arguments": {
|
|
123
|
+
"title": "User login test",
|
|
185
124
|
"suite_id": "123",
|
|
186
|
-
"
|
|
187
|
-
"fields": {
|
|
188
|
-
"priority": "high",
|
|
189
|
-
"severity": "critical",
|
|
190
|
-
"team": "backend"
|
|
191
|
-
}
|
|
125
|
+
"priority": "high"
|
|
192
126
|
}
|
|
193
127
|
}
|
|
128
|
+
```
|
|
194
129
|
|
|
195
|
-
|
|
130
|
+
**Create run:**
|
|
131
|
+
```json
|
|
196
132
|
{
|
|
197
|
-
"
|
|
133
|
+
"name": "runs_create",
|
|
198
134
|
"arguments": {
|
|
199
|
-
"
|
|
200
|
-
"
|
|
135
|
+
"title": "Smoke tests",
|
|
136
|
+
"kind": "automated",
|
|
137
|
+
"env": "production"
|
|
201
138
|
}
|
|
202
139
|
}
|
|
203
140
|
```
|
|
204
141
|
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
## Example Usage in Cursor
|
|
215
|
-
|
|
216
|
-
Once configured, you can ask your AI assistant questions like:
|
|
217
|
-
|
|
218
|
-
- "Show me all the tests in the project"
|
|
219
|
-
- "Get details for test ID Ta1b2c3d4"
|
|
220
|
-
- "Get the test runs for test ID Ta1b2c3d4"
|
|
221
|
-
- "What are the root suites in this project?"
|
|
222
|
-
- "Show me details for test run xyz789"
|
|
223
|
-
- "List all automated tests with the @smoke tag"
|
|
224
|
-
- "Get all test plans for this project"
|
|
225
|
-
- "Create a new test called 'Login validation' in suite Sx9y8z7w6"
|
|
226
|
-
- "Update test Ta1b2c3d4 to change its description and add @regression tag"
|
|
227
|
-
- "Create a test with custom fields: priority='high', severity='critical', team='backend'"
|
|
228
|
-
- "Update test Tb2c3d4e5 to set custom fields for risk score and assigned team"
|
|
229
|
-
- "Create a new suite called 'Authentication Tests' with description 'All login and signup related tests'"
|
|
230
|
-
- "Create a suite with custom fields for team ownership and priority level"
|
|
231
|
-
- "Create a folder called 'API Tests' to organize API-related test suites with custom fields"
|
|
232
|
-
- "Create a label called 'Severity' with color '#ffe9ad' and predefined values like 'Blocker', 'Critical', 'Major', 'Minor', 'Normal', 'Trivial'"
|
|
233
|
-
|
|
234
|
-
## Query Patterns
|
|
235
|
-
|
|
236
|
-
### Basic Information Queries
|
|
237
|
-
|
|
238
|
-
These queries retrieve general information without specific filtering:
|
|
239
|
-
|
|
240
|
-
- **"Show me all the tests in the project"** → `get_tests` tool
|
|
241
|
-
- **"What are the root suites in this project?"** → `get_root_suites` tool
|
|
242
|
-
- **"Get all test runs"** → `get_runs` tool
|
|
243
|
-
- **"Get all test plans for this project"** → `get_plans` tool
|
|
244
|
-
|
|
245
|
-
### Test Management Queries
|
|
246
|
-
|
|
247
|
-
These queries allow creating and updating tests:
|
|
248
|
-
|
|
249
|
-
- **"Create a new test called 'Login validation' in suite Sx9y8z7w6"** → `create_test` tool with `title: "Login validation"`, `suite_id: "Sx9y8z7w6"`
|
|
250
|
-
- **"Update test Ta1b2c3d4 to change its description"** → `update_test` tool with `test_id: "Ta1b2c3d4"`, `description: "new description"`
|
|
251
|
-
- **"Create an automated test with @smoke tag"** → `create_test` tool with `state: "automated"`, `tags: ["smoke"]`
|
|
252
|
-
- **"Create a test with custom fields: priority='high', severity='critical'"** → `create_test` tool with `title: "Test Title"`, `suite_id: "Sx9y8z7w6"`, `fields: { "priority": "high", "severity": "critical" }`
|
|
253
|
-
- **"Update test Tb2c3d4e5 to set custom fields for risk score and team"** → `update_test` tool with `test_id: "Tb2c3d4e5"`, `fields: { "risk_score": "8.5", "team": "backend" }`
|
|
254
|
-
|
|
255
|
-
### Suite and Folder Management Queries
|
|
256
|
-
|
|
257
|
-
These queries help organize your test structure:
|
|
258
|
-
|
|
259
|
-
- **"Create a new suite called 'Authentication Tests'"** → `create_suite` tool with `title: "Authentication Tests"`
|
|
260
|
-
- **"Create a suite for login tests with description"** → `create_suite` tool with `title: "Login Tests"`, `description: "All login related test cases"`
|
|
261
|
-
- **"Create a suite with custom fields for team ownership and priority level"** → `create_suite` tool with `title: "Backend Tests"`, `fields: { "team": "backend", "priority": "high" }`
|
|
262
|
-
- **"Create a folder called 'API Tests' under parent suite Sx9y8z7w6"** → `create_folder` tool with `title: "API Tests"`, `parent_id: "Sx9y8z7w6"`
|
|
263
|
-
- **"Create a folder with custom fields for team and project"** → `create_folder` tool with `title: "Integration Tests"`, `fields: { "team": "qa", "project": "mobile-app" }`
|
|
264
|
-
- **"Create a test suite for payment features"** → `create_suite` tool with `title: "Payment Features", description: "Tests covering payment processing"`
|
|
265
|
-
- **"Create a folder to organize integration tests"** → `create_folder` tool with `title: "Integration Tests"`
|
|
266
|
-
|
|
267
|
-
**Note**: Suites can only contain other suites, while folders can contain both suites and folders (but no tests).
|
|
268
|
-
|
|
269
|
-
### Label Creation Queries
|
|
270
|
-
|
|
271
|
-
These queries help create custom labels for better test categorization:
|
|
272
|
-
|
|
273
|
-
- **"Create a label called 'Severity' with red color"** → `create_label` tool with `title: "Severity"`, `color: "#ff6b6b"`
|
|
274
|
-
- **"Create a severity label with predefined values"** → `create_label` tool with `title: "Severity"`, `color: "#ffe9ad"`, `field: { "type": "list", "short": true, "value": "Blocker\nCritical\nMajor\nNormal\nMinor\nTrivial" }`
|
|
275
|
-
- **"Create a simple label for test types"** → `create_label` tool with `title: "Test Type"`, `scope: ["tests", "suites"]`
|
|
276
|
-
- **"Create a label visible in test lists"** → `create_label` tool with `title: "Category"`, `visibility: ["list"]`
|
|
277
|
-
|
|
278
|
-
### Specific Item Queries
|
|
279
|
-
|
|
280
|
-
These queries target specific entities by ID:
|
|
281
|
-
|
|
282
|
-
- **"Get details for test ID Ta1b2c3d4"** → `get_test` tool with `test_id: "Ta1b2c3d4"`
|
|
283
|
-
- **"Get test runs for test ID Ta1b2c3d4"** → `get_testruns` tool with `test_id: "Ta1b2c3d4"`
|
|
284
|
-
- **"Show me details for test run xyz789"** → `get_run` tool with `run_id: "xyz789"`
|
|
285
|
-
- **"Get suite details for suite Sx9y8z7w6"** → `get_suite` tool with `suite_id: "Sx9y8z7w6"`
|
|
286
|
-
|
|
287
|
-
### Search and Filter Queries
|
|
288
|
-
|
|
289
|
-
These queries use advanced filtering capabilities:
|
|
290
|
-
|
|
291
|
-
- **"List all automated tests with the @smoke tag"** → `search_tests` tool with `query: "@smoke"`, `state: "automated"`
|
|
292
|
-
- **"Search for tests containing 'login'"** → `search_tests` tool with `query: "login"`
|
|
293
|
-
- **"List tests tagged @critical or labelled 'ux' with critical severity"** → `search_tests` tool with `tql: "tag == 'critical' or label == 'ux' and severity == 'critical'"`
|
|
294
|
-
- **"Find tests linked to JIRA-123"** → `search_tests` tool with `tql: jira == 'BDCP-2'`
|
|
295
|
-
|
|
296
|
-
### Advanced Query Syntax
|
|
297
|
-
|
|
298
|
-
#### Test Query Language (TQL)
|
|
299
|
-
|
|
300
|
-
The `search_tests` tool supports TQL for complex filtering:
|
|
301
|
-
|
|
302
|
-
```
|
|
303
|
-
"tag == 'smoke' and state == 'manual'"
|
|
304
|
-
"severity == 'critical' or label == 'ux'"
|
|
142
|
+
**Finish run:**
|
|
143
|
+
```json
|
|
144
|
+
{
|
|
145
|
+
"name": "runs_update",
|
|
146
|
+
"arguments": {
|
|
147
|
+
"run_id": "456",
|
|
148
|
+
"status_event": "finish"
|
|
149
|
+
}
|
|
150
|
+
}
|
|
305
151
|
```
|
|
306
152
|
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
Tags can be searched using the `@` prefix:
|
|
310
|
-
|
|
311
|
-
```
|
|
312
|
-
@smoke # Tests tagged with 'smoke'
|
|
313
|
-
@regression # Tests tagged with 'regression'
|
|
314
|
-
@critical # Tests tagged with 'critical'
|
|
315
|
-
```
|
|
153
|
+
## Documentation
|
|
316
154
|
|
|
317
|
-
|
|
155
|
+
Complete tool reference: [docs/tools.md](./docs/tools.md)
|
|
318
156
|
|
|
319
|
-
|
|
157
|
+
## Project Structure
|
|
320
158
|
|
|
321
159
|
```
|
|
322
|
-
|
|
323
|
-
|
|
160
|
+
src/
|
|
161
|
+
├── config/ # Config loading, defaults
|
|
162
|
+
├── core/ # Errors, logger
|
|
163
|
+
├── api/ # HTTP client, Testomat.io API client
|
|
164
|
+
├── mcp/ # MCP server, tools, registry
|
|
165
|
+
│ ├── definitions/ # Tool definitions by entity
|
|
166
|
+
│ ├── configs/ # Registry generation configs
|
|
167
|
+
│ └── registry/ # Tool handlers
|
|
168
|
+
└── cli/ # CLI bootstrap
|
|
324
169
|
```
|
|
325
170
|
|
|
326
|
-
##
|
|
327
|
-
|
|
328
|
-
### Common Issues
|
|
329
|
-
|
|
330
|
-
1. **"API token is required" error**
|
|
331
|
-
- Make sure your token starts with `testomat_`
|
|
332
|
-
- Verify the token is correct in your Testomat.io project settings
|
|
333
|
-
|
|
334
|
-
2. **"Project ID is required" error**
|
|
335
|
-
- Check that you're passing the correct project ID
|
|
336
|
-
- Verify the project ID exists and you have access to it
|
|
337
|
-
|
|
338
|
-
3. **Connection errors**
|
|
339
|
-
- Ensure you have internet connectivity
|
|
340
|
-
- Check if your firewall allows connections to `app.testomat.io`
|
|
341
|
-
- Verify your API token has the necessary permissions
|
|
342
|
-
|
|
343
|
-
4. **MCP server not starting in Cursor**
|
|
344
|
-
- Check Cursor's MCP logs for error messages
|
|
345
|
-
- Ensure Node.js 18+ is installed and accessible
|
|
346
|
-
- Try running the command manually first to test
|
|
347
|
-
|
|
348
|
-
### Debug Mode
|
|
349
|
-
|
|
350
|
-
To see detailed logs when running the server:
|
|
351
|
-
|
|
352
|
-
```bash
|
|
353
|
-
DEBUG=* npx @testomatio/mcp --token <token> --project <project-id>
|
|
354
|
-
```
|
|
171
|
+
## Environment Variables
|
|
355
172
|
|
|
356
|
-
|
|
173
|
+
| Variable | Required | Default | Description |
|
|
174
|
+
|----------|----------|---------|-------------|
|
|
175
|
+
| `TESTOMATIO_PROJECT_TOKEN` | Yes* | - | Project token (preferred) |
|
|
176
|
+
| `TESTOMATIO_API_TOKEN` | Yes* | - | Alternative token |
|
|
177
|
+
| `TESTOMATIO_PROJECT_ID` | Yes | - | Project ID |
|
|
178
|
+
| `TESTOMATIO_BASE_URL` | No | `https://app.testomat.io` | API base URL |
|
|
357
179
|
|
|
358
|
-
|
|
180
|
+
*Either `TESTOMATIO_PROJECT_TOKEN` or `TESTOMATIO_API_TOKEN`
|
|
359
181
|
|
|
360
|
-
##
|
|
182
|
+
## Important Notes
|
|
361
183
|
|
|
362
|
-
|
|
184
|
+
- **Run Status** - Use `runs_update` with `status_event` for transitions (finish, launch, rerun, etc.)
|
|
185
|
+
- **Search** - No dedicated `/search` endpoints; search uses list with filters
|
|
186
|
+
- **Issue Linking** - Scoped helpers available: `{entity}_issues_link/unlink`
|
|
363
187
|
|
|
364
|
-
|
|
188
|
+
## Development
|
|
365
189
|
|
|
366
190
|
```bash
|
|
367
|
-
# Clone the repository
|
|
368
|
-
git clone https://github.com/testomatio/mcp.git
|
|
369
|
-
cd mcp
|
|
370
|
-
|
|
371
|
-
# Install dependencies
|
|
372
191
|
npm install
|
|
373
|
-
|
|
374
|
-
# Run unit tests
|
|
375
|
-
npm test
|
|
376
|
-
|
|
377
|
-
# Run integration tests (requires environment variables)
|
|
378
|
-
npm run test:integration
|
|
379
|
-
|
|
380
|
-
# Run all tests
|
|
381
|
-
npm run test:all
|
|
382
|
-
```
|
|
383
|
-
|
|
384
|
-
### Testing
|
|
385
|
-
|
|
386
|
-
The project includes comprehensive test coverage:
|
|
387
|
-
|
|
388
|
-
- **Unit Tests**: Fast tests with mocked dependencies
|
|
389
|
-
- **Integration Tests**: Real API tests against Testomat.io
|
|
390
|
-
|
|
391
|
-
#### Running Tests Locally
|
|
392
|
-
|
|
393
|
-
```bash
|
|
394
|
-
# Unit tests only
|
|
395
|
-
npm run test:unit
|
|
396
|
-
|
|
397
|
-
# Integration tests (requires .env file)
|
|
398
|
-
npm run test:integration
|
|
399
|
-
|
|
400
|
-
# With coverage
|
|
401
|
-
npm run test:coverage
|
|
402
|
-
npm run test:coverage:integration
|
|
192
|
+
npm run start -- --token <TOKEN> --project <PROJECT_ID>
|
|
403
193
|
```
|
|
404
|
-
|
|
405
|
-
#### Environment Setup for Integration Tests
|
|
406
|
-
|
|
407
|
-
Create a `.env` file:
|
|
408
|
-
|
|
409
|
-
```bash
|
|
410
|
-
TESTOMATIO_API_TOKEN=testomat_your_token_here
|
|
411
|
-
TESTOMATIO_PROJECT_ID=your_project_id
|
|
412
|
-
TESTOMATIO_BASE_URL=https://app.testomat.io # optional
|
|
413
|
-
```
|
|
414
|
-
|
|
415
|
-
### CI/CD
|
|
416
|
-
|
|
417
|
-
This project uses GitHub Actions for continuous integration:
|
|
418
|
-
|
|
419
|
-
- ✅ **Unit Tests**: Run on every push/PR across Node.js 18, 20, 22
|
|
420
|
-
- ✅ **Integration Tests**: Run daily and on main branch merges
|
|
421
|
-
- ✅ **Coverage Reports**: Automatic upload to Codecov
|
|
422
|
-
- ✅ **Security**: Secrets management for API credentials
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
### Code Quality
|
|
426
|
-
|
|
427
|
-
- Follow existing code style patterns
|
|
428
|
-
- Add tests for new functionality
|
|
429
|
-
- Update documentation when needed
|
|
430
|
-
- Ensure all tests pass before submitting PRs
|
|
431
|
-
|
|
432
|
-
## License
|
|
433
|
-
|
|
434
|
-
This project is licensed under the MIT License - see the LICENSE file for details.
|
|
435
|
-
|
|
436
|
-
## Support
|
|
437
|
-
|
|
438
|
-
For support, please:
|
|
439
|
-
1. Check the [Testomat.io Documentation](https://docs.testomat.io)
|
|
440
|
-
2. Open an issue on GitHub
|
|
441
|
-
3. Contact Testomat.io support
|
|
442
|
-
|
|
443
|
-
## Changelog
|
|
444
|
-
|
|
445
|
-
### v1.0.0
|
|
446
|
-
- Initial release
|
|
447
|
-
- Support for all major Testomat.io API endpoints
|
|
448
|
-
- MCP-compatible tool interface
|
|
449
|
-
- Semantic XML formatting for LLM processing
|