mcp-postman-runner

mcp-postman-runner

Run the requests in a Postman collection folder and get structured, assertion-level results back straight from your AI assistant.

Category
访问服务器

README

mcp-postman-runner

Run the requests in a Postman collection folder — and get structured, assertion-level results back — straight from your AI assistant.

A Model Context Protocol (MCP) server that executes a folder of a Postman collection: it resolves {{variables}}, runs the collection + item pre-request scripts (so token-auth patterns work), fires each request, and evaluates the embedded pm.test scripts — then returns status, timing, body, and per-assertion pass/fail.

It replicates only the slice of newman needed for agent-driven API testing, with no runtime dependencies beyond the MCP SDK and zod.

🎯 Why use this

The Postman connector/API can create requests but can't run them. This server is the execution engine in a Jira → Postman → assess → comment workflow:

Jira ticket ─► derive test cases ─► create a Postman folder (named = ticket key) with pm.test scripts
   ─► run_folder (this MCP) ─► assess responses ─► comment results on the ticket

Supported AI assistants

Any MCP client — Claude Desktop, Claude Cowork, GitHub Copilot (VS Code), Cursor, Windsurf, etc.

✨ Features

  • Folder execution — run every request in a folder, in order, sharing variables across the run.
  • Auth that just works — collection/item pre-request scripts run (incl. pm.sendRequest), so a token fetched once flows to the rest of the folder.
  • Assertion evaluation — the embedded pm.test scripts run via a minimal pm/expect sandbox; you get deterministic pass/fail per assertion.
  • Structured output — status, time, response body (truncated), and assertion details for each request, ready for an agent to assess.
  • Credential-less — holds no secrets; the caller passes the collection/environment JSON.
  • Zero runtime deps — only @modelcontextprotocol/sdk and zod.

📋 Prerequisites

  • Node.js >= 18 (uses the global fetch).
  • Network access from wherever this runs to the API under test.
  • A Postman collection (and optional environment) JSON — typically fetched via the Postman API/connector.

🚀 Quick start

Add to your MCP client config:

{
  "mcpServers": {
    "postman-runner": {
      "command": "npx",
      "args": ["-y", "mcp-postman-runner@latest"]
    }
  }
}

npx fetches and caches the package on first launch. CLI help: npx -y mcp-postman-runner@latest --help.

🛠️ Tools

Tool Purpose Key arguments
list_folders List folders in a collection (name, id, path, request count) collection
run_folder Run every request in a folder; return results + assertions collection, folderName (e.g. the Jira ticket key) or folderId, environment?, timeoutRequestMs?
run_request Run a single named request (re-run one case) collection, requestName, folderName?/folderId?, environment?

All tools take the collection JSON (the collection object from the Postman API / connector's getCollection), and optionally an environment JSON.

run_folder / run_request result

{
  "summary": { "totalRequests": 9, "requestsErrored": 0, "assertionsTotal": 24, "assertionsFailed": 4, "anyFailure": true },
  "results": [
    {
      "name": "TC-01 Happy path", "method": "GET",
      "url": "https://api-dev.example.net/api/v2/countries/states/cities",
      "status": 200, "statusText": "OK", "timeMs": 142,
      "assertionsPassed": 3, "assertionsFailed": 0,
      "assertions": [ { "name": "status is 200", "passed": true, "error": null } ],
      "responseBody": "{ … }"   // truncated at 20k chars
    }
  ]
}

🔬 How it works

  1. Variables — merges collection variables + environment values; resolves {{var}} (nested, iteratively).
  2. Auth / pre-request — runs the collection-level then item-level pre-request scripts. pm.sendRequest is supported, so the common "POST the auth URL, store the token, reuse it" pattern works; the token is cached in the run's variables.
  3. Request — builds the URL/headers/method, fires it with fetch (per-request timeout).
  4. Assertions — runs the request's test script through a pm/expect sandbox and records each pm.test result.

Supported pm subset

pm.test, pm.expect (eql/equal/deep, true/false/null, have.property, at.most/least, above/below, within, include, oneOf, a/an, match, empty, negation via .not), pm.response.code/.json()/.text(), pm.environment & pm.variables get/set, and pm.sendRequest. See ARCHITECTURE.md for details.

🔒 Security

Credential-less by design; secrets in the passed environment are kept in memory for one run and never logged. Only run collections you trust — their pre-request/pm.test scripts execute in the server process. See SECURITY.md.

🤝 Contributing

See CONTRIBUTING.md. Uses Conventional Commits + semantic-release.

📜 License

MIT

🔗 Links

  • Issues: https://github.com/tezaswiraj7222/mcp-postman-runner/issues
  • MCP: https://modelcontextprotocol.io

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选