@postman/postman-mcp-server 2.6.0 → 2.7.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.
Files changed (66) hide show
  1. package/README.md +204 -80
  2. package/dist/package.json +2 -1
  3. package/dist/src/enabledResources.js +3 -0
  4. package/dist/src/index.js +11 -0
  5. package/dist/src/tools/createCollection.js +1 -1
  6. package/dist/src/tools/createCollectionComment.js +1 -1
  7. package/dist/src/tools/createCollectionFolder.js +1 -1
  8. package/dist/src/tools/createCollectionRequest.js +1 -1
  9. package/dist/src/tools/createCollectionResponse.js +1 -1
  10. package/dist/src/tools/createEnvironment.js +1 -1
  11. package/dist/src/tools/createFolderComment.js +1 -1
  12. package/dist/src/tools/createMock.js +1 -1
  13. package/dist/src/tools/createMonitor.js +1 -1
  14. package/dist/src/tools/createRequestComment.js +1 -1
  15. package/dist/src/tools/createResponseComment.js +1 -1
  16. package/dist/src/tools/createSpec.js +1 -1
  17. package/dist/src/tools/createSpecFile.js +1 -1
  18. package/dist/src/tools/createWorkspace.js +1 -1
  19. package/dist/src/tools/deleteApiCollectionComment.js +1 -1
  20. package/dist/src/tools/deleteCollectionComment.js +1 -1
  21. package/dist/src/tools/deleteFolderComment.js +1 -1
  22. package/dist/src/tools/deleteMock.js +1 -1
  23. package/dist/src/tools/deletePanElementOrFolder.js +1 -1
  24. package/dist/src/tools/deleteRequestComment.js +1 -1
  25. package/dist/src/tools/deleteResponseComment.js +1 -1
  26. package/dist/src/tools/deleteWorkspace.js +1 -1
  27. package/dist/src/tools/duplicateCollection.js +1 -1
  28. package/dist/src/tools/generateCollection.js +1 -1
  29. package/dist/src/tools/getAllElementsAndFolders.js +1 -1
  30. package/dist/src/tools/getAuthenticatedUser.js +1 -1
  31. package/dist/src/tools/getCodeGenerationInstructions.js +6 -6
  32. package/dist/src/tools/getMock.js +1 -1
  33. package/dist/src/tools/getMocks.js +1 -1
  34. package/dist/src/tools/getSourceCollectionStatus.js +1 -1
  35. package/dist/src/tools/getTaggedEntities.js +1 -1
  36. package/dist/src/tools/getWorkspace.js +1 -1
  37. package/dist/src/tools/getWorkspaces.js +1 -1
  38. package/dist/src/tools/mergeCollectionFork.js +1 -1
  39. package/dist/src/tools/patchCollection.js +1 -1
  40. package/dist/src/tools/patchEnvironment.js +1 -1
  41. package/dist/src/tools/postPanElementOrFolder.js +1 -1
  42. package/dist/src/tools/publishDocumentation.js +1 -1
  43. package/dist/src/tools/pullCollectionChanges.js +1 -1
  44. package/dist/src/tools/putCollection.js +1 -1
  45. package/dist/src/tools/putEnvironment.js +1 -1
  46. package/dist/src/tools/resolveCommentThread.js +1 -1
  47. package/dist/src/tools/runMonitor.js +1 -1
  48. package/dist/src/tools/searchPostmanElements.js +38 -6
  49. package/dist/src/tools/syncCollectionWithSpec.js +1 -1
  50. package/dist/src/tools/syncSpecWithCollection.js +1 -1
  51. package/dist/src/tools/updateApiCollectionComment.js +1 -1
  52. package/dist/src/tools/updateCollectionComment.js +1 -1
  53. package/dist/src/tools/updateCollectionFolder.js +1 -1
  54. package/dist/src/tools/updateCollectionRequest.js +1 -1
  55. package/dist/src/tools/updateCollectionResponse.js +1 -1
  56. package/dist/src/tools/updateFolderComment.js +1 -1
  57. package/dist/src/tools/updateMock.js +1 -1
  58. package/dist/src/tools/updatePanElementOrFolder.js +1 -1
  59. package/dist/src/tools/updateRequestComment.js +1 -1
  60. package/dist/src/tools/updateResponseComment.js +1 -1
  61. package/dist/src/tools/updateSpecFile.js +1 -1
  62. package/dist/src/tools/updateWorkspace.js +1 -1
  63. package/dist/src/tools/utils/templateRenderer.js +23 -0
  64. package/dist/src/views/getCollections.njk +12 -0
  65. package/dist/src/views/getWorkspaces.njk +6 -0
  66. package/package.json +2 -1
@@ -65,7 +65,7 @@ export const parameters = z.object({
65
65
  ]),
66
66
  });
