@postman/postman-mcp-server 2.7.0 → 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 CHANGED
@@ -590,6 +590,38 @@ To install the MCP server as a Gemini CLI extension, run the following command i
590
590
  gemini extensions install https://github.com/postmanlabs/postman-mcp-server
591
591
  ```
592
592
 
593
+ ### Install in Kiro
594
+
595
+ To use the Postman MCP Server in Kiro, you can use one of the following methods:
596
+
597
+ To set up the Postman MCP Server with one-click, see [API Testing with Postman](https://kiro.dev/powers/) on the Kiro Powers page. Click **Add to Kiro**.
598
+
599
+ To install the Postman MCP Server manually, do the following:
600
+
601
+ 1. Launch Kiro and click the Kiro ghost icon in the left sidebar.
602
+ 1. Add an MCP Server and select either **User Config** or **Workspace Config** to install the Postman MCP server.
603
+ 1. Add the following JSON block to the `mcp.json` configuration file:
604
+
605
+ ```json wordWrap
606
+ {
607
+ "mcpServers": {
608
+ "postman": {
609
+ "command": "npx",
610
+ "args": [
611
+ "@postman/postman-mcp-server"
612
+ ],
613
+ "env": {
614
+ "POSTMAN_API_KEY": "postman-api-key"
615
+ },
616
+ "disabled": false,
617
+ "autoApprove": [
618
+ "getAuthenticatedUser"
619
+ ]
620
+ }
621
+ }
622
+ }
623
+ ```
624
+
593
625
  ### Install in Docker
594
626
 
595
627
  For Docker set up and installation, see [DOCKER.md](./DOCKER.md).
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@postman/postman-mcp-server",
3
- "version": "2.7.0",
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,23 +27,23 @@
27
27
  "access": "public"
28
28
  },
29
29
  "dependencies": {
30
- "@modelcontextprotocol/sdk": "^1.25.2",
31
- "dotenv": "^17.2.3",
32
- "newman": "^6.2.0",
30
+ "@modelcontextprotocol/sdk": "^1.27.1",
31
+ "dotenv": "^17.3.1",
32
+ "newman": "^6.2.2",
33
33
  "nunjucks": "^3.2.4",
34
34
  "uuid": "^13.0.0",
35
35
  "zod": "^3.25.76"
36
36
  },
37
37
  "devDependencies": {
38
- "@eslint/js": "^9.39.1",
38
+ "@eslint/js": "^10.0.1",
39
39
  "@types/node": "^24",
40
- "eslint": "^9.39.1",
40
+ "eslint": "^10.0.2",
41
41
  "eslint-config-prettier": "^10.1.8",
42
- "eslint-plugin-unused-imports": "^4.3.0",
43
- "prettier": "^3.6.2",
42
+ "eslint-plugin-unused-imports": "^4.4.1",
43
+ "prettier": "^3.8.1",
44
44
  "typescript": "^5.9.3",
45
- "typescript-eslint": "^8.48.0",
46
- "vitest": "^4.0.13"
45
+ "typescript-eslint": "^8.56.1",
46
+ "vitest": "^4.0.18"
47
47
  },
48
48
  "engines": {
49
49
  "node": ">=20.0.0"
@@ -112,7 +112,8 @@ const full = [
112
112
  'deleteApiCollectionComment',
113
113
  'deleteSpecFile',
114
114
  'getEnabledTools',
115
- 'searchPostmanElements',
115
+ 'searchPostmanElementsInPublicNetwork',
116
+ 'searchPostmanElementsInPrivateNetwork',
116
117
  ];
117
118
  const minimal = [
118
119
  'createCollection',
@@ -152,7 +153,7 @@ const minimal = [
152
153
  'createCollectionRequest',
153
154
  'createCollectionResponse',
154
155
  'duplicateCollection',
155
- 'getStatusOfAnAsyncApiTask',
156
+ 'getDuplicateCollectionTaskStatus',
156
157
  'runCollection',
157
158
  'getEnabledTools',
158
159
  'updateCollectionRequest',
@@ -161,7 +162,7 @@ const code = [
161
162
  'getCodeGenerationInstructions',
162
163
  'getWorkspace',
163
164
  'getWorkspaces',
164
- 'searchPostmanElements',
165
+ 'searchPostmanElementsInPublicNetwork',
165
166
  'getCollectionRequest',
166
167
  'getCollectionResponse',
167
168
  'getCollectionFolder',
@@ -169,6 +170,7 @@ const code = [
169
170
  'getCollection',
170
171
  'getEnvironment',
171
172
  'getEnvironments',
173
+ 'searchPostmanElementsInPrivateNetwork',
172
174
  ];
173
175
  const excludedFromGeneration = [
174
176
  'runCollection',
@@ -176,7 +178,8 @@ const excludedFromGeneration = [
176
178
  'getCodeGenerationInstructions',
177
179
  'getCollectionMap',
178
180
  'getCollection',
179
- 'searchPostmanElements',
181
+ 'searchPostmanElementsInPublicNetwork',
182
+ 'searchPostmanElementsInPrivateNetwork',
180
183
  ];
181
184
  const subtools = {
182
185
  getCollection: {
@@ -10,7 +10,7 @@ export const parameters = z.object({
10
10
  .describe('The folder ID in which to create the request. By default, the system will create the request at the collection level.')
11
11
  .optional(),
12
12
  name: z.string().describe('Name of the request').optional(),
13
- description: z.string().nullable().optional(),
13
+ description: z.string().nullable().describe("The request's description.").optional(),
14
14
  method: z
15
15
  .enum([
16
16
  'GET',
@@ -30,55 +30,87 @@ export const parameters = z.object({
30
30
  'VIEW',
31
31
  ])
32
32
  .nullable()
33
+ .describe("The request's HTTP method.")
33
34
  .optional(),
34
- url: z.string().nullable().optional(),
35
+ url: z.string().nullable().describe("The request's URL.").optional(),
35
36
  headerData: z
36
37
  .array(z.object({
37
- key: z.string().optional(),
38
- value: z.string().optional(),
39
- description: z.string().nullable().optional(),
38
+ key: z.string().describe("The header's key.").optional(),
39
+ value: z.string().describe("The header's value.").optional(),
40
+ description: z.string().nullable().describe("The header's description.").optional(),
40
41
  }))
42
+ .describe("The request's headers.")
41
43
  .optional(),
42
44
  queryParams: z
43
45
  .array(z.object({
44
- key: z.string().optional(),
45
- value: z.string().optional(),
46
- description: z.string().nullable().optional(),
47
- enabled: z.boolean().optional(),
46
+ key: z.string().describe("The query parameter's key.").optional(),
47
+ value: z.string().describe("The query parameter's value.").optional(),
48
+ description: z
49
+ .string()
50
+ .nullable()
51
+ .describe("The query parameter's description.")
52
+ .optional(),
53
+ enabled: z.boolean().describe('If true, the query parameter is enabled.').optional(),
48
54
  }))
55
+ .describe("The request's query parameters.")
56
+ .optional(),
57
+ dataMode: z
58
+ .enum(['raw', 'urlencoded', 'formdata', 'binary', 'graphql'])
59
+ .nullable()
60
+ .describe("The request body's data mode.")
49
61
  .optional(),
50
- dataMode: z.enum(['raw', 'urlencoded', 'formdata', 'binary', 'graphql']).nullable().optional(),
51
62
  data: z
52
63
  .array(z.object({
53
- key: z.string().optional(),
54
- value: z.string().optional(),
55
- description: z.string().nullable().optional(),
56
- enabled: z.boolean().optional(),
57
- type: z.enum(['text', 'file']).optional(),
58
- uuid: z.string().optional(),
64
+ key: z.string().describe("The form data's key.").optional(),
65
+ value: z.string().describe("The form data's value.").optional(),
66
+ description: z.string().nullable().describe("The form data's description.").optional(),
67
+ enabled: z.boolean().describe('If true, the form data entry is enabled.').optional(),
68
+ type: z.enum(['text', 'file']).describe("The form data's type.").optional(),
69
+ uuid: z.string().describe("The form data entry's unique identifier.").optional(),
59
70
  }))
60
71
  .nullable()
72
+ .describe("The request body's form data.")
61
73
  .optional(),
62
- rawModeData: z.string().nullable().optional(),
74
+ rawModeData: z.string().nullable().describe("The request body's raw mode data.").optional(),
63
75
  graphqlModeData: z
64
- .object({ query: z.string().optional(), variables: z.string().optional() })
76
+ .object({
77
+ query: z.string().describe('The GraphQL query.').optional(),
78
+ variables: z.string().describe('The GraphQL query variables, in JSON format.').optional(),
79
+ })
65
80
  .nullable()
81
+ .describe("The request body's GraphQL mode data.")
66
82
  .optional(),
67
83
  dataOptions: z
68
84
  .object({
69
- raw: z.record(z.string(), z.unknown()).optional(),
70
- urlencoded: z.record(z.string(), z.unknown()).optional(),
71
- params: z.record(z.string(), z.unknown()).optional(),
72
- binary: z.record(z.string(), z.unknown()).optional(),
73
- graphql: z.record(z.string(), z.unknown()).optional(),
85
+ raw: z
86
+ .object({ language: z.string().describe("The raw mode data's language type.").optional() })
87
+ .catchall(z.unknown())
88
+ .describe('Options for the `raw` data mode.')
89
+ .optional(),
90
+ urlencoded: z
91
+ .record(z.string(), z.unknown())
92
+ .describe('Options for the `urlencoded` data mode.')
93
+ .optional(),
94
+ params: z
95
+ .record(z.string(), z.unknown())
96
+ .describe('Options for the `params` data mode.')
97
+ .optional(),
98
+ binary: z
99
+ .record(z.string(), z.unknown())
100
+ .describe('Options for the `binary` data mode.')
101
+ .optional(),
102
+ graphql: z
103
+ .record(z.string(), z.unknown())
104
+ .describe('Options for the `graphql` data mode.')
105
+ .optional(),
74
106
  })
75
107
  .nullable()
108
+ .describe("Additional configurations and options set for the request body's various data modes.")
76
109
  .optional(),
77
110
  auth: z
78
111
  .object({
79
112
  type: z
80
113
  .enum([
81
- 'noauth',
82
114
  'basic',
83
115
  'bearer',
84
116
  'apikey',
@@ -91,94 +123,224 @@ export const parameters = z.object({
91
123
  'edgegrid',
92
124
  'jwt',
93
125
  'asap',
126
+ 'noauth',
94
127
  ])
95
- .optional(),
128
+ .describe('The authorization type.'),
96
129
  apikey: z
97
- .array(z.object({
98
- key: z.string().optional(),
99
- value: z.unknown().optional(),
100
- type: z.enum(['string', 'boolean', 'number', 'array', 'object', 'any']).optional(),
101
- }))
130
+ .array(z
131
+ .object({
132
+ key: z.string().describe("The auth method's key value."),
133
+ value: z
134
+ .union([z.string(), z.array(z.record(z.string(), z.unknown()))])
135
+ .describe("The key's value.")
136
+ .optional(),
137
+ type: z
138
+ .enum(['string', 'boolean', 'number', 'array', 'object', 'any'])
139
+ .describe("The value's type.")
140
+ .optional(),
141
+ })
142
+ .describe('Information about the supported Postman [authorization type](https://learning.postman.com/docs/sending-requests/authorization/authorization-types/).'))
143
+ .describe("The API key's authentication information.")
102
144
  .optional(),
103
- bearer: z
104
- .array(z.object({
105
- key: z.string().optional(),
106
- value: z.unknown().optional(),
107
- type: z.enum(['string', 'boolean', 'number', 'array', 'object', 'any']).optional(),
108
- }))
145
+ awsv4: z
146
+ .array(z
147
+ .object({
148
+ key: z.string().describe("The auth method's key value."),
149
+ value: z
150
+ .union([z.string(), z.array(z.record(z.string(), z.unknown()))])
151
+ .describe("The key's value.")
152
+ .optional(),
153
+ type: z
154
+ .enum(['string', 'boolean', 'number', 'array', 'object', 'any'])
155
+ .describe("The value's type.")
156
+ .optional(),
157
+ })
158
+ .describe('Information about the supported Postman [authorization type](https://learning.postman.com/docs/sending-requests/authorization/authorization-types/).'))
159
+ .describe('The attributes for AWS Signature authentication.')
109
160
  .optional(),
110
161
  basic: z
111
- .array(z.object({
112
- key: z.string().optional(),
113
- value: z.unknown().optional(),
114
- type: z.enum(['string', 'boolean', 'number', 'array', 'object', 'any']).optional(),
115
- }))
162
+ .array(z
163
+ .object({
164
+ key: z.string().describe("The auth method's key value."),
165
+ value: z
166
+ .union([z.string(), z.array(z.record(z.string(), z.unknown()))])
167
+ .describe("The key's value.")
168
+ .optional(),
169
+ type: z
170
+ .enum(['string', 'boolean', 'number', 'array', 'object', 'any'])
171
+ .describe("The value's type.")
172
+ .optional(),
173
+ })
174
+ .describe('Information about the supported Postman [authorization type](https://learning.postman.com/docs/sending-requests/authorization/authorization-types/).'))
175
+ .describe('The attributes for Basic Auth.')
116
176
  .optional(),
117
- digest: z
118
- .array(z.object({
119
- key: z.string().optional(),
120
- value: z.unknown().optional(),
121
- type: z.enum(['string', 'boolean', 'number', 'array', 'object', 'any']).optional(),
122
- }))
177
+ bearer: z
178
+ .array(z
179
+ .object({
180
+ key: z.string().describe("The auth method's key value."),
181
+ value: z
182
+ .union([z.string(), z.array(z.record(z.string(), z.unknown()))])
183
+ .describe("The key's value.")
184
+ .optional(),
185
+ type: z
186
+ .enum(['string', 'boolean', 'number', 'array', 'object', 'any'])
187
+ .describe("The value's type.")
188
+ .optional(),
189
+ })
190
+ .describe('Information about the supported Postman [authorization type](https://learning.postman.com/docs/sending-requests/authorization/authorization-types/).'))
191
+ .describe('The attributes for Bearer Token authentication.')
123
192
  .optional(),
124
- oauth1: z
125
- .array(z.object({
126
- key: z.string().optional(),
127
- value: z.unknown().optional(),
128
- type: z.enum(['string', 'boolean', 'number', 'array', 'object', 'any']).optional(),
129
- }))
193
+ digest: z
194
+ .array(z
195
+ .object({
196
+ key: z.string().describe("The auth method's key value."),
197
+ value: z
198
+ .union([z.string(), z.array(z.record(z.string(), z.unknown()))])
199
+ .describe("The key's value.")
200
+ .optional(),
201
+ type: z
202
+ .enum(['string', 'boolean', 'number', 'array', 'object', 'any'])
203
+ .describe("The value's type.")
204
+ .optional(),
205
+ })
206
+ .describe('Information about the supported Postman [authorization type](https://learning.postman.com/docs/sending-requests/authorization/authorization-types/).'))
207
+ .describe('The attributes for Digest access authentication.')
130
208
  .optional(),
131
- oauth2: z
132
- .array(z.object({
133
- key: z.string().optional(),
134
- value: z.unknown().optional(),
135
- type: z.enum(['string', 'boolean', 'number', 'array', 'object', 'any']).optional(),
136
- }))
209
+ edgegrid: z
210
+ .array(z
211
+ .object({
212
+ key: z.string().describe("The auth method's key value."),
213
+ value: z
214
+ .union([z.string(), z.array(z.record(z.string(), z.unknown()))])
215
+ .describe("The key's value.")
216
+ .optional(),
217
+ type: z
218
+ .enum(['string', 'boolean', 'number', 'array', 'object', 'any'])
219
+ .describe("The value's type.")
220
+ .optional(),
221
+ })
222
+ .describe('Information about the supported Postman [authorization type](https://learning.postman.com/docs/sending-requests/authorization/authorization-types/).'))
223
+ .describe('The attributes for Akamai Edgegrid authentication.')
137
224
  .optional(),
138
225
  hawk: z
139
- .array(z.object({
140
- key: z.string().optional(),
141
- value: z.unknown().optional(),
142
- type: z.enum(['string', 'boolean', 'number', 'array', 'object', 'any']).optional(),
143
- }))
144
- .optional(),
145
- awsv4: z
146
- .array(z.object({
147
- key: z.string().optional(),
148
- value: z.unknown().optional(),
149
- type: z.enum(['string', 'boolean', 'number', 'array', 'object', 'any']).optional(),
150
- }))
226
+ .array(z
227
+ .object({
228
+ key: z.string().describe("The auth method's key value."),
229
+ value: z
230
+ .union([z.string(), z.array(z.record(z.string(), z.unknown()))])
231
+ .describe("The key's value.")
232
+ .optional(),
233
+ type: z
234
+ .enum(['string', 'boolean', 'number', 'array', 'object', 'any'])
235
+ .describe("The value's type.")
236
+ .optional(),
237
+ })
238
+ .describe('Information about the supported Postman [authorization type](https://learning.postman.com/docs/sending-requests/authorization/authorization-types/).'))
239
+ .describe('The attributes for Hawk authentication.')
151
240
  .optional(),
152
241
  ntlm: z
153
- .array(z.object({
154
- key: z.string().optional(),
155
- value: z.unknown().optional(),
156
- type: z.enum(['string', 'boolean', 'number', 'array', 'object', 'any']).optional(),
157
- }))
242
+ .array(z
243
+ .object({
244
+ key: z.string().describe("The auth method's key value."),
245
+ value: z
246
+ .union([z.string(), z.array(z.record(z.string(), z.unknown()))])
247
+ .describe("The key's value.")
248
+ .optional(),
249
+ type: z
250
+ .enum(['string', 'boolean', 'number', 'array', 'object', 'any'])
251
+ .describe("The value's type.")
252
+ .optional(),
253
+ })
254
+ .describe('Information about the supported Postman [authorization type](https://learning.postman.com/docs/sending-requests/authorization/authorization-types/).'))
255
+ .describe('The attributes for NTLM authentication.')
158
256
  .optional(),
159
- edgegrid: z
160
- .array(z.object({
161
- key: z.string().optional(),
162
- value: z.unknown().optional(),
163
- type: z.enum(['string', 'boolean', 'number', 'array', 'object', 'any']).optional(),
164
- }))
257
+ oauth1: z
258
+ .array(z
259
+ .object({
260
+ key: z.string().describe("The auth method's key value."),
261
+ value: z
262
+ .union([z.string(), z.array(z.record(z.string(), z.unknown()))])
263
+ .describe("The key's value.")
264
+ .optional(),
265
+ type: z
266
+ .enum(['string', 'boolean', 'number', 'array', 'object', 'any'])
267
+ .describe("The value's type.")
268
+ .optional(),
269
+ })
270
+ .describe('Information about the supported Postman [authorization type](https://learning.postman.com/docs/sending-requests/authorization/authorization-types/).'))
271
+ .describe('The attributes for OAuth1 authentication.')
272
+ .optional(),
273
+ oauth2: z
274
+ .array(z
275
+ .object({
276
+ key: z.string().describe("The auth method's key value."),
277
+ value: z
278
+ .union([z.string(), z.array(z.record(z.string(), z.unknown()))])
279
+ .describe("The key's value.")
280
+ .optional(),
281
+ type: z
282
+ .enum(['string', 'boolean', 'number', 'array', 'object', 'any'])
283
+ .describe("The value's type.")
284
+ .optional(),
285
+ })
286
+ .describe('Information about the supported Postman [authorization type](https://learning.postman.com/docs/sending-requests/authorization/authorization-types/).'))
287
+ .describe('The attributes for OAuth2 authentication.')
165
288
  .optional(),
166
289
  jwt: z
167
- .array(z.object({
168
- key: z.string().optional(),
169
- value: z.unknown().optional(),
170
- type: z.enum(['string', 'boolean', 'number', 'array', 'object', 'any']).optional(),
171
- }))
290
+ .array(z
291
+ .object({
292
+ key: z.string().describe("The auth method's key value."),
293
+ value: z
294
+ .union([z.string(), z.array(z.record(z.string(), z.unknown()))])
295
+ .describe("The key's value.")
296
+ .optional(),
297
+ type: z
298
+ .enum(['string', 'boolean', 'number', 'array', 'object', 'any'])
299
+ .describe("The value's type.")
300
+ .optional(),
301
+ })
302
+ .describe('Information about the supported Postman [authorization type](https://learning.postman.com/docs/sending-requests/authorization/authorization-types/).'))
303
+ .describe('The attributes for JWT authentication.')
172
304
  .optional(),
173
305
  asap: z
174
- .array(z.object({
175
- key: z.string().optional(),
176
- value: z.unknown().optional(),
177
- type: z.enum(['string', 'boolean', 'number', 'array', 'object', 'any']).optional(),
178
- }))
306
+ .array(z
307
+ .object({
308
+ key: z.string().describe("The auth method's key value."),
309
+ value: z
310
+ .union([z.string(), z.array(z.record(z.string(), z.unknown()))])
311
+ .describe("The key's value.")
312
+ .optional(),
313
+ type: z
314
+ .enum(['string', 'boolean', 'number', 'array', 'object', 'any'])
315
+ .describe("The value's type.")
316
+ .optional(),
317
+ })
318
+ .describe('Information about the supported Postman [authorization type](https://learning.postman.com/docs/sending-requests/authorization/authorization-types/).'))
319
+ .describe('The attributes for ASAP authentication.')
179
320
  .optional(),
180
321
  })
181
322
  .nullable()
323
+ .describe("The request's authentication information.")
324
+ .optional(),
325
+ events: z
326
+ .array(z.object({
327
+ listen: z.enum(['test', 'prerequest']).describe('The event type.'),
328
+ script: z
329
+ .object({
330
+ id: z.string().describe("The script's ID.").optional(),
331
+ type: z
332
+ .string()
333
+ .describe('The type of script. For example, `text/javascript`.')
334
+ .optional(),
335
+ exec: z
336
+ .array(z.string().nullable())
337
+ .describe('A list of script strings, where each line represents a line of code. Separate lines makes it easy to track script changes.')
338
+ .optional(),
339
+ })
340
+ .describe('Information about the Javascript code that can be used to to perform setup or teardown operations in a response.')
341
+ .optional(),
342
+ }))
343
+ .describe('A list of scripts configured to run when specific events occur.')
182
344
  .optional(),
183
345
  });
184
346
  export const annotations = {
@@ -219,6 +381,8 @@ export async function handler(args, extra) {
219
381
  bodyPayload.dataOptions = args.dataOptions;
220
382
  if (args.auth !== undefined)
221
383
  bodyPayload.auth = args.auth;
384
+ if (args.events !== undefined)
385
+ bodyPayload.events = args.events;
222
386
  const options = {
223
387
  body: JSON.stringify(bodyPayload),
224
388
  contentType: ContentType.Json,