← PostmanCONTENT HISTORY

Update to Postman

Snapshot Dec 3, 2026 · 18:16 UTC · version 0.11.0

Collection source: downloaded plugin package.

WHAT CHANGED

First saved snapshot

No earlier snapshot is available to establish a change.

Save Postman and check future changes in Following.

Up to 3 plugins free · no card required.

Compare saved observations

Download comparison JSON
Full technical diff · 0 changed fields
Full snapshot data
{
  "description": "Use when checking, debugging or writing tests for an MCP server, local or remote, whoever built it. Use for requests such as \"does my MCP server work\", \"why does this tool call fail\", \"connect to this MCP URL\" or \"make sure these tools keep working\". Not for using Postman's own MCP tools on a workspace; that is postman:postman-mcp-server.",
  "included_files": [],
  "name": "mcp-testing",
  "skill_md_contents": "---\nname: mcp-testing\ndescription: Use when checking, debugging or writing tests for an MCP server, local or remote, whoever built it. Use for requests such as \"does my MCP server work\", \"why does this tool call fail\", \"connect to this MCP URL\" or \"make sure these tools keep working\". Not for using Postman's own MCP tools on a workspace; that is postman:postman-mcp-server.\n---\n\n# MCP Testing\n\n`postman mcp` is a scriptable MCP client in the CLI, not only in the app. Each\ncommand connects to one server, does one operation and disconnects;\n`postman mcp -h` has the targets, credential order and exit codes. If the\ncommand is missing, update the CLI rather than conclude Postman cannot do this.\n\nOne `postman mcp tools call` answers whether a tool works. Save the call as an\nMCP request (`postman collection request add --type mcp`) when the check should\noutlive the session: `collection run` repeats it locally and in CI with the same\ntransport, auth and scripts, so what you proved by hand is what CI checks and\nwhat the person reviewing reads, instead of a transcript.\n`postman init --json` at the repo root gives the saved call a collection to\nlive in and a workspace that records the assertion pass rate of its runs,\nwith no sign-in or approval; see\n**postman:workspaces**' \"What init unlocks\".\n\nTake expectations from the tool's contract: its `inputSchema`, `outputSchema`\nand description, which are what a calling agent relies on. A test copied from\nthe output the tool just returned only proves the server agrees with itself.\n\n## Results that mislead\n\n- **`tools call` checks some schema rules before sending**: it blocks a call\n  that breaks one of them (exit 2) and sends one that breaks another. To test\n  how the server handles bad input, save the call as a request message, which\n  is sent as written.\n- **Exit 4 from `inspect`**: one list method failed, often an optional one such\n  as `resources/templates/list`. The rest of the server may be fine.\n- **Sampling and elicitation** are declined, because a one-shot client cannot\n  answer them. A tool that needs them fails here, not in an agent's client.\n- **The stdio command is split at every space** (CLI 1.90.0), so no\n  argument can contain one, and a script given by absolute path cannot take\n  arguments; use a relative path.\n\n## Script hooks\n\nEach MCP request runs its scripts at four points. Put each script where its\njob belongs:\n\n- `beforeConnect` is setup, before the session opens: a value unique to the\n  run, or a token.\n  `pm.request.headers.push({ key: \"Authorization\", value: \"Bearer \" + pm.variables.get(\"token\") })`\n  sends the token on every call in the session. Headers are a `{key, value}`\n  array; assigning an object is silently ignored.\n- `afterConnect` tests the server itself: `pm.response.tools`, `resources`,\n  `prompts`, `capabilities`, `server`, `protocolVersion` and `instructions`. A\n  request with no message only connects, so it checks what the server\n  advertises once.\n- `afterResponse` tests the call: `pm.response.result`, including `isError`.\n- `afterDisconnect` is cleanup, after the session closes, so it can no longer\n  call the server's tools. Unset the variables a run no longer needs, or remove\n  data the run created with `pm.sendRequest`.\n\nA collection or folder definition holds the same hooks as `mcp:<event>`, and\nthey run for every MCP request under it. That suits auth in\n`mcp:beforeConnect`. A server check or cleanup placed there repeats on every\nrequest, so give those their own request. A run that stops early, as with\n`--bail`, skips a cleanup request; when leftover data matters, clean up from\nthe CI script after the run.\n\n## Chain requests into workflows\n\nA collection runs its requests in order, and scripts pass values between them,\nso a collection can be a workflow rather than a list of separate checks: create\nsomething, act on it by the id the first call returned, then check the result.\nAn `afterResponse` script stores a value with\n`pm.collectionVariables.set(\"todoId\", ...)`, and a later request uses it as\n`{{todoId}}`. The values a run captures replace hard-coded fixtures. CI then\nrepeats the whole flow unattended, and nobody has to rebuild it in test code.\n\n- A variable is substituted as a string, even inside the message JSON (CLI\n  1.90.0). An\n  unquoted `{{id}}` fails the JSON check, so a numeric argument cannot be\n  chained yet.\n- Each MCP request opens a new session, so the server has to keep the state the\n  flow builds between sessions. A stdio request also starts a new server\n  process, which loses anything held in memory. For such a server, run the\n  flow against a long-running HTTP instance, or test it in the server's own\n  tests.\n\n## Credentials\n\n`postman mcp login` opens a browser for the user and keeps the sign-in on this\nmachine. CI has neither, so CI for a server that needs auth takes a token from\nthe CI secret store, set as the request's auth through a variable\n(see **postman:variables**).\n\n## Verification\n\nKeep three results apart: the server answered, the tool succeeded (no\n`isError`), and the assertions passed. `postman mcp` exits 1 for an `isError`\nresult, but `collection run` does not: a tool error there fails the run only\nwhen a test checks `isError`, so every success check in a saved request\nasserts it.\n"
}

SHA-256 of public snapshot: 1e4cd0486c415f8495b4ff49af67f4bce53adc33ec8dc99f652eb0fc7776cb02