@mcpdesc/validator 0.6.0 → 0.7.1
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 +20 -1
- package/MODIFICATIONS.md +9 -0
- package/ORIGIN.md +28 -6
- package/README.md +51 -16
- package/package.json +7 -3
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,23 @@ Dates for published releases are the UTC publication dates recorded by npm.
|
|
|
8
8
|
|
|
9
9
|
## [Unreleased]
|
|
10
10
|
|
|
11
|
+
## [0.7.1] - 2026-09-02
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
|
|
15
|
+
- Added an explicit package-specific homepage and expanded the README with the
|
|
16
|
+
validator's purpose, boundaries, result model, installation, and newest-first
|
|
17
|
+
snapshot support.
|
|
18
|
+
|
|
19
|
+
## [0.7.0] - 2026-09-02
|
|
20
|
+
|
|
21
|
+
### Changed
|
|
22
|
+
|
|
23
|
+
- Moved package maintenance and publication from the MCP Description
|
|
24
|
+
specification repository to the MCP Description tooling repository without
|
|
25
|
+
changing public APIs, immutable snapshots, diagnostics, or validation
|
|
26
|
+
behavior.
|
|
27
|
+
|
|
11
28
|
## [0.6.0] - 2026-09-02
|
|
12
29
|
|
|
13
30
|
### Added
|
|
@@ -62,7 +79,9 @@ Dates for published releases are the UTC publication dates recorded by npm.
|
|
|
62
79
|
- Added synchronous structural and semantic validation for parsed JavaScript values with deterministic diagnostics and exact selector dispatch.
|
|
63
80
|
- Added ESM browser support, TypeScript declarations, embedded schema provenance, frozen fixtures, and package-content checks.
|
|
64
81
|
|
|
65
|
-
[Unreleased]: https://github.com/mcpdesc/
|
|
82
|
+
[Unreleased]: https://github.com/mcpdesc/core/compare/validator-v0.7.1...HEAD
|
|
83
|
+
[0.7.1]: https://github.com/mcpdesc/core/compare/validator-v0.7.0...validator-v0.7.1
|
|
84
|
+
[0.7.0]: https://github.com/mcpdesc/core/releases/tag/validator-v0.7.0
|
|
66
85
|
[0.6.0]: https://github.com/mcpdesc/mcpdesc-specification/compare/validator-v0.5.0...validator-v0.6.0
|
|
67
86
|
[0.5.0]: https://github.com/mcpdesc/mcpdesc-specification/compare/17cc533e79b19ea2dbc1edcf06e30ba68a7d9b79...validator-v0.5.0
|
|
68
87
|
[0.4.0]: https://www.npmjs.com/package/@mcpdesc/validator/v/0.4.0
|
package/MODIFICATIONS.md
CHANGED
|
@@ -4,6 +4,15 @@ This file records material imported from `cisco-open/mcptoolkit-contract` and su
|
|
|
4
4
|
|
|
5
5
|
The exact source repository and commit are recorded in [`ORIGIN.md`](ORIGIN.md).
|
|
6
6
|
|
|
7
|
+
## Validator repository migration — 2026-09-02
|
|
8
|
+
|
|
9
|
+
The complete `@mcpdesc/validator@0.6.0` package source and package-local tests
|
|
10
|
+
were moved from `mcpdesc/mcpdesc-specification` commit
|
|
11
|
+
`6eb1b54330f8b7dc11468c7e31614214c7521cd0` into `mcpdesc/core`. Package metadata,
|
|
12
|
+
release documentation, and repository guidance were updated for the new
|
|
13
|
+
maintenance location. Existing immutable snapshot implementations, embedded
|
|
14
|
+
schemas, frozen fixtures, diagnostics, and runtime behavior were not changed.
|
|
15
|
+
|
|
7
16
|
## Repository bootstrap — 2026-07-28
|
|
8
17
|
|
|
9
18
|
| File or path | Change | Reason |
|
package/ORIGIN.md
CHANGED
|
@@ -1,11 +1,30 @@
|
|
|
1
1
|
# Origin and provenance
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
## Validator repository migration
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
`@mcpdesc/validator` versions through `0.6.0` were maintained in the MCP
|
|
6
|
+
Description specification repository. Version `0.7.0` moves the package to the
|
|
7
|
+
MCP Description tooling repository without changing its public API or the
|
|
8
|
+
behavior and bytes of its published immutable snapshot implementations.
|
|
9
|
+
|
|
10
|
+
| Field | Value |
|
|
11
|
+
|---|---|
|
|
12
|
+
| Source repository | `https://github.com/mcpdesc/mcpdesc-specification` |
|
|
13
|
+
| Source commit | `6eb1b54330f8b7dc11468c7e31614214c7521cd0` |
|
|
14
|
+
| Source package | `packages/validator` (`@mcpdesc/validator@0.6.0`) |
|
|
15
|
+
| Destination repository | `https://github.com/mcpdesc/core` |
|
|
16
|
+
| Destination package | `packages/validator` |
|
|
17
|
+
| Migration date | `2026-09-02` |
|
|
18
|
+
|
|
19
|
+
The specification repository continues to own normative text, canonical
|
|
20
|
+
schemas, and mutable draft fixtures. This package owns executable validation,
|
|
21
|
+
immutable runtime snapshots, frozen package-test fixtures, and its public API.
|
|
22
|
+
|
|
23
|
+
MCP Description v0.7.0 originated in the Cisco Open `mcptoolkit-contract`
|
|
24
|
+
repository and remains the current stable release as of 2026-07-28. The
|
|
25
|
+
specification repository imported that material as the basis for v0.8.0
|
|
26
|
+
community work and created the validator package from it. Neither repository
|
|
27
|
+
migration is a copyright assignment or donation.
|
|
9
28
|
|
|
10
29
|
## Source import
|
|
11
30
|
|
|
@@ -17,4 +36,7 @@ existing contributions.
|
|
|
17
36
|
| Method | History-preserving filtered import (`git-filter-repo`); commit hashes rewritten by path filtering |
|
|
18
37
|
| Imported paths | `spec/**`, `schemas/mcp-description/**`, `schemas/latest.json`, `LICENSE`, `NOTICE` |
|
|
19
38
|
|
|
20
|
-
The imported v0.7.0 JSON Schemas are preserved byte-for-byte
|
|
39
|
+
The imported v0.7.0 JSON Schemas are preserved byte-for-byte in their immutable
|
|
40
|
+
validator snapshots. The v0.7.0 specification text is not stored here; its
|
|
41
|
+
canonical source remains the upstream repository above. Changes to imported
|
|
42
|
+
material are recorded in [`MODIFICATIONS.md`](MODIFICATIONS.md) and Git history.
|
package/README.md
CHANGED
|
@@ -1,34 +1,60 @@
|
|
|
1
1
|
# @mcpdesc/validator
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Validate parsed MCP Description documents against exact, immutable specification
|
|
4
|
+
snapshots. The package:
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
- checks document structure against the snapshot's embedded JSON Schema;
|
|
7
|
+
- applies semantic rules that JSON Schema alone cannot express;
|
|
8
|
+
- returns deterministic error and warning diagnostics with document paths; and
|
|
9
|
+
- runs synchronously and offline in Node.js 20+ and browser bundles.
|
|
6
10
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
| `0.8.0-draft.3` | `v0.8.0-draft.3` | `8823c1f1946360b2a44d00920e2092e5e4acd139a1964befad4eb0bf3ce96002` |
|
|
12
|
-
| `0.8.0-draft.4` | `v0.8.0-draft.4` | `93ed03f74059b5b3ce7509a96b59161bdab2c3cf7734397a9bec5a7588d0b03b` |
|
|
13
|
-
| `0.8.0-rc.1` | `v0.8.0-rc.1` | `936a0f24ade501fcabf3d6498c0440c445daa672a575573a35954cee49430ac4` |
|
|
11
|
+
Use it when accepting, generating, migrating, or transforming MCP Description
|
|
12
|
+
documents and you need to know whether the result conforms to a specific
|
|
13
|
+
published draft or release candidate. It validates MCP Description documents,
|
|
14
|
+
not live MCP servers or MCP protocol messages.
|
|
14
15
|
|
|
15
|
-
|
|
16
|
+
## Install
|
|
16
17
|
|
|
17
|
-
|
|
18
|
+
```bash
|
|
19
|
+
npm install @mcpdesc/validator
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Quick start
|
|
18
23
|
|
|
19
24
|
```js
|
|
20
25
|
import { validateMcpDescription } from '@mcpdesc/validator';
|
|
21
26
|
|
|
22
27
|
const result = validateMcpDescription(parsedDocument, {
|
|
23
|
-
specification: '0.8.0-rc.1'
|
|
28
|
+
specification: '0.8.0-rc.1',
|
|
24
29
|
});
|
|
25
30
|
|
|
31
|
+
for (const diagnostic of result.diagnostics) {
|
|
32
|
+
console.log(diagnostic.severity, diagnostic.path, diagnostic.message);
|
|
33
|
+
}
|
|
34
|
+
|
|
26
35
|
if (!result.valid) {
|
|
27
|
-
|
|
36
|
+
// At least one error diagnostic was returned.
|
|
28
37
|
}
|
|
29
38
|
```
|
|
30
39
|
|
|
31
|
-
Callers provide an already parsed JavaScript value. JSON and YAML parsing
|
|
40
|
+
Callers provide an already parsed JavaScript value. JSON and YAML parsing, file
|
|
41
|
+
access, network access, and live-server inspection are outside this package.
|
|
42
|
+
The exact `specification` selector is required so validation never changes when
|
|
43
|
+
a later draft is published.
|
|
44
|
+
|
|
45
|
+
## Supported snapshots
|
|
46
|
+
|
|
47
|
+
Version `0.7.1` supports these immutable snapshots, newest first:
|
|
48
|
+
|
|
49
|
+
| Selector | Tag | Embedded schema SHA-256 |
|
|
50
|
+
|---|---|---|
|
|
51
|
+
| `0.8.0-rc.1` | `v0.8.0-rc.1` | `936a0f24ade501fcabf3d6498c0440c445daa672a575573a35954cee49430ac4` |
|
|
52
|
+
| `0.8.0-draft.4` | `v0.8.0-draft.4` | `93ed03f74059b5b3ce7509a96b59161bdab2c3cf7734397a9bec5a7588d0b03b` |
|
|
53
|
+
| `0.8.0-draft.3` | `v0.8.0-draft.3` | `8823c1f1946360b2a44d00920e2092e5e4acd139a1964befad4eb0bf3ce96002` |
|
|
54
|
+
| `0.8.0-draft.2` | `v0.8.0-draft.2` | `ab692c1a5a0f7e5f29be1940aa8c64a56d4620be0a19d00cf0a64680b7e517fa` |
|
|
55
|
+
| `0.8.0-draft.1` | `v0.8.0-draft.1` | `4ceb6042c3fd31703199cd3db869ec5c35c17d2fe9ab7b2f5b96a2a3af0cebe4` |
|
|
56
|
+
|
|
57
|
+
## Usage
|
|
32
58
|
|
|
33
59
|
The `options` argument and exact `specification` selector are required. The unqualified selector `0.8.0` is intentionally unsupported because draft and release-candidate iterations are immutable compatibility contracts.
|
|
34
60
|
|
|
@@ -113,7 +139,8 @@ The runtime bundles its schema, performs no network fetches for external schema
|
|
|
113
139
|
|
|
114
140
|
## Snapshot lifecycle
|
|
115
141
|
|
|
116
|
-
For each approved specification snapshot, maintainers
|
|
142
|
+
For each approved specification snapshot, maintainers import artifacts from an
|
|
143
|
+
exact specification repository tag or commit and then:
|
|
117
144
|
|
|
118
145
|
1. Add a versioned implementation under `src/snapshots/<selector>/` with its exact selector, snapshot tag, embedded schema, schema SHA-256 digest, and semantic rules. Existing snapshot directories remain unchanged.
|
|
119
146
|
2. Freeze the matching fixture corpus under `test/snapshots/<selector>/fixtures/`. Package tests must not read mutable `spec/draft/fixtures/` for an already published selector.
|
|
@@ -122,7 +149,15 @@ For each approved specification snapshot, maintainers:
|
|
|
122
149
|
|
|
123
150
|
The test snapshots are repository-only development assets and are excluded from the npm tarball. Runtime snapshot implementations and embedded schemas do ship so installed packages remain self-contained.
|
|
124
151
|
|
|
125
|
-
|
|
152
|
+
Specification approval and imported supporting code do not authorize package
|
|
153
|
+
publication. During release review, a maintainer explicitly decides the
|
|
154
|
+
validator package version and npm dist-tag, reviews the exact imported source
|
|
155
|
+
and frozen fixture provenance, runs the full checks, and inspects the tarball.
|
|
156
|
+
The trusted-publishing workflow requires an annotated
|
|
157
|
+
`validator-v<semver>` tag whose version matches this package and whose commit is
|
|
158
|
+
the current `origin/main` tip. It publishes SemVer prereleases with npm `next`
|
|
159
|
+
and stable versions with `latest`. Scripts and other CI workflows do not choose
|
|
160
|
+
versions, create tags, or publish packages.
|
|
126
161
|
|
|
127
162
|
## Development checks
|
|
128
163
|
|
package/package.json
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mcpdesc/validator",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.1",
|
|
4
4
|
"description": "Structural and semantic validation for MCP Description snapshots",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "./index.d.ts",
|
|
7
7
|
"license": "Apache-2.0",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
10
|
-
"url": "git+https://github.com/mcpdesc/
|
|
10
|
+
"url": "git+https://github.com/mcpdesc/core.git",
|
|
11
11
|
"directory": "packages/validator"
|
|
12
12
|
},
|
|
13
|
+
"homepage": "https://github.com/mcpdesc/core/tree/main/packages/validator#readme",
|
|
14
|
+
"bugs": "https://github.com/mcpdesc/core/issues",
|
|
13
15
|
"engines": {
|
|
14
16
|
"node": ">=20"
|
|
15
17
|
},
|
|
@@ -41,7 +43,9 @@
|
|
|
41
43
|
],
|
|
42
44
|
"scripts": {
|
|
43
45
|
"build:standalone": "node scripts/build-standalone.mjs",
|
|
44
|
-
"
|
|
46
|
+
"check:snapshots": "node scripts/check-snapshot-integrity.mjs",
|
|
47
|
+
"import:snapshot": "node scripts/import-snapshot.mjs",
|
|
48
|
+
"test": "npm run check:snapshots && npm run build:standalone && node --test test/*.test.js && npm run test:types && npm run test:browser && npm run test:package",
|
|
45
49
|
"test:browser": "node scripts/check-browser-bundle.mjs",
|
|
46
50
|
"test:package": "node scripts/check-package.mjs",
|
|
47
51
|
"test:types": "tsc --project test/types/tsconfig.json && node scripts/check-declarations.mjs"
|