mcprigor 1.0.0 → 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 +10 -3
- package/dist/cli.js +118 -2
- package/dist/cli.js.map +1 -1
- package/dist/mcp-server.d.ts +5 -0
- package/dist/mcp-server.d.ts.map +1 -0
- package/dist/mcp-server.js +245 -0
- package/dist/mcp-server.js.map +1 -0
- package/dist/reporters.d.ts +2 -0
- package/dist/reporters.d.ts.map +1 -1
- package/dist/reporters.js +15 -0
- package/dist/reporters.js.map +1 -1
- package/dist/runner.d.ts.map +1 -1
- package/dist/runner.js +2 -0
- package/dist/runner.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/workspace.d.ts +22 -0
- package/dist/workspace.d.ts.map +1 -1
- package/dist/workspace.js +6 -6
- package/dist/workspace.js.map +1 -1
- package/docs/CLI-REFERENCE.md +7 -0
- package/docs/ENGINEER-SETUP.md +1 -1
- package/docs/GETTING-STARTED.md +1 -1
- package/docs/MCP-SERVER.md +68 -0
- package/docs/PLAIN-LANGUAGE-COOKBOOK.md +73 -0
- package/docs/QA-WORKSPACE.md +40 -17
- package/docs/README.md +1 -3
- package/docs/TROUBLESHOOTING.md +6 -0
- package/package.json +1 -1
- package/docs/FILE-EXTENSION.md +0 -52
- package/docs/LANDSCAPE.md +0 -81
- package/docs/SPECIFICATION.md +0 -178
package/docs/FILE-EXTENSION.md
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
# MCP Rigor file extension
|
|
2
|
-
|
|
3
|
-
MCP Rigor plain-language tests use:
|
|
4
|
-
|
|
5
|
-
```text
|
|
6
|
-
.mcpr
|
|
7
|
-
```
|
|
8
|
-
|
|
9
|
-
Examples:
|
|
10
|
-
|
|
11
|
-
```text
|
|
12
|
-
smoke.mcpr
|
|
13
|
-
customer-regression.mcpr
|
|
14
|
-
transport-parity.mcpr
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
## Why not `.mcp`?
|
|
18
|
-
|
|
19
|
-
The `.mcp` suffix predates Model Context Protocol and is already associated with other software, including Metrowerks CodeWarrior project files. Reusing it would create ambiguous editor, operating-system, MIME, and tooling associations.
|
|
20
|
-
|
|
21
|
-
MCP Rigor therefore uses the product-specific `.mcpr` suffix: **MCP Rigor**.
|
|
22
|
-
|
|
23
|
-
References checked during the decision:
|
|
24
|
-
|
|
25
|
-
- [FileInfo: MCP file extension](https://fileinfo.com/extension/mcp)
|
|
26
|
-
- [ReviverSoft file-extension registry](https://www.reviversoft.com/file-extensions/mcp)
|
|
27
|
-
|
|
28
|
-
File-extension registries are not global standards authorities, but existing use is sufficient reason to avoid the collision.
|
|
29
|
-
|
|
30
|
-
## Migration
|
|
31
|
-
|
|
32
|
-
Rename files without changing their contents:
|
|
33
|
-
|
|
34
|
-
```bash
|
|
35
|
-
mv tests/smoke.mcp tests/smoke.mcpr
|
|
36
|
-
mv tests/shared-flows.mcp tests/shared-flows.mcpr
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
Update flow imports:
|
|
40
|
-
|
|
41
|
-
```text
|
|
42
|
-
Import flows from "./shared-flows.mcpr"
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
Update scripts and CI:
|
|
46
|
-
|
|
47
|
-
```bash
|
|
48
|
-
mcprigor check tests/smoke.mcpr
|
|
49
|
-
mcprigor test tests/smoke.mcpr
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
MCP Rigor now rejects `.mcp` files with an actionable rename message. YAML and JSON suite support is unchanged.
|
package/docs/LANDSCAPE.md
DELETED
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
# Background: MCP testing landscape
|
|
2
|
-
|
|
3
|
-
> Non-normative research. This page explains product positioning; it is not needed to use MCP Rigor.
|
|
4
|
-
|
|
5
|
-
## Executive summary
|
|
6
|
-
|
|
7
|
-
MCP testing tools currently fall into five categories: interactive inspectors, scriptable probes, official protocol conformance, SDK/framework-local tests, and semantic or security evaluators. The strongest opening for MCP Rigor is a transport-neutral, deterministic, black-box application test runner: **“Playwright for MCP.”**
|
|
8
|
-
|
|
9
|
-
MCP Rigor should complement the Inspector and official Conformance project rather than suggest it replaces either.
|
|
10
|
-
|
|
11
|
-
## Landscape
|
|
12
|
-
|
|
13
|
-
| Tool | Primary role | What it does well | Gap relative to MCP Rigor |
|
|
14
|
-
|---|---|---|---|
|
|
15
|
-
| [MCP Inspector](https://github.com/modelcontextprotocol/inspector) | Official interactive debugger | Explore connections, capabilities, tools, resources, prompts, notifications, and logs | Primarily manual exploration rather than a scenario/assertion/reporting framework |
|
|
16
|
-
| [MCP Inspector CLI](https://github.com/modelcontextprotocol/inspector#cli-mode) | Scriptable probe | Programmatic one-shot MCP interactions | Tests, fixtures, captures, deterministic assertion semantics, and CI reports remain limited or external |
|
|
17
|
-
| [Official MCP Conformance](https://github.com/modelcontextprotocol/conformance) | Protocol compliance/interoperability | Repeatable client/server protocol checks | Evolving protocol suite rather than application-domain regression testing |
|
|
18
|
-
| [MCP TypeScript SDK](https://github.com/modelcontextprotocol/typescript-sdk) | SDK and in-memory testing | Typed clients and in-process transport testing | Language/repository coupled; in-memory tests do not cover deployed transport boundaries |
|
|
19
|
-
| [MCP Python SDK](https://github.com/modelcontextprotocol/python-sdk) | SDK and in-memory testing | Python integration tests and memory helpers | Language/repository coupled rather than a universal black-box suite |
|
|
20
|
-
| [FastMCP testing](https://gofastmcp.com/patterns/testing) | Python framework testing | Convenient deterministic pytest/in-process testing | Framework-specific and can bypass subprocess, HTTP, auth, proxy, and deployment behavior |
|
|
21
|
-
| [mcptools](https://github.com/f/mcptools) | CLI probing | Shell-friendly list/call/read operations | Assertion model, scenarios, reports, fixtures, and coverage are external |
|
|
22
|
-
| [Promptfoo MCP provider](https://www.promptfoo.dev/docs/providers/mcp/) | Behavioral/agentic evaluation | Tool selection and response-quality evaluation with reports | LLM/model behavior can be probabilistic; not wire or deterministic application testing |
|
|
23
|
-
| [mcp-vibetest](https://github.com/ComposioHQ/mcp-vibetest) | Agentic semantic evaluation | Realistic task-completion checks | Probabilistic and complementary to hard deterministic gates |
|
|
24
|
-
| [mcp-scan](https://github.com/invariantlabs-ai/mcp-scan) | Security scanning | Tool-poisoning and prompt/config risk detection | Specialized security gate, not functional regression testing |
|
|
25
|
-
| [Cisco MCP Scanner](https://github.com/cisco-ai-defense/mcp-scanner) | Security scanning | MCP-focused security analysis | Specialized scanner rather than behavior/protocol test runner |
|
|
26
|
-
| [MCPJam Inspector](https://github.com/MCPJam/inspector) | Interactive workbench | Friendly exploratory MCP development | Primarily interactive; deterministic CI should not be assumed without specific current support |
|
|
27
|
-
|
|
28
|
-
Project details and release status change quickly. Pin versions and verify current primary documentation before making compatibility claims.
|
|
29
|
-
|
|
30
|
-
## Positioning
|
|
31
|
-
|
|
32
|
-
### Category
|
|
33
|
-
|
|
34
|
-
**Deterministic MCP application testing.**
|
|
35
|
-
|
|
36
|
-
### One-line message
|
|
37
|
-
|
|
38
|
-
> MCP Rigor is the open-source test runner for repeatable MCP server behavior across stdio and Streamable HTTP.
|
|
39
|
-
|
|
40
|
-
### Memorable message
|
|
41
|
-
|
|
42
|
-
> Playwright for MCP: author once, run the same scenarios locally and in CI.
|
|
43
|
-
|
|
44
|
-
### Naming rationale
|
|
45
|
-
|
|
46
|
-
“MCP Rigor” uses established developer-tool terminology, clearly describes the project’s scope, and remains independent from any specific MCP server or vendor brand. Registry and trademark availability should still be verified before publication.
|
|
47
|
-
|
|
48
|
-
## Durable differentiation
|
|
49
|
-
|
|
50
|
-
1. **Application workflows, not only probes:** multi-step scenarios, captures, fixtures, setup/teardown, and side-effect verification.
|
|
51
|
-
2. **Real boundaries:** subprocess lifecycle, stdio framing, Streamable HTTP, auth, TLS/proxy, reconnect, and cleanup.
|
|
52
|
-
3. **Stable CI contract:** deterministic exit codes, JSON/JUnit/SARIF, traces, artifacts, filtering, and policy-controlled retries.
|
|
53
|
-
4. **MCP-aware assertions:** tools/resources/prompts, errors, notifications, progress, pagination, cancellation, capability/version matrices, and subscriptions.
|
|
54
|
-
5. **Declarative and programmable:** safe YAML/JSON for most cases plus a typed API and explicit plugin model for advanced projects.
|
|
55
|
-
6. **Layered oracles:** deterministic assertions as hard gates; optional semantic/LLM evaluation as a clearly labeled soft layer.
|
|
56
|
-
7. **Record to regression:** capture an exploratory interaction, sanitize secrets/dynamic values, and generate a checked-in test.
|
|
57
|
-
8. **Evidence, not certification:** run or aggregate exact official conformance profiles without making blanket compliance claims.
|
|
58
|
-
|
|
59
|
-
## What not to become
|
|
60
|
-
|
|
61
|
-
- another generic MCP chat client
|
|
62
|
-
- another Inspector UI as the first product
|
|
63
|
-
- an unofficial certification authority
|
|
64
|
-
- a Python- or TypeScript-framework-specific helper
|
|
65
|
-
- an LLM evaluation platform whose core results are nondeterministic
|
|
66
|
-
- a broad security scanner that dilutes functional testing
|
|
67
|
-
|
|
68
|
-
## Launch wedge
|
|
69
|
-
|
|
70
|
-
Target teams that have one or more MCP servers in CI and currently use shell scripts, Inspector screenshots, ad hoc SDK tests, or manual checks. The first compelling demo should:
|
|
71
|
-
|
|
72
|
-
1. run the same calculator test against stdio and HTTP targets;
|
|
73
|
-
2. show a clear structural diff for a broken tool response;
|
|
74
|
-
3. capture a value and reuse it in a later step;
|
|
75
|
-
4. verify a protocol error and timeout;
|
|
76
|
-
5. export JUnit in GitHub Actions;
|
|
77
|
-
6. prove the child process is cleaned up after failure.
|
|
78
|
-
|
|
79
|
-
## Suggested public narrative
|
|
80
|
-
|
|
81
|
-
“The MCP ecosystem already has excellent tools to inspect a server and increasingly strong official protocol conformance checks. MCP Rigor addresses a different question: does your server still perform the domain behaviors your users depend on? It turns those behaviors into deterministic scenarios that run over real transports on every pull request.”
|
package/docs/SPECIFICATION.md
DELETED
|
@@ -1,178 +0,0 @@
|
|
|
1
|
-
# MCP Rigor runtime and product specification
|
|
2
|
-
|
|
3
|
-
> Normative runtime behavior and product requirements. For `.mcpr` syntax, use the [language reference](LANGUAGE-SPEC.md). Everyday users should start with [Getting started](GETTING-STARTED.md).
|
|
4
|
-
|
|
5
|
-
## 1. Product definition
|
|
6
|
-
|
|
7
|
-
MCP Rigor is an open-source, deterministic, black-box application test framework for Model Context Protocol servers. Its core promise is:
|
|
8
|
-
|
|
9
|
-
> Author a behavioral MCP scenario once, then run it repeatably against local subprocesses and deployed HTTP servers in CI.
|
|
10
|
-
|
|
11
|
-
MCP Rigor complements interactive debuggers and protocol conformance tooling. It does not claim MCP certification.
|
|
12
|
-
|
|
13
|
-
## 2. Users and jobs
|
|
14
|
-
|
|
15
|
-
- **MCP server authors:** prevent regressions in tools, resources, prompts, errors, and side effects.
|
|
16
|
-
- **Platform teams:** validate third-party servers before promotion or deployment.
|
|
17
|
-
- **SDK maintainers:** run common behavioral scenarios across transports and versions.
|
|
18
|
-
- **Security and QA teams:** build deterministic negative, authorization, and abuse cases.
|
|
19
|
-
|
|
20
|
-
Primary job: turn manually verified MCP interactions into reviewable, version-controlled tests with reliable CI outcomes.
|
|
21
|
-
|
|
22
|
-
## 3. Principles
|
|
23
|
-
|
|
24
|
-
1. Deterministic checks are hard gates; probabilistic evaluation is optional and separate.
|
|
25
|
-
2. Real transport boundaries matter.
|
|
26
|
-
3. Test files contain data, not arbitrary executable code.
|
|
27
|
-
4. Every wait has a deadline; notification tests use events rather than sleeps.
|
|
28
|
-
5. Reports identify protocol version, transport, capability, skips, and evidence.
|
|
29
|
-
6. Secrets are redacted before any result reaches a reporter.
|
|
30
|
-
7. “Conformance” always names an exact versioned profile and never implies certification.
|
|
31
|
-
|
|
32
|
-
## 4. MVP scope
|
|
33
|
-
|
|
34
|
-
### Included
|
|
35
|
-
|
|
36
|
-
- Node.js 20+, TypeScript, ESM
|
|
37
|
-
- YAML and JSON suites
|
|
38
|
-
- stdio subprocess and Streamable HTTP targets
|
|
39
|
-
- one isolated MCP session per test
|
|
40
|
-
- generic MCP requests
|
|
41
|
-
- captures and variable substitution
|
|
42
|
-
- exact, negative, existence, type, subset, length, and regex assertions
|
|
43
|
-
- expected MCP errors
|
|
44
|
-
- per-step deadlines
|
|
45
|
-
- terminal, JSON, and JUnit output
|
|
46
|
-
- CLI filtering and deterministic exit codes
|
|
47
|
-
- TypeScript library API
|
|
48
|
-
|
|
49
|
-
### Deferred
|
|
50
|
-
|
|
51
|
-
- notification queues and progress assertions
|
|
52
|
-
- JSON Schema output matcher
|
|
53
|
-
- snapshots and record/replay
|
|
54
|
-
- setup/teardown fixtures and shared sessions
|
|
55
|
-
- official-conformance adapter and versioned packs
|
|
56
|
-
- OAuth browser flows
|
|
57
|
-
- plugin API, custom reporters, and custom transports
|
|
58
|
-
- fuzzing and security packs
|
|
59
|
-
- retries, parallel/distributed execution, GUI, and LLM judges
|
|
60
|
-
|
|
61
|
-
## 5. Suite model
|
|
62
|
-
|
|
63
|
-
A suite has `version`, optional `name`, one target, defaults, and tests. A test contains sequential steps. Each step sends one request, applies assertions, then captures response leaves.
|
|
64
|
-
|
|
65
|
-
Variables:
|
|
66
|
-
|
|
67
|
-
- `${captureName}` references a test-local captured value.
|
|
68
|
-
- `${env.NAME}` references an environment value.
|
|
69
|
-
- An exact placeholder preserves its JSON type; interpolation into a larger string converts to text.
|
|
70
|
-
- Variables are resolved only in request parameters in the MVP. Target interpolation and centralized secret redaction are required next.
|
|
71
|
-
|
|
72
|
-
Session isolation is the default because order-independent tests are easier to reproduce. Shared sessions may be added only as an explicit opt-in.
|
|
73
|
-
|
|
74
|
-
## 6. Architecture
|
|
75
|
-
|
|
76
|
-
```text
|
|
77
|
-
CLI
|
|
78
|
-
├─ suite loader and validator
|
|
79
|
-
├─ protocol-neutral runner
|
|
80
|
-
│ ├─ variable resolver
|
|
81
|
-
│ ├─ matcher engine
|
|
82
|
-
│ └─ normalized result model
|
|
83
|
-
├─ MCP SDK session
|
|
84
|
-
│ ├─ stdio adapter
|
|
85
|
-
│ └─ Streamable HTTP adapter
|
|
86
|
-
└─ reporters
|
|
87
|
-
├─ terminal
|
|
88
|
-
├─ JSON
|
|
89
|
-
└─ JUnit XML
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
The runner depends on a small `TestSession` interface so fixture sessions and future raw-wire transports can be substituted. The official TypeScript SDK currently performs initialization, protocol validation, framing, and transport lifecycle management.
|
|
93
|
-
|
|
94
|
-
A future monorepo can split stable boundaries into `core`, `cli`, `transport-stdio`, `transport-http`, `conformance`, `reporters`, and `plugin-api` packages. Keeping one package until those boundaries stabilize reduces premature API commitments.
|
|
95
|
-
|
|
96
|
-
## 7. Result and failure semantics
|
|
97
|
-
|
|
98
|
-
Each run records suite status, UTC start time, duration, observed protocol versions, tests, steps, and summary counts. Failures stop the current test after the first failed step but do not stop later tests.
|
|
99
|
-
|
|
100
|
-
Exit codes:
|
|
101
|
-
|
|
102
|
-
- `0`: all selected tests passed
|
|
103
|
-
- `1`: one or more behavioral assertions failed
|
|
104
|
-
- `2`: usage, parsing, or configuration invalid
|
|
105
|
-
- `3`: unexpected infrastructure failure
|
|
106
|
-
|
|
107
|
-
A later version should explicitly distinguish test failure, transport failure, cleanup failure, skipped capability, not applicable, and inconclusive.
|
|
108
|
-
|
|
109
|
-
## 8. Conformance roadmap
|
|
110
|
-
|
|
111
|
-
Versioned profiles should be independently released, for example:
|
|
112
|
-
|
|
113
|
-
```text
|
|
114
|
-
profiles/2025-03-26/lifecycle
|
|
115
|
-
profiles/2025-03-26/tools
|
|
116
|
-
profiles/2025-03-26/resources
|
|
117
|
-
profiles/2025-03-26/prompts
|
|
118
|
-
profiles/2025-03-26/streamable-http
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
Checks should include initialization/version negotiation, declared capability behavior, required response/error shapes, ping, cancellation, pagination, progress, logging, subscriptions, unknown methods, invalid parameters, HTTP session IDs, media types, reconnect, and termination.
|
|
122
|
-
|
|
123
|
-
Report statuses must include pass, fail, capability-skipped, not-applicable, and inconclusive. Integrate official MCP Conformance as a separately pinned run and merge evidence rather than duplicating or rebranding it.
|
|
124
|
-
|
|
125
|
-
## 9. Security requirements
|
|
126
|
-
|
|
127
|
-
Before a public beta:
|
|
128
|
-
|
|
129
|
-
- interpolate target environment and headers without writing secrets into results
|
|
130
|
-
- centralize recursive key/value redaction before reporters
|
|
131
|
-
- cap response, stderr, and report sizes
|
|
132
|
-
- guard regex complexity or document trust assumptions
|
|
133
|
-
- avoid shell command strings; continue using command plus argument arrays
|
|
134
|
-
- ensure bounded graceful subprocess shutdown with force-kill fallback
|
|
135
|
-
- sanitize JUnit and terminal control characters
|
|
136
|
-
- provide opt-in environment inheritance and document its threat model
|
|
137
|
-
|
|
138
|
-
Security scanners should be integrations. MCP Rigor’s core identity remains functional and protocol-aware testing.
|
|
139
|
-
|
|
140
|
-
## 10. Release roadmap
|
|
141
|
-
|
|
142
|
-
### 0.1 — executable MVP
|
|
143
|
-
|
|
144
|
-
Core runner, YAML/JSON suites, stdio/HTTP through official SDK, deterministic matchers, captures, CLI, JSON/JUnit, tests, and docs.
|
|
145
|
-
|
|
146
|
-
### 0.2 — CI reliability
|
|
147
|
-
|
|
148
|
-
Published JSON Schema, complete config validation with Ajv, secret redaction, richer diffs, target interpolation, robust transport classification, GitHub Action, Windows/macOS/Linux CI, and deterministic fixture servers.
|
|
149
|
-
|
|
150
|
-
### 0.3 — MCP-native behavior
|
|
151
|
-
|
|
152
|
-
Notification/event queues, progress and cancellation, pagination helpers, capability requirements, resource subscriptions, logging assertions, JSON Schema matcher, traces, snapshots, and record/sanitize/replay.
|
|
153
|
-
|
|
154
|
-
### 0.4 — ecosystem
|
|
155
|
-
|
|
156
|
-
Versioned conformance profiles, official conformance aggregation, plugin API, reusable fixture packs, security/fuzz hooks, and adapters for common MCP frameworks.
|
|
157
|
-
|
|
158
|
-
### 1.0 criteria
|
|
159
|
-
|
|
160
|
-
Stable suite schema and TypeScript API, two supported protocol revisions, robust process cleanup on three operating systems, transport/auth documentation, migration policy, plugin compatibility policy, reproducible fixture matrix, and no high-severity secret leakage paths.
|
|
161
|
-
|
|
162
|
-
## 11. Open-source operating model
|
|
163
|
-
|
|
164
|
-
- Apache-2.0 for broad individual and enterprise use.
|
|
165
|
-
- Public RFCs for schema or plugin-breaking changes.
|
|
166
|
-
- Conventional changesets and a compatibility table per release.
|
|
167
|
-
- `good first issue` fixtures and matcher additions.
|
|
168
|
-
- Governance should clearly document project ownership, maintainership, and vendor neutrality.
|
|
169
|
-
- Reserve project, npm, GitHub organization, and domain names only after registry and trademark checks.
|
|
170
|
-
|
|
171
|
-
## 12. Success metrics
|
|
172
|
-
|
|
173
|
-
- time from install to first passing stdio test under ten minutes
|
|
174
|
-
- less than 1% flaky failures in deterministic project fixtures
|
|
175
|
-
- clean teardown across Linux, macOS, and Windows
|
|
176
|
-
- projects running MCP Rigor in CI weekly
|
|
177
|
-
- community-contributed reusable suites and transport fixtures
|
|
178
|
-
- issue resolution time and repeat contributor rate
|