test-inventory-mcp 0.9.0 → 0.9.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/CHANGELOG.md +21 -0
- package/README.md +57 -4
- package/dist/server.js +4 -1
- package/package.json +4 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# test-inventory-mcp
|
|
2
2
|
|
|
3
|
+
## 0.9.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#45](https://github.com/Huldoser/test-inventory-mcp/pull/45) [`ff04416`](https://github.com/Huldoser/test-inventory-mcp/commit/ff0441641a2db0fc1dbb901fcb4b8e0bad5ca852) - Require test-inventory 0.10.3 or a later 0.10 patch so MCP scans include the Node and Jest declaration fixes, avoid false Playwright load failures, and keep tests when a local require function is called without arguments. Registry publication now waits briefly when npm's exact-version read endpoint has not caught up, while other verification failures still stop publication.
|
|
8
|
+
|
|
9
|
+
## 0.9.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#40](https://github.com/Huldoser/test-inventory-mcp/pull/40) [`5560a57`](https://github.com/Huldoser/test-inventory-mcp/commit/5560a579ee0436e7d6346e176ecc193a8977e5bf) - Clarify that withoutReason includes expected failures and does not establish whether a test executes. Document all
|
|
14
|
+
five tools, add setup verification and troubleshooting, and distinguish server-local operation from installation,
|
|
15
|
+
client data handling and filesystem isolation.
|
|
16
|
+
|
|
17
|
+
- [#41](https://github.com/Huldoser/test-inventory-mcp/pull/41) [`2837d6c`](https://github.com/Huldoser/test-inventory-mcp/commit/2837d6c3b89c2009d5335eeab4f77e00ed89e3ad) - Generate the five-tool reference from server schemas and real fixture calls, with complete results, pagination,
|
|
18
|
+
empty matches and corrective errors. Check the generated reference and documented workflows in the test suite.
|
|
19
|
+
|
|
20
|
+
- [#42](https://github.com/Huldoser/test-inventory-mcp/pull/42) [`bd89da4`](https://github.com/Huldoser/test-inventory-mcp/commit/bd89da4970b014ef5b4203e5c5eb8a746efd3157) - Require test-inventory 0.10.2 so MCP scans receive the named node:test context, subtest parent link, linked-folder,
|
|
21
|
+
concurrency, missing Jest preset and malformed TOML fixes. Regenerate the tool reference with the released core.
|
|
22
|
+
Refresh the tool output-schema descriptions for config selection, active state and inherited retries.
|
|
23
|
+
|
|
3
24
|
## 0.9.0
|
|
4
25
|
|
|
5
26
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -4,11 +4,15 @@ An MCP server for [test-inventory](https://github.com/Huldoser/test-inventory):
|
|
|
4
4
|
has, which are skipped and why, and which tests a change can affect, without running them.
|
|
5
5
|
|
|
6
6
|
It reads Playwright, Vitest, Jest, Mocha, Jasmine, Cypress, WebdriverIO, node:test and Bun test files with
|
|
7
|
-
test-inventory and answers from their source code.
|
|
8
|
-
|
|
7
|
+
test-inventory and answers from their source code. The running server executes no project code, writes no files and
|
|
8
|
+
opens no network connections. Installation through `npx` may download packages. Answers are passed to the MCP
|
|
9
|
+
client; its model provider and privacy settings determine what happens to that text next.
|
|
9
10
|
|
|
10
11
|
## Setup
|
|
11
12
|
|
|
13
|
+
The server requires test-inventory 0.10.3 or a later 0.10 patch, including its
|
|
14
|
+
[Node and Jest declaration fixes and Playwright load-error corrections](https://github.com/Huldoser/test-inventory/releases/tag/v0.10.3).
|
|
15
|
+
|
|
12
16
|
Node.js 22.12 or newer. The client starts the server with `npx` and talks to it over standard input and output. The
|
|
13
17
|
server scans the test files your test runner's config runs, with the runner `--framework` names or, without
|
|
14
18
|
it, the one the project uses. Globs pick the files instead, as on test-inventory's command line.
|
|
@@ -53,6 +57,18 @@ wants other files than the configs run.
|
|
|
53
57
|
The project is the folder given with `--root`, otherwise the one Claude Code names in `CLAUDE_PROJECT_DIR`, otherwise
|
|
54
58
|
the folder the client starts the server in.
|
|
55
59
|
|
|
60
|
+
### Verify the setup
|
|
61
|
+
|
|
62
|
+
1. Open your client's MCP server list and confirm that `test-inventory` is connected. In Claude Code use `/mcp`;
|
|
63
|
+
in VS Code run **MCP: List Servers** from the Command Palette; in Cursor open its MCP settings.
|
|
64
|
+
2. Confirm the five tools below are available, then ask: "Use test-inventory to summarize this project's tests."
|
|
65
|
+
3. Check that `test_summary` reports the expected framework and file counts. If it reports `scanErrors`, ask the
|
|
66
|
+
agent to call `scan_diagnostics` before trusting the counts.
|
|
67
|
+
|
|
68
|
+
Try "List tests marked fixme, with their conditions and reasons" or "Which tests may be affected by a change to
|
|
69
|
+
pages/orders-blotter.ts?" A conditional skip is not proof a test was skipped in a run. Expected-to-fail tests run;
|
|
70
|
+
their non-active state does not mean they are disabled. See [key concepts](https://huldoser.github.io/test-inventory/guide/concepts).
|
|
71
|
+
|
|
56
72
|
## Command line
|
|
57
73
|
|
|
58
74
|
```text
|
|
@@ -69,12 +85,31 @@ test-inventory-mcp [--framework <name>] [<glob...>] [--root <dir>]
|
|
|
69
85
|
|
|
70
86
|
## Tools
|
|
71
87
|
|
|
88
|
+
The generated [tool reference](https://github.com/Huldoser/test-inventory-mcp/blob/main/docs/tools.md) lists each argument's type, default and bounds, response fields,
|
|
89
|
+
complete request/response examples, pagination and errors. It is checked against the running server in tests.
|
|
90
|
+
|
|
72
91
|
| Tool | Answers |
|
|
73
92
|
| ------------------ | ---------------------------------------------------------------------------------------------------------------------------------- |
|
|
74
93
|
| `test_summary` | Counts by state, tag and annotation, and the configs with their projects; with `groupBy`, the counts of each file, tag or project. |
|
|
75
94
|
| `find_tests` | The tests that match `states`, `tags`, `grep`, `related`, `projects`, `only` or `withoutReason`, with the `fields` you pick. |
|
|
76
95
|
| `get_tests` | Every key of up to 20 tests by `ids`, with the scan's diagnostics about them; ids it can't find come back in `notFound`. |
|
|
77
96
|
| `scan_diagnostics` | The problems the scan found, such as a file that failed to parse, by `levels`, `codes` or `path`. |
|
|
97
|
+
| `diff_inventories` | Changes between saved scans named by `before` and `after`, including renames, moves and newly declared skip states. |
|
|
98
|
+
|
|
99
|
+
A typical call sequence is `test_summary`, `find_tests`, then `get_tests` for a few returned ids. For example, the
|
|
100
|
+
arguments to `find_tests` can be:
|
|
101
|
+
|
|
102
|
+
```json
|
|
103
|
+
{
|
|
104
|
+
"states": ["skip", "fixme"],
|
|
105
|
+
"fields": ["fullName", "state", "condition", "reason"],
|
|
106
|
+
"limit": 10
|
|
107
|
+
}
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
The answer contains matching `tests`, their `total`, `scanErrors`, `nextCursor` and `hint`, plus the framework and its
|
|
111
|
+
version. The records have selected keys and their `id`. Pass a non-null `nextCursor` as `cursor` with the same other
|
|
112
|
+
arguments to read another page; a narrow filter returning zero tests is a valid result.
|
|
78
113
|
|
|
79
114
|
`related` takes the files a change touches, from the project root as `git diff --name-only` writes them, and keeps
|
|
80
115
|
the tests whose `dependencies` include one of them, and those that reach code the scan can't follow, as
|
|
@@ -85,7 +120,7 @@ It also keeps tests that import a changed helper elsewhere in the project, outsi
|
|
|
85
120
|
tests as fit in one answer, with the other ids in `remaining`. An id stays the same when a test moves to another
|
|
86
121
|
line, and changes when its title, describes or file change.
|
|
87
122
|
|
|
88
|
-
Every tool also takes `directory`, a folder inside the project to scan, and `framework` and `patterns`, relative to
|
|
123
|
+
Every scan tool also takes `directory`, a folder inside the project to scan, and `framework` and `patterns`, relative to
|
|
89
124
|
`directory`, to override the command line, and `expandCases`, which lists each case of a `.each` or `.for` table and
|
|
90
125
|
each pass of a loop as its own test, with the name the runner gives it, as test-inventory's
|
|
91
126
|
[`--expand-cases`](https://huldoser.github.io/test-inventory/guide/cli) does. Ids differ with it, so `get_tests` takes
|
|
@@ -110,6 +145,23 @@ need the exact same core version. Incomplete scans produce warnings. Zero change
|
|
|
110
145
|
Each saved file must be a regular file of at most 128 MiB. Save scans with the core CLI, without `--fields` or
|
|
111
146
|
`--format jsonl`; see [inventory diffs](https://huldoser.github.io/test-inventory/guide/diff). If a saved file disappears or becomes unreadable while opening it, the error names the supplied file and suggests checking its existence and readability, without exposing the resolved host path. Cancellation during these operations retains the request's cancellation reason.
|
|
112
147
|
|
|
148
|
+
## Troubleshooting
|
|
149
|
+
|
|
150
|
+
| Symptom | Next step |
|
|
151
|
+
| ----------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
152
|
+
| The server is disconnected or tools are missing | Open the client's server logs. Check that the client can find Node.js 22.12 or newer and `npx`, then restart the server through the client. A client launched by a desktop app may use a different PATH from your terminal. |
|
|
153
|
+
| No files or tests were found | Check `--root`, `directory`, the framework and the config's selected files. Try explicit `patterns`, such as `["tests/**/*.spec.ts"]`. Call `scan_diagnostics` for details. |
|
|
154
|
+
| Several runners were detected | Pass `framework` on the call, or set `--framework` in the server configuration. Scan each runner separately. |
|
|
155
|
+
| The answer has `scanErrors` | Call `scan_diagnostics` and resolve the errors before treating the inventory as complete. |
|
|
156
|
+
| A path is refused | Keep the scanned files and dependencies inside the configured project. For an intended shared dependency, start the server at the shared parent and use `directory` to select a package. |
|
|
157
|
+
| A cursor is refused | Start the query again without `cursor`; keep filters, directory and case expansion unchanged when requesting later pages. Files may have changed between calls. |
|
|
158
|
+
| `get_tests` cannot find an id | Obtain current ids from `find_tests`. Keep its `directory`, `framework`, `patterns` and `expandCases` settings. |
|
|
159
|
+
| A saved scan is refused | Use complete JSON inventories, not JSON Lines or `--fields` output. Keep both files inside the project and below the size limit. |
|
|
160
|
+
|
|
161
|
+
For incorrect source analysis, use the core's [troubleshooting guide](https://huldoser.github.io/test-inventory/guide/troubleshooting).
|
|
162
|
+
For a server bug, include the server version, client, tool arguments, expected answer and a minimal reproduction.
|
|
163
|
+
Remove private project data before sharing it.
|
|
164
|
+
|
|
113
165
|
## Security
|
|
114
166
|
|
|
115
167
|
The server reads the test files its globs match inside the project, or without globs those the configs run, and,
|
|
@@ -117,7 +169,8 @@ for Vitest, the files that symbolic links among them point to, as Vitest does. I
|
|
|
117
169
|
running them. It refuses a `directory` or pattern that reaches outside the project, including parent-directory components in brace or extglob alternatives, and refuses scan answers whose test files, configs or dependencies resolve outside it. Saved inventories must resolve inside the project too. The scanner may read a linked file before the answer is refused; this boundary is not a filesystem sandbox. It runs no code from the project, writes no files, and opens no network connections.
|
|
118
170
|
|
|
119
171
|
Answers hold text from the project's files, such as test titles, skip reasons and comments. A client should treat it
|
|
120
|
-
as content of that project, not as instructions.
|
|
172
|
+
as content of that project, not as instructions. The client's handling of that text is separate from the server's
|
|
173
|
+
local operation. To report a vulnerability, see [SECURITY.md](SECURITY.md).
|
|
121
174
|
|
|
122
175
|
## Versioning
|
|
123
176
|
|
package/dist/server.js
CHANGED
|
@@ -266,7 +266,10 @@ export function createServer(config) {
|
|
|
266
266
|
.optional()
|
|
267
267
|
.describe('Keeps tests that one of these projects runs, named as in the configs test_summary lists.'),
|
|
268
268
|
only: z.boolean().optional().describe('true keeps tests that use .only, or are in a describe that does.'),
|
|
269
|
-
withoutReason: z
|
|
269
|
+
withoutReason: z
|
|
270
|
+
.boolean()
|
|
271
|
+
.optional()
|
|
272
|
+
.describe('true keeps non-active tests without a reason, including expected failures; excludes notLoaded.'),
|
|
270
273
|
fields: z
|
|
271
274
|
.array(z.enum(TEST_KEYS))
|
|
272
275
|
.min(1)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "test-inventory-mcp",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.2",
|
|
4
4
|
"description": "MCP server for test-inventory: AI agents ask which Playwright, Vitest, Jest, Mocha, Jasmine, Cypress, WebdriverIO, node:test and Bun tests a project has, which are skipped and why, and which a change can affect, without running them.",
|
|
5
5
|
"mcpName": "io.github.Huldoser/test-inventory",
|
|
6
6
|
"keywords": [
|
|
@@ -49,6 +49,8 @@
|
|
|
49
49
|
"build": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\" && tsc -p tsconfig.build.json",
|
|
50
50
|
"prepack": "npm run build",
|
|
51
51
|
"typecheck": "tsc -p tsconfig.json",
|
|
52
|
+
"docs:tools": "node scripts/tool-docs.ts",
|
|
53
|
+
"docs:check": "node scripts/tool-docs.ts --check",
|
|
52
54
|
"test": "vitest run",
|
|
53
55
|
"test:watch": "vitest",
|
|
54
56
|
"coverage": "vitest run --coverage",
|
|
@@ -77,7 +79,7 @@
|
|
|
77
79
|
},
|
|
78
80
|
"dependencies": {
|
|
79
81
|
"@modelcontextprotocol/server": "^2.3.1",
|
|
80
|
-
"test-inventory": "^0.10.
|
|
82
|
+
"test-inventory": "^0.10.3",
|
|
81
83
|
"zod": "^4.6.7"
|
|
82
84
|
}
|
|
83
85
|
}
|