@postman/postman-mcp-server 2.4.9 → 2.5.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 +28 -11
- package/dist/package.json +11 -20
- package/dist/src/clients/postman.js +7 -2
- package/dist/src/constants.js +1 -0
- package/dist/src/enabledResources.js +31 -2
- package/dist/src/index.js +7 -4
- package/dist/src/tools/getCodeGenerationInstructions.js +439 -0
- package/dist/src/tools/getCollection/getCollection.js +52 -0
- package/dist/src/tools/getCollection/getCollectionMap.js +101 -0
- package/dist/src/tools/getCollection/index.js +46 -0
- package/dist/src/tools/getCollection.js +1 -52
- package/dist/src/tools/getCollectionMap.js +101 -0
- package/dist/src/tools/runCollection.js +3 -77
- package/dist/src/tools/runner/executor.js +165 -0
- package/dist/src/tools/runner/fetchers.js +33 -0
- package/dist/src/tools/runner/index.js +20 -0
- package/dist/src/tools/runner/models.js +1 -0
- package/dist/src/tools/runner/parsers.js +8 -0
- package/dist/src/tools/runner/telemetry.js +178 -0
- package/dist/src/tools/searchPostmanElements.js +69 -0
- package/package.json +11 -20
- package/dist/src/tools/utils/runner.js +0 -84
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@postman/postman-mcp-server",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.5.2",
|
|
4
4
|
"description": "A simple MCP server to operate on the Postman API",
|
|
5
5
|
"mcpName": "com.postman/postman-mcp-server",
|
|
6
6
|
"main": "dist/src/index.js",
|
|
@@ -27,30 +27,21 @@
|
|
|
27
27
|
"access": "public"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"express": "^5.1.0",
|
|
35
|
-
"newman": "^6.2.1"
|
|
30
|
+
"@modelcontextprotocol/sdk": "^1.22.0",
|
|
31
|
+
"dotenv": "^17.2.3",
|
|
32
|
+
"newman": "^6.2.0",
|
|
33
|
+
"uuid": "^13.0.0"
|
|
36
34
|
},
|
|
37
35
|
"devDependencies": {
|
|
38
|
-
"@eslint/js": "^9.
|
|
39
|
-
"@types/express": "^5.0.3",
|
|
36
|
+
"@eslint/js": "^9.39.1",
|
|
40
37
|
"@types/node": "^24",
|
|
41
|
-
"eslint": "^9.
|
|
38
|
+
"eslint": "^9.39.1",
|
|
42
39
|
"eslint-config-prettier": "^10.1.8",
|
|
43
|
-
"eslint-plugin-
|
|
44
|
-
"eslint-plugin-unused-imports": "^4.2.0",
|
|
45
|
-
"fs-extra": "^11.3.2",
|
|
46
|
-
"jest": "^30.1.3",
|
|
47
|
-
"json-schema-to-zod": "^2.6.1",
|
|
48
|
-
"openapi-types": "^12.1.3",
|
|
40
|
+
"eslint-plugin-unused-imports": "^4.3.0",
|
|
49
41
|
"prettier": "^3.6.2",
|
|
50
|
-
"
|
|
51
|
-
"typescript": "^
|
|
52
|
-
"
|
|
53
|
-
"vitest": "^3.2.4"
|
|
42
|
+
"typescript": "^5.9.3",
|
|
43
|
+
"typescript-eslint": "^8.48.0",
|
|
44
|
+
"vitest": "^4.0.13"
|
|
54
45
|
},
|
|
55
46
|
"engines": {
|
|
56
47
|
"node": ">=20.0.0"
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
export class TestTracker {
|
|
2
|
-
assertions = [];
|
|
3
|
-
totalTests = 0;
|
|
4
|
-
totalPassed = 0;
|
|
5
|
-
totalFailed = 0;
|
|
6
|
-
addAssertion(assertion) {
|
|
7
|
-
this.assertions.push(assertion);
|
|
8
|
-
this.totalTests++;
|
|
9
|
-
if (assertion.passed) {
|
|
10
|
-
this.totalPassed++;
|
|
11
|
-
}
|
|
12
|
-
else {
|
|
13
|
-
this.totalFailed++;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
displayCurrentResults() {
|
|
17
|
-
if (this.assertions.length === 0) {
|
|
18
|
-
return '';
|
|
19
|
-
}
|
|
20
|
-
const lines = [' 📊 Test Results:'];
|
|
21
|
-
this.assertions.forEach((assertion) => {
|
|
22
|
-
const status = assertion.passed ? '✓' : '✗';
|
|
23
|
-
const name = assertion.assertion || assertion.name || 'Unnamed test';
|
|
24
|
-
lines.push(` ${status} ${name}`);
|
|
25
|
-
if (!assertion.passed && assertion.error) {
|
|
26
|
-
const errorMessage = typeof assertion.error === 'string'
|
|
27
|
-
? assertion.error
|
|
28
|
-
: assertion.error.message || 'Unknown error';
|
|
29
|
-
lines.push(` └─ Error: ${errorMessage}`);
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
const passed = this.assertions.filter((a) => a.passed).length;
|
|
33
|
-
const failed = this.assertions.filter((a) => !a.passed).length;
|
|
34
|
-
lines.push(` ────────────────────────────────────────`);
|
|
35
|
-
lines.push(` ${this.assertions.length} tests | ✓ ${passed} passed | ✗ ${failed} failed\n`);
|
|
36
|
-
this.assertions.length = 0;
|
|
37
|
-
return lines.join('\n');
|
|
38
|
-
}
|
|
39
|
-
getTotalStats() {
|
|
40
|
-
return {
|
|
41
|
-
total: this.totalTests,
|
|
42
|
-
passed: this.totalPassed,
|
|
43
|
-
failed: this.totalFailed,
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
reset() {
|
|
47
|
-
this.assertions.length = 0;
|
|
48
|
-
this.totalTests = 0;
|
|
49
|
-
this.totalPassed = 0;
|
|
50
|
-
this.totalFailed = 0;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
export class OutputBuilder {
|
|
54
|
-
lines = [];
|
|
55
|
-
add(line) {
|
|
56
|
-
this.lines.push(line);
|
|
57
|
-
}
|
|
58
|
-
build() {
|
|
59
|
-
return this.lines.join('\n');
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
export function buildNewmanOptions(params, collection, environment) {
|
|
63
|
-
return {
|
|
64
|
-
collection: collection,
|
|
65
|
-
environment: environment,
|
|
66
|
-
iterationCount: params.iterationCount || 1,
|
|
67
|
-
timeout: params.requestTimeout || 60000,
|
|
68
|
-
timeoutRequest: params.requestTimeout || 60000,
|
|
69
|
-
timeoutScript: params.scriptTimeout || 5000,
|
|
70
|
-
delayRequest: 1000,
|
|
71
|
-
ignoreRedirects: false,
|
|
72
|
-
insecure: false,
|
|
73
|
-
bail: params.stopOnFailure ? ['failure'] : false,
|
|
74
|
-
suppressExitCode: true,
|
|
75
|
-
reporters: [],
|
|
76
|
-
reporter: {},
|
|
77
|
-
color: 'off',
|
|
78
|
-
verbose: false,
|
|
79
|
-
requestAgents: {
|
|
80
|
-
http: undefined,
|
|
81
|
-
https: undefined,
|
|
82
|
-
},
|
|
83
|
-
};
|
|
84
|
-
}
|