@yawlabs/mcp-compliance 0.14.0 → 0.14.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/README.md +4 -0
- package/dist/index.js +6 -2
- package/dist/mcp/server.js +6 -2
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -9,6 +9,10 @@
|
|
|
9
9
|
|
|
10
10
|
Built and maintained by [Yaw Labs](https://yaw.sh).
|
|
11
11
|
|
|
12
|
+
[](https://mcp.hosting/install?name=mcp-compliance&command=npx&args=-y%2C%40yawlabs%2Fmcp-compliance&description=Test%20any%20MCP%20server%20against%20the%20spec%20-%2088-test%20suite%20with%20letter-grade%20scoring&source=https%3A%2F%2Fgithub.com%2FYawLabs%2Fmcp-compliance)
|
|
13
|
+
|
|
14
|
+
One click adds this to your [mcp.hosting](https://mcp.hosting) account so it syncs to every MCP client you use. Or install manually below.
|
|
15
|
+
|
|
12
16
|
## Why this tool?
|
|
13
17
|
|
|
14
18
|
MCP servers are multiplying fast — but most ship without compliance testing. Broken transport handling, missing error codes, malformed schemas, and silent capability violations are common. Hand-rolling test scripts is tedious and incomplete.
|
package/dist/index.js
CHANGED
|
@@ -700,7 +700,7 @@ function hasRegressions(summary) {
|
|
|
700
700
|
|
|
701
701
|
// src/mcp/server.ts
|
|
702
702
|
import { existsSync as existsSync2, readFileSync as readFileSync2, realpathSync } from "fs";
|
|
703
|
-
import { dirname, join as join2, resolve as resolve2 } from "path";
|
|
703
|
+
import { basename, dirname, join as join2, resolve as resolve2 } from "path";
|
|
704
704
|
import { fileURLToPath } from "url";
|
|
705
705
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
706
706
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
@@ -4678,7 +4678,11 @@ function isInvokedDirectly() {
|
|
|
4678
4678
|
const argv1 = process.argv[1];
|
|
4679
4679
|
if (!argv1) return false;
|
|
4680
4680
|
try {
|
|
4681
|
-
|
|
4681
|
+
const selfPath = realpathSync(fileURLToPath(import.meta.url));
|
|
4682
|
+
if (realpathSync(argv1) !== selfPath) return false;
|
|
4683
|
+
const file = basename(selfPath);
|
|
4684
|
+
const parent = basename(dirname(selfPath));
|
|
4685
|
+
return parent === "mcp" && (file === "server.js" || file === "server.ts");
|
|
4682
4686
|
} catch {
|
|
4683
4687
|
return false;
|
|
4684
4688
|
}
|
package/dist/mcp/server.js
CHANGED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
|
|
7
7
|
// src/mcp/server.ts
|
|
8
8
|
import { existsSync, readFileSync, realpathSync } from "fs";
|
|
9
|
-
import { dirname, join, resolve } from "path";
|
|
9
|
+
import { basename, dirname, join, resolve } from "path";
|
|
10
10
|
import { fileURLToPath } from "url";
|
|
11
11
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
12
12
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
@@ -215,7 +215,11 @@ function isInvokedDirectly() {
|
|
|
215
215
|
const argv1 = process.argv[1];
|
|
216
216
|
if (!argv1) return false;
|
|
217
217
|
try {
|
|
218
|
-
|
|
218
|
+
const selfPath = realpathSync(fileURLToPath(import.meta.url));
|
|
219
|
+
if (realpathSync(argv1) !== selfPath) return false;
|
|
220
|
+
const file = basename(selfPath);
|
|
221
|
+
const parent = basename(dirname(selfPath));
|
|
222
|
+
return parent === "mcp" && (file === "server.js" || file === "server.ts");
|
|
219
223
|
} catch {
|
|
220
224
|
return false;
|
|
221
225
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yawlabs/mcp-compliance",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.2",
|
|
4
|
+
"mcpName": "io.github.YawLabs/mcp-compliance",
|
|
4
5
|
"description": "CLI tool and MCP server that tests MCP servers for spec compliance",
|
|
5
6
|
"license": "MIT",
|
|
6
7
|
"author": "Yaw Labs <contact@yaw.sh> (https://yaw.sh)",
|