Skip to content

Commit 3975c1a

Browse files
authored
Merge pull request #517 from modelcontextprotocol/basil/ajv_downgrade
Fix Ajv import compatibility issue by downgrading to v6
2 parents 69f8ee4 + 4cc8ed4 commit 3975c1a

File tree

3 files changed

+16
-91
lines changed

3 files changed

+16
-91
lines changed

package-lock.json

Lines changed: 12 additions & 88 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"client": "tsx src/cli.ts client"
4747
},
4848
"dependencies": {
49-
"ajv": "^8.17.1",
49+
"ajv": "^6.12.6",
5050
"content-type": "^1.0.5",
5151
"cors": "^2.8.5",
5252
"cross-spawn": "^7.0.5",

src/client/index.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ import {
4343
ErrorCode,
4444
McpError,
4545
} from "../types.js";
46-
import { Ajv, type ValidateFunction } from "ajv";
46+
import Ajv from "ajv";
47+
import type { ValidateFunction } from "ajv";
4748

4849
export type ClientOptions = ProtocolOptions & {
4950
/**
@@ -102,7 +103,7 @@ export class Client<
102103
) {
103104
super(options);
104105
this._capabilities = options?.capabilities ?? {};
105-
this._ajv = new Ajv({ strict: false, validateFormats: true });
106+
this._ajv = new Ajv();
106107
}
107108

108109
/**

0 commit comments

Comments
 (0)