Skip to main content
Glama

postman-escape-mcp — Postman / HAR to Bruno (.bru) & Hurl (.hurl) MCP Server + GitHub Action

z121245017-ai/postman-escape-mcp MCP server

Zero-dependency, 100% offline Model Context Protocol (MCP) Server, CLI, and GitHub Action enabling Claude Desktop, Cursor, Windsurf, Antigravity, and CI pipelines to migrate Postman Collections (v2.0 / v2.1), Environments, and HTTP .har captures into Git-native Bruno (.bru) workspaces and CI-runnable Hurl (.hurl) test suites—while blocking leaked live API credentials before git commit.

MCP Tools Exposed (stdio)

Tool

Purpose

Annotations

convert_postman_to_bruno

Converts Postman Collection (v2.0/v2.1) + optional Environment JSON into Bruno .bru files, scrubbed .env.example, .gitignore, and MIGRATION_REPORT.md. Repairs Bruno #8680 (enabled: null) crashes and normalizes dotted variable names (api.base.url -> api_base_url).

readOnlyHint: true, idempotentHint: true, openWorldHint: false

convert_postman_to_hurl

Compiles Postman Collection or .har JSON into CI-ready .hurl test files (hurl/suite.hurl + hurl/hurl.vars.example) with deterministic [Captures] and [Asserts].

readOnlyHint: true, idempotentHint: true, openWorldHint: false

scan_api_collection_secrets

Audits Postman JSON, .har captures, or Bruno .bru text for live Bearer tokens, JWTs (eyJ...), Basic auth passwords, Cookie headers, x-api-key, and cloud/API keys (AKIA..., sk_live_..., ghp_...) with 1-based line numbers and redacted previews.

readOnlyHint: true, idempotentHint: true, openWorldHint: false

audit_pm_script_compatibility

Inspects Postman pm.* pre-request and test scripts (full Collection JSON or raw JS snippet) and flags non-transpilable pm.sendRequest(...) or CryptoJS calls with exact line numbers and Bruno/Hurl migration guidance.

readOnlyHint: true, idempotentHint: true, openWorldHint: false

Related MCP server: API Testing MCP

Quick Start (MCP Client & Local CLI)

# Start MCP server over stdio (zero npm install / zero external dependencies)
npx -y github:z121245017-ai/postman-escape-mcp

# List MCP tool schemas from terminal
npx -y github:z121245017-ai/postman-escape-mcp --list

# Scan a .bru or Postman file from terminal
npx -y github:z121245017-ai/postman-escape-mcp --cli scan_api_collection_secrets '{"content":"headers {\n  Authorization: Bearer live_secret_token_123456\n}","fileName":"login.bru"}'

Claude Desktop / Cursor / Windsurf / Antigravity Config

{
  "mcpServers": {
    "postman-escape": {
      "command": "npx",
      "args": ["-y", "github:z121245017-ai/postman-escape-mcp"]
    }
  }
}

Docker (node:22-alpine, non-root USER node)

docker build -t postman-escape-mcp .
docker run -i --rm postman-escape-mcp

GitHub Action (z121245017-ai/postman-escape-mcp@v1)

Add postman-escape-mcp@v1 to .github/workflows/ to automatically block pull requests that commit un-scrubbed Postman, .har, or Bruno .bru credentials (Bearer, JWT, Basic, Cookie, x-api-key) and verify pm.* -> Bruno/Hurl script compatibility with inline ::error file=...,line=...:: PR annotations:

name: API Secret & Migration Gate

on:
  pull_request:
  push:
    branches: [main]

permissions:
  contents: read

jobs:
  api-collection-audit:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Block leaked Postman / HAR / Bruno secrets & incompatible pm.* scripts
        uses: z121245017-ai/postman-escape-mcp@v1
        with:
          paths: '.'
          fail-on-secrets: 'true'
          fail-on-incompatible-scripts: 'true'

Action Inputs & Outputs

Name

Kind

Default

Description

paths

