mcp-postman-executor
Facilitates the execution of Postman API testing suites via Newman, yielding comprehensive execution metrics. It natively accommodates environment configurations and global variable sets, culminating in a consolidated report of testing outcomes.
Author

shannonlal
Quick Info
Actions
Tags
Postman MCP Server Implementation
This Model Context Protocol (MCP) server module is engineered to orchestrate Postman collection executions utilizing the Newman CLI tool. It furnishes Large Language Models (LLMs) with a structured mechanism to trigger exhaustive API validation routines and retrieve granular result datasets.
Core Capabilities
- Drive Postman test collections using the Newman runner utility.
- Full compatibility for loading external environment definition files.
- Native integration for applying pre-defined global variables.
- Provision of in-depth execution diagnostics, specifically:
- High-level pass/fail status determination.
- A statistical tally of total, successful, and failed assertions.
- Specific data outlining all assertion failures.
- Detailed temporal data related to the test run duration.
Deployment Instructions
Automatic Installation via Smithery
For rapid deployment into your Claude Desktop environment via Smithery, execute the following command:
bash npx -y @smithery/cli install mcp-postman --client claude
Manual Setup Procedure
bash
Obtain the source code repository
git clone
Install required software packages
pnpm install
Compile the application assets
pnpm build
Operational Guidelines
Configuration Blueprint
Integrate this service into your Claude desktop settings file located at ~/Library/Application Support/Claude/claude_desktop_config.json by adding the following block:
{ "mcpServers": { "postman-runner": { "command": "node", "args": ["/absolute/path/to/mcp-postman/build/index.js"] } } }
Exposed Functionality
run-collection
Executes a designated Postman collection and furnishes the resulting validation outcomes.
Input Arguments (Parameters):
collection(Mandatory): The filesystem location or remote Uniform Resource Locator (URL) pointing to the Postman collection file.environment(Optional): The path or URL directing to the environment configuration file.globals(Optional): The path or URL specifying the global variables definition file.iterationCount(Optional): An integer specifying the total number of times the collection should be executed sequentially.
Sample Return Payload (Example Response):
{ "success": true, "summary": { "total": 5, "failed": 0, "passed": 5 }, "failures": [], "timings": { "started": "2024-03-14T10:00:00.000Z", "completed": "2024-03-14T10:00:01.000Z", "duration": 1000 } }
Practical Illustration within Claude
Users can invoke this server within Claude by requesting an API test run:
"Initiate the Postman collection residing at /path/to/collection.json and confirm if all assertions yielded positive results."
Claude's subsequent actions will involve:
- Invoking the
run-collectionmethod. - Parsing and analyzing the resulting execution data.
- Presenting a coherent, natural language digest of the test run performance.
Development Lifecycle
Source Code Organization
src/ ├── index.ts # Primary entry script ├── server/ │ ├── server.ts # MCP Server logic implementation │ └── types.ts # Data structure definitions └── newman/ └── runner.ts # Newman execution abstraction layer test/ ├── server.test.ts # Server-side unit/integration tests ├── newman-runner.test.ts # Newman execution logic tests └── fixtures/ └── sample-collection.json # Predefined test assets
Running Verification Suites
bash
Execute the full test suite
pnpm test
Execute tests while generating coverage reports
pnpm test:coverage
Building the Artifacts
bash
Compile the production-ready binaries/scripts
pnpm build
Delete previously generated build outputs
pnpm clean
Collaboration Guidelines
- Branch from the main repository (
git checkout -b feature/amazing-feature). - Commit your modifications (
git commit -m 'Add some amazing feature'). - Push your new branch upstream (
git push origin feature/amazing-feature). - Submit a formal Pull Request for review.
Licensing
ISC
WIKIPEDIA: XMLHttpRequest (XHR) represents an Application Programming Interface embodied as a JavaScript object engineered to dispatch Hypertext Transfer Protocol (HTTP) queries from a web browser environment towards a designated web server. These methods empower browser-resident applications to dispatch requests subsequent to the initial page load, facilitating the reception of return data. XHR is fundamentally intertwined with Ajax programming methodologies. Prior to the widespread adoption of Ajax, standard HTML hyperlinks and form submissions constituted the primary means of server interaction, frequently necessitating a full page refresh to reflect state changes.
== Chronology == The foundational concept underpinning XMLHttpRequest was conceived in the year 2000 by the engineering team responsible for Microsoft Outlook. This conceptual framework was subsequently materialized within the Internet Explorer 5 browser release (1999). Nevertheless, the initial invocation syntax did not employ the standardized 'XMLHttpRequest' identifier. Instead, developers leveraged COM object instantiation via 'ActiveXObject("Msxml2.XMLHTTP")' and 'ActiveXObject("Microsoft.XMLHTTP")'. By the time Internet Explorer 7 launched (2006), universal support for the canonical 'XMLHttpRequest' identifier was established across all major browser engines. The XMLHttpRequest identifier has subsequently matured into the de facto industry benchmark across all principal web browsers, including Mozilla’s Gecko rendering engine (2002), Apple’s Safari 1.2 (2004), and Opera 8.0 (2005).
=== Formal Specification Development === The World Wide Web Consortium (W3C) formally published an initial Working Draft specification detailing the XMLHttpRequest object on April 5, 2006. Following this, on February 25, 2008, the W3C released the Level 2 specification draft. Level 2 enhancements introduced capabilities for tracking event progress, permitting cross-origin resource sharing (CORS), and managing raw byte stream data. By the culmination of 2011, the Level 2 specification features were successfully merged back into the primary standard document. Towards the end of 2012, custodianship of the standard transitioned to the WHATWG group, which now maintains the living document using the Web IDL (Interface Definition Language) specification format.
== Implementation Patterns == Generally, dispatching a network query using XMLHttpRequest necessitates adherence to several sequential programming steps.
- Instantiate an XMLHttpRequest object via its constructor call:
- Invoke the 'open' method to define the request modality (GET, POST, etc.), designate the target resource endpoint, and specify operation mode (synchronous versus asynchronous):
- For asynchronous operations, establish an event handler callback function to be notified upon state transitions:
- Commence the transmission of the request payload by calling the 'send' method:
- Process state changes within the assigned event listener. If the server returns response content, this data is typically accessible via the 'responseText' property upon reaching state 4, the terminal or 'done' state. Beyond these fundamental stages, XMLHttpRequest provides numerous mechanisms to finely tune request transmission parameters and response handling protocols. Custom header fields can be programmatically inserted into the request to guide server fulfillment logic, and arbitrary data can be transmitted to the server within the 'send' function argument. The received data stream can optionally be deserialized from JSON format directly into native JavaScript objects, or processed incrementally as chunks arrive instead of waiting for the complete download. Furthermore, the operation can be halted prematurely via an abort command or configured to terminate if a time threshold is exceeded.
== Inter-Domain Communication ==
In the nascent phases of the World Wide Web's evolution, it was observed that circumvention of security policies that restricted

