@k08200/mcp-probe 1.0.0 → 1.5.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 +227 -15
- package/dist/assertions.d.ts +11 -0
- package/dist/assertions.d.ts.map +1 -0
- package/dist/assertions.js +156 -0
- package/dist/assertions.js.map +1 -0
- package/dist/checker.d.ts.map +1 -1
- package/dist/checker.js +46 -24
- package/dist/checker.js.map +1 -1
- package/dist/cli.js +102 -1
- package/dist/cli.js.map +1 -1
- package/dist/doctor.d.ts +15 -0
- package/dist/doctor.d.ts.map +1 -0
- package/dist/doctor.js +145 -0
- package/dist/doctor.js.map +1 -0
- package/dist/init.d.ts +22 -0
- package/dist/init.d.ts.map +1 -0
- package/dist/init.js +141 -0
- package/dist/init.js.map +1 -0
- package/dist/issues.d.ts +5 -0
- package/dist/issues.d.ts.map +1 -0
- package/dist/issues.js +126 -0
- package/dist/issues.js.map +1 -0
- package/dist/protocols/mcp-client.d.ts.map +1 -1
- package/dist/protocols/mcp-client.js +39 -19
- package/dist/protocols/mcp-client.js.map +1 -1
- package/dist/redact.d.ts +3 -0
- package/dist/redact.d.ts.map +1 -0
- package/dist/redact.js +34 -0
- package/dist/redact.js.map +1 -0
- package/dist/reporters/github.d.ts.map +1 -1
- package/dist/reporters/github.js +15 -9
- package/dist/reporters/github.js.map +1 -1
- package/dist/reporters/json-reporter.d.ts.map +1 -1
- package/dist/reporters/json-reporter.js +2 -1
- package/dist/reporters/json-reporter.js.map +1 -1
- package/dist/reporters/terminal.d.ts.map +1 -1
- package/dist/reporters/terminal.js +18 -5
- package/dist/reporters/terminal.js.map +1 -1
- package/dist/types.d.ts +25 -3
- package/dist/types.d.ts.map +1 -1
- package/examples/contract-failure.tools.json +24 -0
- package/examples/datadog.tools.json +4 -1
- package/examples/github-actions/fleet.yml +1 -1
- package/examples/github-actions/remote-server.yml +1 -1
- package/examples/github-actions/single-server.yml +1 -1
- package/examples/recipes/datadog.tools.json +7 -2
- package/examples/recipes/gmail.tools.json +6 -2
- package/examples/recipes/supabase.tools.json +18 -2
- package/examples/self-check.tools.json +20 -0
- package/package.json +16 -5
- package/schemas/mcp-probe.config.schema.json +74 -0
- package/schemas/mcp-probe.sidecar.schema.json +68 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json-reporter.js","sourceRoot":"","sources":["../../src/reporters/json-reporter.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"json-reporter.js","sourceRoot":"","sources":["../../src/reporters/json-reporter.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,MAAM,UAAU,UAAU,CAAC,MAAiC;IAC1D,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;AAC9E,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"terminal.d.ts","sourceRoot":"","sources":["../../src/reporters/terminal.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"terminal.d.ts","sourceRoot":"","sources":["../../src/reporters/terminal.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAe,MAAM,aAAa,CAAC;AAgBzE,wBAAgB,cAAc,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI,CAiFxD;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI,CA2B7D"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import chalk from 'chalk';
|
|
2
|
+
import { redactText } from '../redact.js';
|
|
2
3
|
const ICONS = {
|
|
3
4
|
pass: chalk.green('✓'),
|
|
4
5
|
fail: chalk.red('✗'),
|
|
@@ -12,14 +13,18 @@ const COLORS = {
|
|
|
12
13
|
const DIVIDER = chalk.dim('─'.repeat(52));
|
|
13
14
|
export function renderTerminal(report) {
|
|
14
15
|
console.log('');
|
|
15
|
-
console.log(chalk.bold.white('mcp-probe') + ' ' + chalk.dim(report.target));
|
|
16
|
+
console.log(chalk.bold.white('mcp-probe') + ' ' + chalk.dim(redactText(report.target)));
|
|
16
17
|
console.log(DIVIDER);
|
|
17
18
|
for (const check of report.checks) {
|
|
18
19
|
const latency = check.latencyMs !== undefined
|
|
19
20
|
? chalk.dim(` ${check.latencyMs}ms`)
|
|
20
21
|
: '';
|
|
21
22
|
console.log(` ${ICONS[check.status]} ${chalk.bold(check.name)}${latency}`);
|
|
22
|
-
console.log(` ${chalk.dim(check.message)}`);
|
|
23
|
+
console.log(` ${chalk.dim(redactText(check.message))}`);
|
|
24
|
+
if (check.issue) {
|
|
25
|
+
const issue = `${check.issue.code}: ${check.issue.hint}`;
|
|
26
|
+
console.log(` ${chalk.yellow(redactText(issue))}`);
|
|
27
|
+
}
|
|
23
28
|
}
|
|
24
29
|
console.log(DIVIDER);
|
|
25
30
|
if (report.serverInfo) {
|
|
@@ -61,8 +66,16 @@ export function renderTerminal(report) {
|
|
|
61
66
|
const icon = ICONS[r.status];
|
|
62
67
|
const latency = chalk.dim(` ${r.latencyMs}ms`);
|
|
63
68
|
const source = chalk.dim(` [${r.source}]`);
|
|
64
|
-
const err = r.error ? chalk.dim(` — ${r.error.slice(0, 80)}`) : '';
|
|
69
|
+
const err = r.error ? chalk.dim(` — ${redactText(r.error).slice(0, 80)}`) : '';
|
|
65
70
|
console.log(` ${icon} ${chalk.bold(r.tool)}${source}${latency}${err}`);
|
|
71
|
+
if (r.issue) {
|
|
72
|
+
const issue = `${r.issue.code}: ${r.issue.hint}`;
|
|
73
|
+
console.log(` ${chalk.yellow(redactText(issue))}`);
|
|
74
|
+
}
|
|
75
|
+
for (const assertion of r.assertions ?? []) {
|
|
76
|
+
const assertionIcon = ICONS[assertion.status];
|
|
77
|
+
console.log(` ${assertionIcon} ${chalk.dim(`${assertion.name}: ${redactText(assertion.message)}`)}`);
|
|
78
|
+
}
|
|
66
79
|
}
|
|
67
80
|
}
|
|
68
81
|
console.log('');
|
|
@@ -74,7 +87,7 @@ export function renderTerminal(report) {
|
|
|
74
87
|
}
|
|
75
88
|
export function renderBatchTerminal(report) {
|
|
76
89
|
console.log('');
|
|
77
|
-
console.log(chalk.bold.white('mcp-probe batch') + ' ' + chalk.dim(report.target));
|
|
90
|
+
console.log(chalk.bold.white('mcp-probe batch') + ' ' + chalk.dim(redactText(report.target)));
|
|
78
91
|
console.log(DIVIDER);
|
|
79
92
|
for (const server of report.servers) {
|
|
80
93
|
const status = server.report.overallStatus;
|
|
@@ -82,7 +95,7 @@ export function renderBatchTerminal(report) {
|
|
|
82
95
|
const tools = server.report.tools.length;
|
|
83
96
|
const latency = chalk.dim(` ${server.report.totalLatencyMs}ms`);
|
|
84
97
|
console.log(` ${ICONS[status]} ${chalk.bold(server.name)} ${label}${latency}`);
|
|
85
|
-
console.log(chalk.dim(` ${server.report.target} (${tools} tool${tools !== 1 ? 's' : ''})`));
|
|
98
|
+
console.log(chalk.dim(` ${redactText(server.report.target)} (${tools} tool${tools !== 1 ? 's' : ''})`));
|
|
86
99
|
}
|
|
87
100
|
console.log(DIVIDER);
|
|
88
101
|
const passed = report.servers.filter((server) => server.report.overallStatus === 'pass').length;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"terminal.js","sourceRoot":"","sources":["../../src/reporters/terminal.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"terminal.js","sourceRoot":"","sources":["../../src/reporters/terminal.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C,MAAM,KAAK,GAAgC;IACzC,IAAI,EAAE,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC;IACtB,IAAI,EAAE,KAAK,CAAC,GA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K,CAAC,IAAI,CAAC,GAAG,MAAM,SAAS,CAAC,CAAC;IAC/C,IAAI,MAAM,GAAG,CAAC;QAAE,KAAK,CAAC,IAAI,CAAC,GAAG,MAAM,SAAS,CAAC,CAAC;IAE/C,MAAM,MAAM,GAAG,MAAM,CAAC,aAAa,CAAC;IACpC,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;IAC/D,MAAM,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,KAAK,MAAM,CAAC,cAAc,UAAU,CAAC,CAAC;IAC9D,OAAO,CAAC,GAAG,CAAC,KAAK,KAAK,CAAC,MAAM,CAAC,KAAK,KAAK,KAAK,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,KAAK,EAAE,CAAC,CAAC;IACpF,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;AAClB,CAAC"}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
export type CheckStatus = 'pass' | 'fail' | 'warn';
|
|
2
|
+
export type IssueCode = 'NO_TOOLS' | 'TOOL_SCHEMA_INVALID' | 'TOOL_CALL_AUTH' | 'TOOL_CALL_FAILED' | 'TOOL_CALL_TIMEOUT' | 'CONTRACT_ASSERTION_FAILED' | 'AUTO_DRY_RUN_INPUT' | 'SIDECAR_MISSING' | 'SIDECAR_INVALID' | 'HANDSHAKE_TIMEOUT' | 'HANDSHAKE_AUTH' | 'HANDSHAKE_FAILED' | 'TARGET_NOT_FOUND';
|
|
3
|
+
export type Issue = {
|
|
4
|
+
code: IssueCode;
|
|
5
|
+
hint: string;
|
|
6
|
+
docsUrl?: string;
|
|
7
|
+
};
|
|
2
8
|
export type CheckItem = {
|
|
3
9
|
name: string;
|
|
4
10
|
status: CheckStatus;
|
|
5
11
|
message: string;
|
|
6
12
|
latencyMs?: number;
|
|
13
|
+
issue?: Issue;
|
|
7
14
|
};
|
|
8
15
|
export type ToolInfo = {
|
|
9
16
|
name: string;
|
|
@@ -16,12 +23,27 @@ export type ToolCallResult = {
|
|
|
16
23
|
latencyMs: number;
|
|
17
24
|
error?: string;
|
|
18
25
|
source: 'sidecar' | 'auto';
|
|
26
|
+
assertions?: AssertionResult[];
|
|
27
|
+
issue?: Issue;
|
|
28
|
+
};
|
|
29
|
+
export type ExpectedToolStatus = 'pass' | 'fail' | 'warn';
|
|
30
|
+
export type AssertionResult = {
|
|
31
|
+
name: string;
|
|
32
|
+
status: CheckStatus;
|
|
33
|
+
message: string;
|
|
34
|
+
};
|
|
35
|
+
export type ToolExpectations = {
|
|
36
|
+
status?: ExpectedToolStatus;
|
|
37
|
+
not_error_code?: number[];
|
|
38
|
+
requiredFields?: string[];
|
|
39
|
+
maxRows?: number;
|
|
40
|
+
errorCode?: string;
|
|
41
|
+
contains?: string[];
|
|
42
|
+
notContains?: string[];
|
|
19
43
|
};
|
|
20
44
|
export type ToolSidecarEntry = {
|
|
21
45
|
input: Record<string, unknown>;
|
|
22
|
-
expect?:
|
|
23
|
-
not_error_code?: number[];
|
|
24
|
-
};
|
|
46
|
+
expect?: ToolExpectations;
|
|
25
47
|
};
|
|
26
48
|
export type ToolSidecar = {
|
|
27
49
|
tools: Record<string, ToolSidecarEntry>;
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;AAEnD,MAAM,MAAM,SAAS,GAAG;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,WAAW,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","source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WAAW,CAAC;CACvB,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"tools": {
|
|
3
|
+
"db_query": {
|
|
4
|
+
"input": {
|
|
5
|
+
"sql": "select 1 as ok"
|
|
6
|
+
},
|
|
7
|
+
"expect": {
|
|
8
|
+
"status": "pass",
|
|
9
|
+
"requiredFields": ["rowCount", "tenantId"],
|
|
10
|
+
"maxRows": 0
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"db_write": {
|
|
14
|
+
"input": {
|
|
15
|
+
"sql": "delete from users where id = 1"
|
|
16
|
+
},
|
|
17
|
+
"expect": {
|
|
18
|
+
"status": "fail",
|
|
19
|
+
"errorCode": "WRITE_NOT_ALLOWED",
|
|
20
|
+
"notContains": ["DATABASE_URL", "password", "stack"]
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -6,7 +6,10 @@
|
|
|
6
6
|
"timeframe": "1h"
|
|
7
7
|
},
|
|
8
8
|
"expect": {
|
|
9
|
-
"
|
|
9
|
+
"status": "pass",
|
|
10
|
+
"not_error_code": [401, 403],
|
|
11
|
+
"requiredFields": ["source", "freshness"],
|
|
12
|
+
"maxRows": 100
|
|
10
13
|
}
|
|
11
14
|
},
|
|
12
15
|
"metrics_query": {
|
|
@@ -16,7 +19,9 @@
|
|
|
16
19
|
"to": "now"
|
|
17
20
|
},
|
|
18
21
|
"expect": {
|
|
19
|
-
"
|
|
22
|
+
"status": "pass",
|
|
23
|
+
"not_error_code": [401, 403],
|
|
24
|
+
"requiredFields": ["source", "freshness"]
|
|
20
25
|
}
|
|
21
26
|
}
|
|
22
27
|
}
|
|
@@ -5,13 +5,17 @@
|
|
|
5
5
|
"query": "newer_than:7d"
|
|
6
6
|
},
|
|
7
7
|
"expect": {
|
|
8
|
-
"
|
|
8
|
+
"status": "pass",
|
|
9
|
+
"not_error_code": [401, 403],
|
|
10
|
+
"notContains": ["refresh_token", "client_secret"]
|
|
9
11
|
}
|
|
10
12
|
},
|
|
11
13
|
"get_profile": {
|
|
12
14
|
"input": {},
|
|
13
15
|
"expect": {
|
|
14
|
-
"
|
|
16
|
+
"status": "pass",
|
|
17
|
+
"not_error_code": [401, 403],
|
|
18
|
+
"requiredFields": ["emailAddress"]
|
|
15
19
|
}
|
|
16
20
|
}
|
|
17
21
|
}
|
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
"list_projects": {
|
|
4
4
|
"input": {},
|
|
5
5
|
"expect": {
|
|
6
|
-
"
|
|
6
|
+
"status": "pass",
|
|
7
|
+
"not_error_code": [401, 403],
|
|
8
|
+
"requiredFields": ["project_id"]
|
|
7
9
|
}
|
|
8
10
|
},
|
|
9
11
|
"execute_sql": {
|
|
@@ -12,7 +14,21 @@
|
|
|
12
14
|
"query": "select 1 as health_check"
|
|
13
15
|
},
|
|
14
16
|
"expect": {
|
|
15
|
-
"
|
|
17
|
+
"status": "pass",
|
|
18
|
+
"not_error_code": [401, 403],
|
|
19
|
+
"requiredFields": ["rowCount", "limit", "source", "freshness"],
|
|
20
|
+
"maxRows": 100
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"execute_sql_write_denied": {
|
|
24
|
+
"input": {
|
|
25
|
+
"project_id": "YOUR_PROJECT_ID",
|
|
26
|
+
"query": "delete from users where id = 1"
|
|
27
|
+
},
|
|
28
|
+
"expect": {
|
|
29
|
+
"status": "fail",
|
|
30
|
+
"errorCode": "WRITE_NOT_ALLOWED",
|
|
31
|
+
"notContains": ["DATABASE_URL", "password", "stack"]
|
|
16
32
|
}
|
|
17
33
|
}
|
|
18
34
|
}
|
|
@@ -12,6 +12,26 @@
|
|
|
12
12
|
"expect": {
|
|
13
13
|
"not_error_code": [401]
|
|
14
14
|
}
|
|
15
|
+
},
|
|
16
|
+
"db_query": {
|
|
17
|
+
"input": {
|
|
18
|
+
"sql": "select 1 as ok"
|
|
19
|
+
},
|
|
20
|
+
"expect": {
|
|
21
|
+
"status": "pass",
|
|
22
|
+
"requiredFields": ["rowCount", "limit", "source", "freshness"],
|
|
23
|
+
"maxRows": 100
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"db_write": {
|
|
27
|
+
"input": {
|
|
28
|
+
"sql": "delete from users where id = 1"
|
|
29
|
+
},
|
|
30
|
+
"expect": {
|
|
31
|
+
"status": "fail",
|
|
32
|
+
"errorCode": "WRITE_NOT_ALLOWED",
|
|
33
|
+
"notContains": ["DATABASE_URL", "password", "stack"]
|
|
34
|
+
}
|
|
15
35
|
}
|
|
16
36
|
}
|
|
17
37
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@k08200/mcp-probe",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"description": "Quality checker for MCP servers — validates protocol handshake, discovery, tool-call dry-runs, and latency",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
},
|
|
9
9
|
"files": [
|
|
10
10
|
"dist",
|
|
11
|
-
"examples"
|
|
11
|
+
"examples",
|
|
12
|
+
"schemas"
|
|
12
13
|
],
|
|
13
14
|
"scripts": {
|
|
14
15
|
"build": "tsc",
|
|
@@ -22,11 +23,19 @@
|
|
|
22
23
|
"keywords": [
|
|
23
24
|
"mcp",
|
|
24
25
|
"model-context-protocol",
|
|
26
|
+
"mcp-server",
|
|
27
|
+
"mcp-client",
|
|
25
28
|
"ai",
|
|
29
|
+
"agent",
|
|
30
|
+
"agentic",
|
|
26
31
|
"llm",
|
|
27
32
|
"cli",
|
|
33
|
+
"ci",
|
|
34
|
+
"github-actions",
|
|
28
35
|
"testing",
|
|
29
36
|
"validation",
|
|
37
|
+
"readiness",
|
|
38
|
+
"healthcheck",
|
|
30
39
|
"inspector",
|
|
31
40
|
"checker"
|
|
32
41
|
],
|
|
@@ -47,13 +56,15 @@
|
|
|
47
56
|
"ora": "^8.1.0"
|
|
48
57
|
},
|
|
49
58
|
"devDependencies": {
|
|
59
|
+
"@emnapi/core": "^1.10.0",
|
|
60
|
+
"@emnapi/runtime": "^1.10.0",
|
|
50
61
|
"@types/node": "^22.0.0",
|
|
51
|
-
"@vitest/coverage-v8": "^
|
|
62
|
+
"@vitest/coverage-v8": "^4.1.7",
|
|
52
63
|
"tsx": "^4.19.0",
|
|
53
64
|
"typescript": "^5.6.0",
|
|
54
|
-
"vitest": "^
|
|
65
|
+
"vitest": "^4.1.7"
|
|
55
66
|
},
|
|
56
67
|
"engines": {
|
|
57
|
-
"node": ">=
|
|
68
|
+
"node": ">=20.19.0"
|
|
58
69
|
}
|
|
59
70
|
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://raw.githubusercontent.com/k08200/mcp-probe/main/schemas/mcp-probe.config.schema.json",
|
|
4
|
+
"title": "mcp-probe config",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["servers"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"$schema": {
|
|
10
|
+
"type": "string"
|
|
11
|
+
},
|
|
12
|
+
"timeoutMs": {
|
|
13
|
+
"type": "number",
|
|
14
|
+
"minimum": 1,
|
|
15
|
+
"description": "Default timeout in milliseconds."
|
|
16
|
+
},
|
|
17
|
+
"servers": {
|
|
18
|
+
"type": "array",
|
|
19
|
+
"minItems": 1,
|
|
20
|
+
"items": {
|
|
21
|
+
"type": "object",
|
|
22
|
+
"additionalProperties": false,
|
|
23
|
+
"required": ["name", "target"],
|
|
24
|
+
"properties": {
|
|
25
|
+
"name": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"minLength": 1
|
|
28
|
+
},
|
|
29
|
+
"target": {
|
|
30
|
+
"type": "string",
|
|
31
|
+
"minLength": 1,
|
|
32
|
+
"description": "npm package, local file path, or remote MCP URL."
|
|
33
|
+
},
|
|
34
|
+
"serverArgs": {
|
|
35
|
+
"type": "array",
|
|
36
|
+
"items": { "type": "string" }
|
|
37
|
+
},
|
|
38
|
+
"timeoutMs": {
|
|
39
|
+
"type": "number",
|
|
40
|
+
"minimum": 1
|
|
41
|
+
},
|
|
42
|
+
"transport": {
|
|
43
|
+
"enum": ["stdio", "http", "sse"]
|
|
44
|
+
},
|
|
45
|
+
"headers": {
|
|
46
|
+
"type": "object",
|
|
47
|
+
"additionalProperties": { "type": "string" },
|
|
48
|
+
"description": "HTTP headers for remote MCP servers. Supports ${ENV_VAR} interpolation."
|
|
49
|
+
},
|
|
50
|
+
"stderr": {
|
|
51
|
+
"type": "object",
|
|
52
|
+
"additionalProperties": false,
|
|
53
|
+
"properties": {
|
|
54
|
+
"allow": {
|
|
55
|
+
"type": "array",
|
|
56
|
+
"items": { "type": "string" }
|
|
57
|
+
},
|
|
58
|
+
"fatal": {
|
|
59
|
+
"type": "array",
|
|
60
|
+
"items": { "type": "string" }
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"probeTools": {
|
|
65
|
+
"type": "boolean"
|
|
66
|
+
},
|
|
67
|
+
"toolsFile": {
|
|
68
|
+
"type": "string"
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://raw.githubusercontent.com/k08200/mcp-probe/main/schemas/mcp-probe.sidecar.schema.json",
|
|
4
|
+
"title": "mcp-probe tool sidecar",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["tools"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"$schema": {
|
|
10
|
+
"type": "string"
|
|
11
|
+
},
|
|
12
|
+
"tools": {
|
|
13
|
+
"type": "object",
|
|
14
|
+
"minProperties": 1,
|
|
15
|
+
"additionalProperties": {
|
|
16
|
+
"type": "object",
|
|
17
|
+
"additionalProperties": false,
|
|
18
|
+
"required": ["input"],
|
|
19
|
+
"properties": {
|
|
20
|
+
"input": {
|
|
21
|
+
"type": "object",
|
|
22
|
+
"description": "Sample input passed to tools/call."
|
|
23
|
+
},
|
|
24
|
+
"expect": {
|
|
25
|
+
"type": "object",
|
|
26
|
+
"additionalProperties": false,
|
|
27
|
+
"properties": {
|
|
28
|
+
"not_error_code": {
|
|
29
|
+
"type": "array",
|
|
30
|
+
"items": { "type": "number" },
|
|
31
|
+
"description": "HTTP/status codes that should be treated as warnings instead of failures."
|
|
32
|
+
},
|
|
33
|
+
"status": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"enum": ["pass", "fail", "warn"],
|
|
36
|
+
"description": "Expected final status for this tool call. Use fail for negative probes such as denied writes."
|
|
37
|
+
},
|
|
38
|
+
"requiredFields": {
|
|
39
|
+
"type": "array",
|
|
40
|
+
"items": { "type": "string" },
|
|
41
|
+
"description": "Field names that must appear anywhere in the tool result payload."
|
|
42
|
+
},
|
|
43
|
+
"maxRows": {
|
|
44
|
+
"type": "number",
|
|
45
|
+
"minimum": 0,
|
|
46
|
+
"description": "Maximum allowed row count. Uses rowCount, rowsReturned, or common rows/data/items arrays."
|
|
47
|
+
},
|
|
48
|
+
"errorCode": {
|
|
49
|
+
"type": "string",
|
|
50
|
+
"description": "Stable error code expected in an error response."
|
|
51
|
+
},
|
|
52
|
+
"contains": {
|
|
53
|
+
"type": "array",
|
|
54
|
+
"items": { "type": "string" },
|
|
55
|
+
"description": "Text snippets that must appear in the result or error payload."
|
|
56
|
+
},
|
|
57
|
+
"notContains": {
|
|
58
|
+
"type": "array",
|
|
59
|
+
"items": { "type": "string" },
|
|
60
|
+
"description": "Text snippets that must not appear in the result or error payload. Use this to catch leaked internals."
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|