Input

.

Newline- or space-separated files or directories to scan.

fail-on-secrets

Input

true

Exit 1 when live credentials are detected in .json, .har, or .bru files.

fail-on-incompatible-scripts

Input

true

Exit 1 when Postman pm.* scripts contain non-transpilable calls (pm.sendRequest, CryptoJS).

ignore

Input

node_modules,.git,dist,build,coverage,vendor

Comma-separated directory names skipped during recursive scan.

scanned-files

Output

—

Number of API collection, environment, .har, and .bru files inspected.

secrets-found

Output

—

Total count of live credential leaks detected.

script-issues-found

Output

—

Total count of non-transpilable pm.* script constructs flagged.

report-json

Output

—

Structured JSON summary of audit findings.

Verification

npm test

License

MIT License — 0 external npm dependencies, 0 network calls, 100% local execution.

Available Tools

4 tools
audit_pm_script_compatibilityA
Read-onlyIdempotent

Analyze Postman pm.* pre-request and test scripts (either a full Postman Collection JSON or a raw JavaScript snippet) to verify Bruno/Hurl transpilation coverage and flag non-transpilable constructs such as pm.sendRequest(...) or CryptoJS with exact line numbers and Bruno/Hurl migration code guidance.

Inputs: source (required), phase, fileName.

convert_postman_to_brunoA
Read-onlyIdempotent

Convert a Postman Collection (v2.0 or v2.1 JSON) and optional Postman Environment JSON into Git-friendly Bruno (.bru) request/collection/environment files, a scrubbed .env.example, .gitignore, and MIGRATION_REPORT.md. Automatically repairs Bruno #8680 enabled:null importer crashes, normalizes dotted/hyphenated variable names (e.g. api.base.url -> api_base_url), transpiles pm.* scripts, and moves live credentials into vars:secret.

Inputs: collectionJson (required), projectName, environmentJson.

convert_postman_to_hurlA
Read-onlyIdempotent

Compile a Postman Collection (v2.0/v2.1 JSON) or browser HTTP Archive (.har JSON) into CI-runnable Hurl (.hurl) test files, combined hurl/suite.hurl, and scrubbed hurl/hurl.vars.example with deterministic [Captures], [Asserts], status checks, and secret-vault redaction.

Inputs: inputJson (required), projectName, environmentJson, includeIndividualFiles.

scan_api_collection_secretsA
Read-onlyIdempotent

Audit Postman Collection/Environment JSON, HTTP .har captures, or Bruno .bru text for live Bearer tokens, JWTs, Basic auth credentials, session Cookies, AWS/Stripe/OpenAI/GitHub keys, and x-api-key headers before git commit. Returns exact 1-based line numbers, redacted previews, and suggested vars:secret identifiers without exposing raw secrets.

Inputs: content (required), fileName.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4/5.0

    Scored across 4 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose: secret scanning, pm.* script compatibility auditing, and two separate converters targeting different output formats (Bruno vs Hurl). The two convert_* tools share a source but are unambiguous because the destination format is explicit in the name and description. An agent can reliably select the right tool from the request intent.

    Naming Consistency4/5

    All names are snake_case with a leading verb (scan_, audit_, convert_), which gives a predictable pattern. The two convert_postman_to_* tools are perfectly parallel, though the noun phrases vary in length/shape across the audit tools, which is a minor stylistic deviation only.

    Tool Count4/5

    Four tools is a tight, well-scoped surface for a Postman-to-Bruno/Hurl migration workflow, with each tool earning its place. It is slightly lean—one could imagine a dedicated environment-only or validation tool—but nothing feels redundant or missing for the core scope.

    Completeness4/5

    The surface covers the main migration lifecycle: secret detection, script transpilability auditing, and conversion to both Bruno and Hurl with scrubbed artifacts. Minor gaps exist around validating/round-tripping converted output (e.g., no re-parse or reverse conversion, and Hurl handles .har while Bruno conversion does not), but agents can work around these.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers