Migrate a Postman collection with an AI agent doing the cleanup

Moving one Postman collection to Requestarium is quick: export it, import it, done. What takes time is what comes after: a token pasted into fifteen headers, globals the requests depend on, a script that called pm.sendRequest, three requests that worked in Postman for reasons nobody remembers. An AI agent with the MCP server can do that cleanup with you.

Import with secrets handled

Import ./orders.postman_collection.json into Requestarium. Dry run first. Move any tokens, API keys and passwords in the file into secret environment variables instead of keeping them in the requests.

The agent calls import_collection with dryRun, shows what it will create and which secrets it found, and then imports with secrets moved into an environment (secrets: store). Requests use {{variables}}; the values are encrypted on the server, and the agent never sees them again. See import a collection without leaking secrets.

Environment and globals

Import the Postman environment file from a terminal; secret values stay secret:

Terminal
requestarium import staging.postman_environment.json --environments-only --name "Orders API"

Then ask the agent:

List every {{variable}} the Orders API requests use that isn't defined in the Staging environment or the collection.

Requestarium has no globals. Values your Postman workspace kept there belong in the environment. The agent can add them with set_environment_variable, asking you before it stores anything secret.

Scripts that didn't convert

Most pm.* scripts run as they are. The import result lists what was converted and what wasn't. Ask:

Which scripts use something that doesn't run in Requestarium? Show me each one and suggest a rewrite.

The usual one is pm.sendRequest inside a script. The fix is to make it a request of its own earlier in the run, and pass the value on with a variable. The agent can create that request and update the script, once you agree.

Run and fix

Run the collection against Staging. For each failure, tell me whether it's the request, the environment or the API, and propose a fix. Ask before changing anything.

That's the test_collection prompt (see four MCP prompts). Expect a few failures that existed in Postman too: an expired example ID, a test that depended on run order. Fix them now, while you're looking.

When to use the app instead

For a whole Postman workspace, Migrate from Postman… in the app's + menu moves every collection and environment in one go with a Postman API key, and previews each collection. Then bring the agent in for the cleanup. See moving your team off Postman.