67
67
  export const annotations = {
68
- title: "Updates an element or folder in your team's [Private API Network](https://learning.postman.com/docs/collaborating-in-postman/adding-private-network/).\n\n**Note:**\n\nYou can only pass one element object type per call. For example, you cannot pass both \\`api\\` and \\`collection\\` in a single request.\n",
68
+ title: "Updates an element or folder in your team's [Private API Network](https://learning.postman.com/docs/collaborating-in-postman/adding-private-network/).",
69
69
  readOnlyHint: false,
70
70
  destructiveHint: false,
71
71
  idempotentHint: true,
@@ -22,7 +22,7 @@ export const parameters = z.object({
22
22
  .optional(),
23
23
  });
24
24
  export const annotations = {
25
- title: 'Updates a comment on a request.\n\n**Note:**\n\nThis endpoint accepts a max of 10,000 characters.\n',
25
+ title: 'Updates a comment on a request.',
26
26
  readOnlyHint: false,
27
27
  destructiveHint: false,
28
28
  idempotentHint: true,
@@ -22,7 +22,7 @@ export const parameters = z.object({
22
22
  .optional(),
23
23
  });
24
24
  export const annotations = {
25
- title: 'Updates a comment on a response.\n\n**Note:**\n\nThis endpoint accepts a max of 10,000 characters.\n',
25
+ title: 'Updates a comment on a response.',
26
26
  readOnlyHint: false,
27
27
  destructiveHint: false,
28
28
  idempotentHint: true,
@@ -14,7 +14,7 @@ export const parameters = z.object({
14
14
  content: z.string().describe("The specification's stringified contents.").optional(),
15
15
  });
16
16
  export const annotations = {
17
- title: "Updates an API specification's file.\n\n**Note:**\n\n- This endpoint does not accept an empty request body. You must pass one of the accepted values.\n- This endpoint does not accept multiple request body properties in a single call. For example, you cannot pass both the \\`content\\` and \\`type\\` property at the same time.\n- Multi-file specifications can only have one root file.\n- When updating a file type to \\`ROOT\\`, the previous root file is updated to the \\`DEFAULT\\` file type.\n- Files cannot exceed a maximum of 10 MB in size.\n",
17
+ title: "Updates an API specification's file.",
18
18
  readOnlyHint: false,
19
19
  destructiveHint: false,
20
20
  idempotentHint: true,
@@ -18,7 +18,7 @@ export const parameters = z.object({
18
18
  .optional(),
19
19
  });
20
20
  export const annotations = {
21
- title: 'Updates a workspace.\n\n**Note:**\n\n- There are rate limits when publishing public workspaces.\n- Public team workspace names must be unique.\n\n### Important\n\nWe deprecated linking collections or environments between workspaces. We do not recommend that you do this.\n\nIf you have a linked collection or environment, note the following:\n- The endpoint does not create a clone of a collection or environment.\n- Any changes you make to a linked collection or environment changes them in all workspaces.\n- If you delete a collection or environment linked between workspaces, the system deletes it in all the workspaces.\n',
21
+ title: 'Updates a workspace.',
22
22
  readOnlyHint: false,
23
23
  destructiveHint: false,
24
24
  idempotentHint: true,
@@ -0,0 +1,23 @@
1
+ import { existsSync } from 'node:fs';
2
+ import { join } from 'node:path';
3
+ import nunjucks from 'nunjucks';
4
+ export function createTemplateRenderer(viewsDir) {
5
+ const env = nunjucks.configure(viewsDir, {
6
+ autoescape: false,
7
+ noCache: false,
8
+ throwOnUndefined: false,
9
+ });
10
+ env.addFilter('default', (val, defaultVal = '') => val === undefined || val === null ? defaultVal : val);
11
+ return (toolName, rawText) => {
12
+ const templatePath = join(viewsDir, `${toolName}.njk`);
13
+ if (!existsSync(templatePath))
14
+ return null;
15
+ try {
16
+ const data = JSON.parse(rawText);
17
+ return env.render(`${toolName}.njk`, data);
18
+ }
19
+ catch {
20
+ return null;
21
+ }
22
+ };
23
+ }
@@ -0,0 +1,12 @@
1
+ # Collections
2
+
3
+ ## Meta
4
+
5
+ - **total**: {{ meta.total }}
6
+ - **offset**: {{ meta.offset }}
7
+ - **limit**: {{ meta.limit }}
8
+
9
+ | id | name | owner | createdAt | updatedAt | uid | fork | isPublic |
10
+ |---|---|---|---|---|---|---|---|
11
+ {% for item in collections %}| {{ item.id }} | {{ item.name }} | {{ item.owner }} | {{ item.createdAt }} | {{ item.updatedAt }} | {{ item.uid }} | {{ item.fork | dump }} | {{ item.isPublic }} |
12
+ {% endfor %}
@@ -0,0 +1,6 @@
1
+ # Workspaces
2
+
3
+ | id | name | type | visibility | createdBy | scim |
4
+ |---|---|---|---|---|---|
5
+ {% for item in workspaces %}| {{ item.id }} | {{ item.name }} | {{ item.type }} | {{ item.visibility }} | {{ item.createdBy }} | {{ item.scim | dump }} |
6
+ {% endfor %}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@postman/postman-mcp-server",
3
- "version": "2.6.0",
3
+ "version": "2.7.0",
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",
@@ -30,6 +30,7 @@
30
30
  "@modelcontextprotocol/sdk": "^1.25.2",
31
31
  "dotenv": "^17.2.3",
32
32
  "newman": "^6.2.0",
33
+ "nunjucks": "^3.2.4",
33
34
  "uuid": "^13.0.0",
34
35
  "zod": "^3.25.76"
35
36
  },