@postman/postman-mcp-server 2.6.1 → 2.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/README.md +236 -80
- package/dist/package.json +11 -10
- package/dist/src/enabledResources.js +9 -3
- package/dist/src/index.js +11 -0
- package/dist/src/tools/createCollection.js +1 -1
- package/dist/src/tools/createCollectionComment.js +1 -1
- package/dist/src/tools/createCollectionFolder.js +1 -1
- package/dist/src/tools/createCollectionRequest.js +257 -93
- package/dist/src/tools/createCollectionResponse.js +415 -4
- package/dist/src/tools/createEnvironment.js +1 -1
- package/dist/src/tools/createFolderComment.js +1 -1
- package/dist/src/tools/createMock.js +1 -1
- package/dist/src/tools/createMonitor.js +1 -1
- package/dist/src/tools/createRequestComment.js +1 -1
- package/dist/src/tools/createResponseComment.js +1 -1
- package/dist/src/tools/createSpec.js +17 -5
- package/dist/src/tools/createSpecFile.js +1 -1
- package/dist/src/tools/createWorkspace.js +6 -2
- package/dist/src/tools/deleteApiCollectionComment.js +1 -1
- package/dist/src/tools/deleteCollectionComment.js +1 -1
- package/dist/src/tools/deleteFolderComment.js +1 -1
- package/dist/src/tools/deleteMock.js +1 -1
- package/dist/src/tools/deletePanElementOrFolder.js +1 -1
- package/dist/src/tools/deleteRequestComment.js +1 -1
- package/dist/src/tools/deleteResponseComment.js +1 -1
- package/dist/src/tools/deleteWorkspace.js +1 -1
- package/dist/src/tools/duplicateCollection.js +1 -1
- package/dist/src/tools/generateCollection.js +3 -3
- package/dist/src/tools/getAllElementsAndFolders.js +1 -1
- package/dist/src/tools/getAuthenticatedUser.js +1 -1
- package/dist/src/tools/getCodeGenerationInstructions.js +17 -11
- package/dist/src/tools/getCollection/getCollectionMap.js +2 -2
- package/dist/src/tools/getMock.js +1 -1
- package/dist/src/tools/getMocks.js +1 -1
- package/dist/src/tools/getSourceCollectionStatus.js +1 -1
- package/dist/src/tools/getTaggedEntities.js +1 -1
- package/dist/src/tools/getWorkspace.js +1 -1
- package/dist/src/tools/getWorkspaces.js +1 -1
- package/dist/src/tools/mergeCollectionFork.js +1 -1
- package/dist/src/tools/patchCollection.js +1 -1
- package/dist/src/tools/patchEnvironment.js +1 -1
- package/dist/src/tools/postPanElementOrFolder.js +1 -1
- package/dist/src/tools/publishDocumentation.js +1 -1
- package/dist/src/tools/pullCollectionChanges.js +4 -2
- package/dist/src/tools/putCollection.js +11 -1
- package/dist/src/tools/putEnvironment.js +1 -1
- package/dist/src/tools/resolveCommentThread.js +1 -1
- package/dist/src/tools/runMonitor.js +1 -1
- package/dist/src/tools/searchPostmanElementsInPrivateNetwork.js +127 -0
- package/dist/src/tools/searchPostmanElementsInPublicNetwork.js +101 -0
- package/dist/src/tools/syncCollectionWithSpec.js +1 -1
- package/dist/src/tools/syncSpecWithCollection.js +1 -1
- package/dist/src/tools/updateApiCollectionComment.js +1 -1
- package/dist/src/tools/updateCollectionComment.js +1 -1
- package/dist/src/tools/updateCollectionFolder.js +1 -1
- package/dist/src/tools/updateCollectionRequest.js +259 -96
- package/dist/src/tools/updateCollectionResponse.js +1 -1
- package/dist/src/tools/updateFolderComment.js +1 -1
- package/dist/src/tools/updateMock.js +1 -1
- package/dist/src/tools/updatePanElementOrFolder.js +1 -1
- package/dist/src/tools/updateRequestComment.js +1 -1
- package/dist/src/tools/updateResponseComment.js +1 -1
- package/dist/src/tools/updateSpecFile.js +1 -1
- package/dist/src/tools/updateWorkspace.js +1 -1
- package/dist/src/tools/utils/templateRenderer.js +23 -0
- package/dist/src/views/getCollections.njk +12 -0
- package/dist/src/views/getWorkspaces.njk +6 -0
- package/package.json +11 -10
- package/dist/src/tools/searchPostmanElements.js +0 -69
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@postman/postman-mcp-server",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.7.1",
|
|
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,22 +27,23 @@
|
|
|
27
27
|
"access": "public"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
31
|
-
"dotenv": "^17.
|
|
32
|
-
"newman": "^6.2.
|
|
30
|
+
"@modelcontextprotocol/sdk": "^1.27.1",
|
|
31
|
+
"dotenv": "^17.3.1",
|
|
32
|
+
"newman": "^6.2.2",
|
|
33
|
+
"nunjucks": "^3.2.4",
|
|
33
34
|
"uuid": "^13.0.0",
|
|
34
35
|
"zod": "^3.25.76"
|
|
35
36
|
},
|
|
36
37
|
"devDependencies": {
|
|
37
|
-
"@eslint/js": "^
|
|
38
|
+
"@eslint/js": "^10.0.1",
|
|
38
39
|
"@types/node": "^24",
|
|
39
|
-
"eslint": "^
|
|
40
|
+
"eslint": "^10.0.2",
|
|
40
41
|
"eslint-config-prettier": "^10.1.8",
|
|
41
|
-
"eslint-plugin-unused-imports": "^4.
|
|
42
|
-
"prettier": "^3.
|
|
42
|
+
"eslint-plugin-unused-imports": "^4.4.1",
|
|
43
|
+
"prettier": "^3.8.1",
|
|
43
44
|
"typescript": "^5.9.3",
|
|
44
|
-
"typescript-eslint": "^8.
|
|
45
|
-
"vitest": "^4.0.
|
|
45
|
+
"typescript-eslint": "^8.56.1",
|
|
46
|
+
"vitest": "^4.0.18"
|
|
46
47
|
},
|
|
47
48
|
"engines": {
|
|
48
49
|
"node": ">=20.0.0"
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { asMcpError, McpError } from './utils/toolHelpers.js';
|
|
3
|
-
export const method = 'searchPostmanElements';
|
|
4
|
-
export const description = 'Searches for Postman elements in the public network.\n\n**When to Use This Tool:**\n- When the user asks for a specific named request (e.g., "find PayPal requests", "search for Stripe API requests")\n- When the user explicitly wants to search the public network\n- Do NOT use this for searching the user\'s own workspaces or collections (use getCollections or getWorkspaces instead)\n\n**Search Scope:**\n- Only searches the public network (public workspaces and collections)\n- Does not search private workspaces, team workspaces, or personal collections\n- Currently supports searching for requests (entityType: "requests")\n';
|
|
5
|
-
export const parameters = z.object({
|
|
6
|
-
entityType: z
|
|
7
|
-
.literal('requests')
|
|
8
|
-
.describe('The type of Postman [entity](https://learning.postman.com/docs/getting-started/basics/postman-elements/) (element) to search for. At this time, this only accepts the `requests` value.'),
|
|
9
|
-
q: z
|
|
10
|
-
.string()
|
|
11
|
-
.min(1)
|
|
12
|
-
.max(512)
|
|
13
|
-
.describe('The query used to search for Postman elements.')
|
|
14
|
-
.optional(),
|
|
15
|
-
publisherIsVerified: z
|
|
16
|
-
.boolean()
|
|
17
|
-
.describe('Filter the search results to only return entities from publishers [verified](https://learning.postman.com/docs/collaborating-in-postman/public-api-network/verify-your-team/) by Postman.')
|
|
18
|
-
.optional(),
|
|
19
|
-
nextCursor: z
|
|
20
|
-
.string()
|
|
21
|
-
.describe('The cursor to get the next set of results in the paginated response. If you pass an invalid value, the API returns empty results.')
|
|
22
|
-
.optional(),
|
|
23
|
-
limit: z
|
|
24
|
-
.number()
|
|
25
|
-
.int()
|
|
26
|
-
.gte(1)
|
|
27
|
-
.lte(10)
|
|
28
|
-
.describe('The max number of search results returned in the response.')
|
|
29
|
-
.default(10),
|
|
30
|
-
});
|
|
31
|
-
export const annotations = {
|
|
32
|
-
title: 'Searches for Postman elements in the public network.\n\n**When to Use This Tool:**\n- When the user asks for a specific named request (e.g., "find PayPal requests", "search for Stripe API requests")\n- When the user explicitly wants to search the public network\n- Do NOT use this for searching the user\'s own workspaces or collections (use getCollections or getWorkspaces instead)\n\n**Search Scope:**\n- Only searches the public network (public workspaces and collections)\n- Does not search private workspaces, team workspaces, or personal collections\n- Currently supports searching for requests (entityType: "requests")\n',
|
|
33
|
-
readOnlyHint: true,
|
|
34
|
-
destructiveHint: false,
|
|
35
|
-
idempotentHint: true,
|
|
36
|
-
};
|
|
37
|
-
export async function handler(args, extra) {
|
|
38
|
-
try {
|
|
39
|
-
const endpoint = `/search/${args.entityType}`;
|
|
40
|
-
const query = new URLSearchParams();
|
|
41
|
-
if (args.q !== undefined)
|
|
42
|
-
query.set('q', String(args.q));
|
|
43
|
-
if (args.publisherIsVerified !== undefined)
|
|
44
|
-
query.set('publisherIsVerified', String(args.publisherIsVerified));
|
|
45
|
-
if (args.nextCursor !== undefined)
|
|
46
|
-
query.set('nextCursor', String(args.nextCursor));
|
|
47
|
-
if (args.limit !== undefined)
|
|
48
|
-
query.set('limit', String(args.limit));
|
|
49
|
-
const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint;
|
|
50
|
-
const options = {
|
|
51
|
-
headers: extra.headers,
|
|
52
|
-
};
|
|
53
|
-
const result = await extra.client.get(url, options);
|
|
54
|
-
return {
|
|
55
|
-
content: [
|
|
56
|
-
{
|
|
57
|
-
type: 'text',
|
|
58
|
-
text: `${typeof result === 'string' ? result : JSON.stringify(result, null, 2)}`,
|
|
59
|
-
},
|
|
60
|
-
],
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
catch (e) {
|
|
64
|
-
if (e instanceof McpError) {
|
|
65
|
-
throw e;
|
|
66
|
-
}
|
|
67
|
-
throw asMcpError(e);
|
|
68
|
-
}
|
|
69
|
-
}
|