@postman/postman-plugin 0.2.0 → 0.2.1-rc.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 +32 -9
- package/dist/hosts/claude-code.js +7 -2
- package/dist/hosts/cursor.js +18 -5
- package/dist/pi-extension.js +22 -7
- package/mcp.pi.json +2 -2
- package/package.json +1 -1
- package/skills/postman-mcp-server/references/docs.md +3 -3
- package/skills/postman-mcp-server/references/learn.md +16 -16
- package/skills/postman-mcp-server/references/mcp-limitations.md +1 -1
- package/skills/postman-mcp-server/references/mock.md +3 -3
- package/skills/postman-mcp-server/references/search.md +3 -3
- package/skills/postman-mcp-server/references/security.md +3 -3
- package/skills/postman-mcp-server/references/setup.md +18 -18
- package/skills/postman-mcp-server/references/sync.md +3 -3
- package/skills/postman-mcp-server/references/test.md +4 -4
package/README.md
CHANGED
|
@@ -35,29 +35,35 @@ You can also use the following commands to install individually:
|
|
|
35
35
|
[View Postman on Claude Plugins](https://claude.com/plugins/postman)
|
|
36
36
|
|
|
37
37
|
```bash
|
|
38
|
-
claude plugin
|
|
38
|
+
claude plugin marketplace add anthropics/claude-plugins-official
|
|
39
|
+
claude plugin install postman@claude-plugins-official
|
|
39
40
|
```
|
|
40
41
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
```text
|
|
46
|
-
/add-plugin postman
|
|
47
|
-
```
|
|
42
|
+
The first command registers Anthropic's official marketplace, which a fresh
|
|
43
|
+
Claude Code doesn't have until an interactive session gets past sign-in. It
|
|
44
|
+
does nothing where the marketplace is already registered.
|
|
48
45
|
|
|
49
46
|
### Codex
|
|
50
47
|
|
|
51
48
|
[View Postman on ChatGPT Plugins](https://chatgpt.com/plugins/postman?open_in_app)
|
|
52
49
|
|
|
53
50
|
```bash
|
|
51
|
+
codex plugin marketplace add postmanlabs/postman-plugin
|
|
54
52
|
codex plugin add postman@postman
|
|
55
53
|
```
|
|
56
54
|
|
|
55
|
+
### Cursor
|
|
56
|
+
|
|
57
|
+
[View Postman on the Cursor Marketplace](https://cursor.com/marketplace/postman)
|
|
58
|
+
|
|
59
|
+
```text
|
|
60
|
+
/add-plugin postman
|
|
61
|
+
```
|
|
62
|
+
|
|
57
63
|
### Factory Droid
|
|
58
64
|
|
|
59
65
|
```bash
|
|
60
|
-
droid plugin marketplace add postmanlabs/postman-plugin
|
|
66
|
+
droid plugin marketplace add https://github.com/postmanlabs/postman-plugin.git
|
|
61
67
|
droid plugin install postman@postman-plugin --scope user
|
|
62
68
|
```
|
|
63
69
|
|
|
@@ -65,6 +71,23 @@ droid plugin install postman@postman-plugin --scope user
|
|
|
65
71
|
`droid plugin update postman@postman-plugin --scope user`, updates it. Sign in
|
|
66
72
|
to Postman's MCP server with `/mcp` inside a Droid session.
|
|
67
73
|
|
|
74
|
+
### Kimi Code
|
|
75
|
+
|
|
76
|
+
Inside a Kimi Code session:
|
|
77
|
+
|
|
78
|
+
```text
|
|
79
|
+
/plugins install https://github.com/postmanlabs/postman-plugin/tree/main
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Then run `/new` to start a session with the plugin. Run the same command again,
|
|
83
|
+
then `/new`, to update; `/plugins remove postman` removes it. Sign in to
|
|
84
|
+
Postman's MCP server with `/mcp-config login plugin-postman:postman`.
|
|
85
|
+
|
|
86
|
+
### OpenCode
|
|
87
|
+
|
|
88
|
+
OpenCode loads Postman from a clone of this repository and a one-line loader
|
|
89
|
+
file. [opencode/README.md](https://github.com/postmanlabs/postman-plugin/blob/main/opencode/README.md#install) has the commands.
|
|
90
|
+
|
|
68
91
|
### Pi
|
|
69
92
|
|
|
70
93
|
[View Postman in Pi's package gallery](https://pi.dev/packages/@postman/postman-plugin)
|
|
@@ -1,10 +1,15 @@
|
|
|
1
|
-
import { redact } from '../source.js';
|
|
1
|
+
import { isSameRepo, redact } from '../source.js';
|
|
2
2
|
import { blocked, failed, guard, mustProbeJson, mustRun, parseJson } from './shared.js';
|
|
3
3
|
import { result } from './types.js';
|
|
4
4
|
// Anthropic's catalog entry is the Claude Code install; our own marketplace
|
|
5
5
|
// would register the same skills a second time under `postman@postman`.
|
|
6
6
|
const MARKETPLACE = { name: 'claude-plugins-official', repo: 'anthropics/claude-plugins-official' }, PLUGIN_ID = `postman@${MARKETPLACE.name}`, SHADOW_IDS = ['postman@postman'], SCOPE = 'user', NEXT = 'Restart Claude Code for the change to take effect.';
|
|
7
7
|
const isOurs = (plugin) => plugin.id === PLUGIN_ID || SHADOW_IDS.includes(plugin.id);
|
|
8
|
+
// A `url` source fetches one marketplace.json instead of cloning, so a URL names the repo only in a `git` source.
|
|
9
|
+
function isOfficialSource(marketplace) {
|
|
10
|
+
return isSameRepo(marketplace.repo, MARKETPLACE.repo) ||
|
|
11
|
+
(marketplace.source === 'git' && isSameRepo(marketplace.url, MARKETPLACE.repo));
|
|
12
|
+
}
|
|
8
13
|
function listPlugins(system) {
|
|
9
14
|
return mustProbeJson(system, 'claude', ['plugin', 'list', '--json']);
|
|
10
15
|
}
|
|
@@ -21,7 +26,7 @@ async function refreshMarketplace(system) {
|
|
|
21
26
|
await mustRun(system, 'claude', ['plugin', 'marketplace', 'add', MARKETPLACE.repo, '--scope', SCOPE]);
|
|
22
27
|
return;
|
|
23
28
|
}
|
|
24
|
-
if (existing
|
|
29
|
+
if (!isOfficialSource(existing)) {
|
|
25
30
|
const source = existing.repo ?? existing.url ?? existing.path;
|
|
26
31
|
blocked(`marketplace ${MARKETPLACE.name} is registered from ${source ? redact(source) : 'an unknown source'}, not ${MARKETPLACE.repo}`);
|
|
27
32
|
}
|
package/dist/hosts/cursor.js
CHANGED
|
@@ -1,18 +1,30 @@
|
|
|
1
1
|
import path from 'node:path';
|
|
2
2
|
import { guard, removeClone, syncClone } from './shared.js';
|
|
3
3
|
import { result } from './types.js';
|
|
4
|
-
// Cursor has no command to install a plugin, but loads any plugin folder under
|
|
5
|
-
// plugins/local. Its Marketplace keeps its own copy under plugins/cache.
|
|
6
|
-
const localClone = (system) => path.join(system.home, '.cursor', 'plugins', 'local', 'postman'), marketplaceCopy = (system) => path.join(system.home, '.cursor', 'plugins', 'cache', 'cursor-public', 'postman'), NEXT = 'Reload the Cursor window (Developer: Reload Window) for the change to take effect.',
|
|
4
|
+
// Cursor has no command to install a plugin, but its editor loads any plugin folder under
|
|
5
|
+
// plugins/local; its CLI doesn't. Its Marketplace keeps its own copy under plugins/cache.
|
|
6
|
+
const localClone = (system) => path.join(system.home, '.cursor', 'plugins', 'local', 'postman'), marketplaceCopy = (system) => path.join(system.home, '.cursor', 'plugins', 'cache', 'cursor-public', 'postman'), NEXT = 'Reload the Cursor window (Developer: Reload Window) for the change to take effect.', cliOffPath = (system) => path.join(system.home, '.local', 'bin', 'cursor-agent'),
|
|
7
7
|
// Cursor keeps a disabled Marketplace copy on disk and records "enabled" only in its
|
|
8
8
|
// private state database, so the copy being there doesn't mean Postman is active.
|
|
9
9
|
CHECK_ENABLED = 'If Postman isn\'t active in Cursor, enable it in Cursor Settings > Plugins.', MAYBE_TWICE = 'The Cursor Marketplace copy is present too; if it\'s enabled, Postman loads twice, so disable one in Cursor Settings > Plugins.';
|
|
10
|
+
// Until https://github.com/postmanlabs/postman-plugin/issues/82 is fixed. Names the CLI by its path when
|
|
11
|
+
// it isn't on PATH, which detect() accepts.
|
|
12
|
+
async function cliNext(system) {
|
|
13
|
+
const cli = (await system.which('cursor-agent')) === null && await system.exists(cliOffPath(system)) ?
|
|
14
|
+
`"${cliOffPath(system)}"` :
|
|
15
|
+
'cursor-agent';
|
|
16
|
+
return `The Cursor CLI doesn't load plugins from there; start it with \`${cli} --plugin-dir "${localClone(system)}"\`.`;
|
|
17
|
+
}
|
|
10
18
|
export const cursor = {
|
|
11
19
|
id: 'cursor',
|
|
12
20
|
name: 'Cursor',
|
|
13
21
|
route: '.cursor-plugin',
|
|
14
22
|
async detect(system) {
|
|
15
|
-
|
|
23
|
+
// The Cursor CLI creates ~/.cursor only on its first run, and its installer can't put
|
|
24
|
+
// ~/.local/bin on the PATH of the shell that ran it. It also installs `agent`, a name
|
|
25
|
+
// too generic to mean Cursor.
|
|
26
|
+
return (await system.which('cursor')) !== null || (await system.which('cursor-agent')) !== null ||
|
|
27
|
+
await system.exists(cliOffPath(system)) ||
|
|
16
28
|
(system.platform === 'darwin' && await system.exists('/Applications/Cursor.app')) ||
|
|
17
29
|
await system.exists(path.join(system.home, '.cursor'));
|
|
18
30
|
},
|
|
@@ -39,7 +51,8 @@ export const cursor = {
|
|
|
39
51
|
// An existing clone is kept even next to the Marketplace copy, which may be
|
|
40
52
|
// disabled: a duplicate is visible and fixable, deleting the working copy is not.
|
|
41
53
|
const action = await syncClone(system, localClone(system));
|
|
42
|
-
|
|
54
|
+
const next = `${NEXT} ${await cliNext(system)}`;
|
|
55
|
+
return result('done', `${action} ${localClone(system)}`, fromMarketplace ? `${next} ${MAYBE_TWICE}` : next);
|
|
43
56
|
});
|
|
44
57
|
},
|
|
45
58
|
remove(system) {
|
package/dist/pi-extension.js
CHANGED
|
@@ -2,7 +2,7 @@ import fs from 'node:fs';
|
|
|
2
2
|
import path from 'node:path';
|
|
3
3
|
import { fileURLToPath } from 'node:url';
|
|
4
4
|
/** In the tarball, where `prepack` staged the repo's shared files beside `dist/`. */
|
|
5
|
-
const packageRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..'), ENTRY_SKILL = 'api-engineer', SECTION = 'postman';
|
|
5
|
+
const packageRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..'), ENTRY_SKILL = 'api-engineer', SECTION = 'postman', MCP_NEEDS_NEWER_PI = 'Postman\'s MCP server needs Pi 0.99.0 or later; run `pi update` to upgrade Pi.';
|
|
6
6
|
/** Pi's skill names are un-namespaced; the shared mandate names them `postman:<skill>` for the other routes. */
|
|
7
7
|
export function toPiSessionContext(source) {
|
|
8
8
|
return source.replace(/`postman:([a-z0-9-]+)`/g, '`$1`');
|
|
@@ -11,16 +11,31 @@ export function toPiSessionContext(source) {
|
|
|
11
11
|
export function postmanExtension(root) {
|
|
12
12
|
return (pi) => {
|
|
13
13
|
const mandate = toPiSessionContext(fs.readFileSync(path.join(root, 'hooks', 'session-start-context.md'), 'utf8')), { mcpServers } = JSON.parse(fs.readFileSync(path.join(root, 'mcp.pi.json'), 'utf8'));
|
|
14
|
-
//
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
// An extension that throws while loading stops every Pi session from starting, so an older
|
|
15
|
+
// Pi still gets the skills and the mandate. Print and JSON modes drop the notice.
|
|
16
|
+
if (typeof pi.registerMcpServer === 'function') {
|
|
17
|
+
// A `postman` server in the user's own mcp.json takes precedence over this registration.
|
|
18
|
+
for (const [name, server] of Object.entries(mcpServers)) {
|
|
19
|
+
pi.registerMcpServer(name, server);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
pi.on('session_start', (_event, { ui }) => ui.notify(MCP_NEEDS_NEWER_PI, 'warning'));
|
|
17
24
|
}
|
|
18
25
|
// Pi's stand-in for the SessionStart hook. The mandate routes to a skill, so it goes only
|
|
19
26
|
// where that skill loaded; `pi config` can disable it.
|
|
20
|
-
pi.on('before_agent_start', (
|
|
21
|
-
|
|
22
|
-
|
|
27
|
+
pi.on('before_agent_start', (event) => {
|
|
28
|
+
const { sections, skills } = event.systemPromptOptions;
|
|
29
|
+
if (!skills.some((skill) => skill.name === ENTRY_SKILL)) {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
if (sections) {
|
|
33
|
+
sections[SECTION] = mandate;
|
|
34
|
+
return;
|
|
23
35
|
}
|
|
36
|
+
// From Pi 0.86.0 a returned prompt replaces the sectioned one whole, so only a Pi
|
|
37
|
+
// without sections gets one.
|
|
38
|
+
return { systemPrompt: `${event.systemPrompt}\n\n<${SECTION}>\n${mandate}\n</${SECTION}>` };
|
|
24
39
|
});
|
|
25
40
|
};
|
|
26
41
|
}
|
package/mcp.pi.json
CHANGED
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
"description": "Postman workspaces, collections, specs, environments, mocks and monitors",
|
|
7
7
|
"headers": {
|
|
8
8
|
"X-Source": "postman-pi-plugin",
|
|
9
|
-
"X-Plugin-Version": "0.2.
|
|
10
|
-
"User-Agent": "postman-pi-plugin/0.2.
|
|
9
|
+
"X-Plugin-Version": "0.2.1-rc.1",
|
|
10
|
+
"User-Agent": "postman-pi-plugin/0.2.1-rc.1"
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
13
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@postman/postman-plugin",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1-rc.1",
|
|
4
4
|
"description": "Postman's API engineering skills for coding agents: a Pi package, and an npx installer that sets up Claude Code, Codex, Cursor, Kimi Code, Factory Droid, OpenCode and Pi.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -9,7 +9,7 @@ Analyze, improve, and publish API documentation from OpenAPI specs and Postman c
|
|
|
9
9
|
|
|
10
10
|
## Prerequisites
|
|
11
11
|
|
|
12
|
-
The Postman MCP Server must be connected for Postman operations. Local spec analysis works without MCP. If needed,
|
|
12
|
+
The Postman MCP Server must be connected for Postman operations. Local spec analysis works without MCP. If needed, follow `references/setup.md` to connect it.
|
|
13
13
|
|
|
14
14
|
## Workflow
|
|
15
15
|
|
|
@@ -81,8 +81,8 @@ If both a spec and collection exist, keep them in sync:
|
|
|
81
81
|
|
|
82
82
|
## Error Handling
|
|
83
83
|
|
|
84
|
-
- **MCP not configured:** Local markdown docs can be generated without MCP. For Postman publishing
|
|
85
|
-
- **401 Unauthorized:** "Your Postman API key was rejected. Generate a new one at https://go.postman.co/settings/me/api-keys
|
|
84
|
+
- **MCP not configured:** Local markdown docs can be generated without MCP. For Postman publishing, follow `references/setup.md` to connect the Postman MCP Server.
|
|
85
|
+
- **401 Unauthorized:** "Your Postman API key was rejected. Generate a new one at https://go.postman.co/settings/me/api-keys." Then re-authenticate with `references/setup.md`.
|
|
86
86
|
- **Invalid spec:** Report parse errors and offer to fix common YAML/JSON syntax issues.
|
|
87
87
|
- **Plan limitations:** "Publishing documentation may require a paid Postman plan. Check https://www.postman.com/pricing/"
|
|
88
88
|
- **Too many results:** Ask the user to specify a collection by name.
|
|
@@ -7,16 +7,16 @@ allowed-tools: Read, mcp__postman__searchLearningCenter, mcp__postman__getEnable
|
|
|
7
7
|
|
|
8
8
|
Answer "how do I..." questions about the Postman product by searching the official Postman Learning Center (https://learning.postman.com). Explain features, walk through workflows, and cite authoritative sources.
|
|
9
9
|
|
|
10
|
-
Use this to learn *about Postman itself* — not to search the user's own collections, workspaces, or specs (that's
|
|
10
|
+
Use this to learn *about Postman itself* — not to search the user's own collections, workspaces, or specs (that's `references/search.md`).
|
|
11
11
|
|
|
12
12
|
## Prerequisites
|
|
13
13
|
|
|
14
|
-
This
|
|
14
|
+
This workflow uses `searchLearningCenter`, which the Postman MCP Server exposes only in **Full mode**.
|
|
15
15
|
|
|
16
16
|
The mode is fixed by the endpoint in each route's MCP config, not by the environment. A route pinned to `https://mcp.postman.com/mcp` has the tool; a route pinned to `https://mcp.postman.com/minimal` does not. Read it off the route's own MCP config rather than inferring it from the agent's name — which endpoint an agent gets is a per-route product decision, and new routes are added. **`POSTMAN_MCP_MODE` is not read on any route** — never tell the user to set or unset it to change the tool set.
|
|
17
17
|
|
|
18
|
-
- If MCP tools aren't available at all,
|
|
19
|
-
- If `searchLearningCenter` is missing, call `getEnabledTools` to confirm the active tool set, then split on which endpoint the route is pinned to. On a `/minimal` route it is absent by design and the user cannot change it from the client: say the Learning Center tool isn't part of that route's tool set and point them at https://learning.postman.com to search directly. On a `/mcp` route its absence is not a mode problem — the server isn't connected as configured:
|
|
18
|
+
- If MCP tools aren't available at all, follow `references/setup.md` to connect the Postman MCP Server.
|
|
19
|
+
- If `searchLearningCenter` is missing, call `getEnabledTools` to confirm the active tool set, then split on which endpoint the route is pinned to. On a `/minimal` route it is absent by design and the user cannot change it from the client: say the Learning Center tool isn't part of that route's tool set and point them at https://learning.postman.com to search directly. On a `/mcp` route its absence is not a mode problem — the server isn't connected as configured: follow `references/setup.md` to reconnect it.
|
|
20
20
|
|
|
21
21
|
Do not answer a "how do I..." question from memory when the tool is unavailable. Cite only URLs the tool returned, or send the user to the Learning Center.
|
|
22
22
|
|
|
@@ -38,16 +38,16 @@ Read the returned passages and compose a direct answer to the user's question. D
|
|
|
38
38
|
- If the docs reveal a better or officially recommended workflow than what the user asked, surface it.
|
|
39
39
|
- Always cite the source URLs the tool returns so the user can read more.
|
|
40
40
|
|
|
41
|
-
### Step 3:
|
|
41
|
+
### Step 3: Offer a Matching Workflow
|
|
42
42
|
|
|
43
|
-
When
|
|
43
|
+
When the answer maps to one of this skill's workflows, offer to run it so the user can act immediately:
|
|
44
44
|
|
|
45
|
-
- Creating/updating collections from a spec →
|
|
46
|
-
- Finding APIs in their org or the public network →
|
|
47
|
-
- Running collection tests →
|
|
48
|
-
- Creating mock servers →
|
|
49
|
-
- Generating or publishing docs →
|
|
50
|
-
- Security auditing →
|
|
45
|
+
- Creating/updating collections from a spec → `references/sync.md`
|
|
46
|
+
- Finding APIs in their org or the public network → `references/search.md`
|
|
47
|
+
- Running collection tests → `references/test.md`
|
|
48
|
+
- Creating mock servers → `references/mock.md`
|
|
49
|
+
- Generating or publishing docs → `references/docs.md`
|
|
50
|
+
- Security auditing → `references/security.md`
|
|
51
51
|
|
|
52
52
|
## Output
|
|
53
53
|
|
|
@@ -60,14 +60,14 @@ To create a mock server in Postman:
|
|
|
60
60
|
4. Postman returns a mock URL that serves your examples.
|
|
61
61
|
|
|
62
62
|
Mock servers read from saved examples, so add examples first if you
|
|
63
|
-
have none — the
|
|
63
|
+
have none — I can create the mock and its examples for you.
|
|
64
64
|
|
|
65
65
|
Source: https://learning.postman.com/docs/design-apis/mock-apis/set-up-mock-servers/
|
|
66
66
|
```
|
|
67
67
|
|
|
68
68
|
## Error Handling
|
|
69
69
|
|
|
70
|
-
- **MCP not configured:**
|
|
71
|
-
- **`searchLearningCenter` unavailable:** Confirm with `getEnabledTools`. Expected on any route pinned to the `minimal` endpoint — say the tool isn't in that route's tool set and point the user at https://learning.postman.com. On a `/mcp` route:
|
|
72
|
-
- **401 Unauthorized:** "Your Postman API key was rejected. Generate a new one at https://go.postman.co/settings/me/api-keys
|
|
70
|
+
- **MCP not configured:** Follow `references/setup.md` to connect the Postman MCP Server.
|
|
71
|
+
- **`searchLearningCenter` unavailable:** Confirm with `getEnabledTools`. Expected on any route pinned to the `minimal` endpoint — say the tool isn't in that route's tool set and point the user at https://learning.postman.com. On a `/mcp` route: follow `references/setup.md` to reconnect it.
|
|
72
|
+
- **401 Unauthorized:** "Your Postman API key was rejected. Generate a new one at https://go.postman.co/settings/me/api-keys." Then re-authenticate with `references/setup.md`.
|
|
73
73
|
- **No results:** "Nothing matched in the Learning Center. Try rephrasing with the Postman feature name, or ask about a more specific step."
|
|
@@ -9,7 +9,7 @@ Spin up a Postman mock server from a collection or spec. Get a working mock URL
|
|
|
9
9
|
|
|
10
10
|
## Prerequisites
|
|
11
11
|
|
|
12
|
-
The Postman MCP Server must be connected. If MCP tools aren't available,
|
|
12
|
+
The Postman MCP Server must be connected. If MCP tools aren't available, follow `references/setup.md` to connect it.
|
|
13
13
|
|
|
14
14
|
## Workflow
|
|
15
15
|
|
|
@@ -94,8 +94,8 @@ If the user wants the mock publicly accessible:
|
|
|
94
94
|
|
|
95
95
|
## Error Handling
|
|
96
96
|
|
|
97
|
-
- **MCP not configured:**
|
|
97
|
+
- **MCP not configured:** Follow `references/setup.md` to connect the Postman MCP Server.
|
|
98
98
|
- **No examples in collection:** Auto-generate from schemas (Step 2). If no schemas either, ask the user to provide sample responses.
|
|
99
|
-
- **401 Unauthorized:** "Your Postman API key was rejected. Generate a new one at https://go.postman.co/settings/me/api-keys
|
|
99
|
+
- **401 Unauthorized:** "Your Postman API key was rejected. Generate a new one at https://go.postman.co/settings/me/api-keys." Then re-authenticate with `references/setup.md`.
|
|
100
100
|
- **MCP timeout:** Retry once. If it still fails, check https://status.postman.com for outages.
|
|
101
101
|
- **Plan limitations:** "Mock server creation may require a Postman Basic plan or higher for increased usage limits."
|
|
@@ -9,7 +9,7 @@ Answer natural language questions about available APIs across Postman workspaces
|
|
|
9
9
|
|
|
10
10
|
## Prerequisites
|
|
11
11
|
|
|
12
|
-
The Postman MCP Server must be connected. If MCP tools aren't available,
|
|
12
|
+
The Postman MCP Server must be connected. If MCP tools aren't available, follow `references/setup.md` to connect it.
|
|
13
13
|
|
|
14
14
|
## Workflow
|
|
15
15
|
|
|
@@ -77,7 +77,7 @@ List relevant collections with endpoint counts, then ask which to explore furthe
|
|
|
77
77
|
|
|
78
78
|
## Error Handling
|
|
79
79
|
|
|
80
|
-
- **MCP not configured:**
|
|
80
|
+
- **MCP not configured:** Follow `references/setup.md` to connect the Postman MCP Server.
|
|
81
81
|
- **No results:** "Nothing matched your query. Try different keywords, broaden `ownership` to `all`, or browse the user's workspaces with `getWorkspaces` + `getCollections`."
|
|
82
|
-
- **401 Unauthorized:** "Your Postman API key was rejected. Generate a new one at https://go.postman.co/settings/me/api-keys
|
|
82
|
+
- **401 Unauthorized:** "Your Postman API key was rejected. Generate a new one at https://go.postman.co/settings/me/api-keys." Then re-authenticate with `references/setup.md`.
|
|
83
83
|
- **Too many results:** Ask the user to be more specific. Suggest filtering by workspace or using tags.
|
|
@@ -9,7 +9,7 @@ Audit your API for security issues: missing auth, exposed sensitive data, insecu
|
|
|
9
9
|
|
|
10
10
|
## Prerequisites
|
|
11
11
|
|
|
12
|
-
For collection auditing, the Postman MCP Server must be connected. Local spec auditing works without MCP. If needed,
|
|
12
|
+
For collection auditing, the Postman MCP Server must be connected. Local spec auditing works without MCP. If needed, follow `references/setup.md` to connect it.
|
|
13
13
|
|
|
14
14
|
## Workflow
|
|
15
15
|
|
|
@@ -122,8 +122,8 @@ After fixes, re-run the audit to show improvement.
|
|
|
122
122
|
|
|
123
123
|
## Error Handling
|
|
124
124
|
|
|
125
|
-
- **MCP not configured:** Local spec auditing works without MCP. For Postman-specific checks
|
|
126
|
-
- **401 Unauthorized:** "Your Postman API key was rejected. Generate a new one at https://go.postman.co/settings/me/api-keys
|
|
125
|
+
- **MCP not configured:** Local spec auditing works without MCP. For Postman-specific checks, follow `references/setup.md` to connect the Postman MCP Server.
|
|
126
|
+
- **401 Unauthorized:** "Your Postman API key was rejected. Generate a new one at https://go.postman.co/settings/me/api-keys." Then re-authenticate with `references/setup.md`.
|
|
127
127
|
- **No spec found:** Ask the user for the path. Offer to audit a Postman collection directly via MCP.
|
|
128
128
|
- **Spec too large:** For large specs (100+ endpoints), audit in batches by tag or path prefix.
|
|
129
129
|
- **Plan limitations:** "Some audit features may require a paid Postman plan. Check https://www.postman.com/pricing/"
|
|
@@ -5,7 +5,7 @@ allowed-tools: mcp__postman__authenticate, mcp__postman__complete_authentication
|
|
|
5
5
|
|
|
6
6
|
# First-Run Configuration
|
|
7
7
|
|
|
8
|
-
Walk the user through Postman setup
|
|
8
|
+
Walk the user through Postman MCP setup. Validate everything works before moving on to other Postman tasks.
|
|
9
9
|
|
|
10
10
|
## Workflow
|
|
11
11
|
|
|
@@ -48,7 +48,7 @@ I'll generate an authorization URL. Open it in your browser, sign in, and paste
|
|
|
48
48
|
```
|
|
49
49
|
- If tools are still unavailable after retries:
|
|
50
50
|
```
|
|
51
|
-
The server hasn't reconnected yet. Restart
|
|
51
|
+
The server hasn't reconnected yet. Restart your agent, then ask me to check the Postman connection again.
|
|
52
52
|
Your OAuth token is already saved — you won't need to re-authorize.
|
|
53
53
|
```
|
|
54
54
|
6. Once `getAuthenticatedUser` succeeds, proceed to Step 4.
|
|
@@ -101,41 +101,41 @@ You're all set.
|
|
|
101
101
|
|
|
102
102
|
If workspace is empty:
|
|
103
103
|
```
|
|
104
|
-
Your workspace is empty. You can:
|
|
105
|
-
|
|
106
|
-
|
|
104
|
+
Your workspace is empty. You can ask me to:
|
|
105
|
+
- Push a local OpenAPI spec to Postman
|
|
106
|
+
- Search for APIs across your org's resources or the public Postman network
|
|
107
107
|
```
|
|
108
108
|
|
|
109
|
-
### Step 5: Suggest First
|
|
109
|
+
### Step 5: Suggest a First Task
|
|
110
110
|
|
|
111
111
|
Based on what the user has:
|
|
112
112
|
|
|
113
113
|
**Has collections:**
|
|
114
114
|
```
|
|
115
|
-
Try
|
|
116
|
-
|
|
117
|
-
|
|
115
|
+
Try asking me to:
|
|
116
|
+
- Find APIs across your workspace
|
|
117
|
+
- Run collection tests
|
|
118
118
|
```
|
|
119
119
|
|
|
120
120
|
**Has specs but no collections:**
|
|
121
121
|
```
|
|
122
|
-
Try
|
|
123
|
-
|
|
122
|
+
Try asking me to:
|
|
123
|
+
- Generate a collection from one of your specs
|
|
124
124
|
```
|
|
125
125
|
|
|
126
126
|
**Empty workspace:**
|
|
127
127
|
```
|
|
128
|
-
Try
|
|
129
|
-
|
|
128
|
+
Try asking me to:
|
|
129
|
+
- Import an OpenAPI spec from your project
|
|
130
130
|
```
|
|
131
131
|
|
|
132
132
|
## Error Handling
|
|
133
133
|
|
|
134
|
-
- **MCP tools not available:** "The Postman MCP Server isn't
|
|
134
|
+
- **MCP tools not available:** "The Postman MCP Server isn't connected in this agent. If the Postman plugin is installed, sign in to its MCP server from the agent's MCP settings; otherwise install the plugin for this agent and restart it. https://github.com/postmanlabs/postman-plugin#install has the install steps for each agent."
|
|
135
135
|
- **OAuth callback invalid:** "That URL doesn't look right — make sure you copied the full address bar URL including `?code=` and `&state=`."
|
|
136
|
-
- **OAuth flow expired:** "The authorization URL has expired.
|
|
137
|
-
- **MCP server disconnected after OAuth:** The server restarts after saving credentials. Retry `getAuthenticatedUser` up to 3 times. If still unavailable, tell the user to restart
|
|
136
|
+
- **OAuth flow expired:** "The authorization URL has expired. I'll generate a fresh one." Then repeat Step 2.
|
|
137
|
+
- **MCP server disconnected after OAuth:** The server restarts after saving credentials. Retry `getAuthenticatedUser` up to 3 times. If still unavailable, tell the user to restart their agent — the token is saved, no re-auth needed.
|
|
138
138
|
- **API key not set:** Walk through Step 3 above.
|
|
139
|
-
- **401 Unauthorized:** "Authentication failed.
|
|
139
|
+
- **401 Unauthorized:** "Authentication failed. I can re-authenticate you via OAuth, or you can generate a new API key at https://go.postman.co/settings/me/api-keys." Then offer Step 2 or Step 3.
|
|
140
140
|
- **Network timeout:** "Can't reach the Postman MCP Server. Check your network and https://status.postman.com for outages."
|
|
141
|
-
- **Plan limitations:** "Some features (team workspaces, monitors) require a paid Postman plan. Core
|
|
141
|
+
- **Plan limitations:** "Some features (team workspaces, monitors) require a paid Postman plan. Core workflows work on all plans."
|
|
@@ -9,7 +9,7 @@ Keep Postman collections in sync with your API code. Create new collections from
|
|
|
9
9
|
|
|
10
10
|
## Prerequisites
|
|
11
11
|
|
|
12
|
-
The Postman MCP Server must be connected. If MCP tools aren't available,
|
|
12
|
+
The Postman MCP Server must be connected. If MCP tools aren't available, follow `references/setup.md` to connect it.
|
|
13
13
|
|
|
14
14
|
## Workflow
|
|
15
15
|
|
|
@@ -77,9 +77,9 @@ Collection synced: "Pet Store API" (15 requests)
|
|
|
77
77
|
|
|
78
78
|
## Error Handling
|
|
79
79
|
|
|
80
|
-
- **MCP not configured:**
|
|
80
|
+
- **MCP not configured:** Follow `references/setup.md` to connect the Postman MCP Server.
|
|
81
81
|
- **MCP timeout:** Retry once. If `generateCollection` or `syncCollectionWithSpec` times out, the spec may be too large. Suggest breaking it into smaller specs by domain.
|
|
82
|
-
- **401 Unauthorized:** "Your Postman API key was rejected. Generate a new one at https://go.postman.co/settings/me/api-keys
|
|
82
|
+
- **401 Unauthorized:** "Your Postman API key was rejected. Generate a new one at https://go.postman.co/settings/me/api-keys." Then re-authenticate with `references/setup.md`.
|
|
83
83
|
- **Invalid spec:** Report specific parse errors with line numbers. Offer to fix common YAML/JSON syntax issues.
|
|
84
84
|
- **Async operation stuck:** If polling shows no progress after 30 seconds, inform the user and suggest checking the Postman app directly.
|
|
85
85
|
- **Plan limitations:** "Workspace creation may be limited on free plans. Using your default workspace instead."
|
|
@@ -9,7 +9,7 @@ Execute Postman collection tests directly from Claude Code. Analyze results, dia
|
|
|
9
9
|
|
|
10
10
|
## Prerequisites
|
|
11
11
|
|
|
12
|
-
The Postman MCP Server must be connected. If MCP tools aren't available,
|
|
12
|
+
The Postman MCP Server must be connected. If MCP tools aren't available, follow `references/setup.md` to connect it.
|
|
13
13
|
|
|
14
14
|
## Workflow
|
|
15
15
|
|
|
@@ -77,8 +77,8 @@ If the tests themselves need updating (not the API):
|
|
|
77
77
|
|
|
78
78
|
## Error Handling
|
|
79
79
|
|
|
80
|
-
- **MCP not configured:**
|
|
81
|
-
- **Collection not found:** "No collection matching that name.
|
|
82
|
-
- **401 Unauthorized:** "Your Postman API key was rejected. Generate a new one at https://go.postman.co/settings/me/api-keys
|
|
80
|
+
- **MCP not configured:** Follow `references/setup.md` to connect the Postman MCP Server.
|
|
81
|
+
- **Collection not found:** "No collection matching that name. I can search your workspaces for it, or create one from a spec." Search with `references/search.md`; create with `references/sync.md`.
|
|
82
|
+
- **401 Unauthorized:** "Your Postman API key was rejected. Generate a new one at https://go.postman.co/settings/me/api-keys." Then re-authenticate with `references/setup.md`.
|
|
83
83
|
- **MCP timeout:** Retry once. For large collections, suggest running a single folder to narrow the test run.
|
|
84
84
|
- **Plan limitations:** "Collection runs may require a Postman Basic plan or higher for increased limits."
|