Postman Mcp Server
MCP Server for running Postman Collections with Newman
Overview
What is MCP Postman?
MCP Postman is a server designed to run Postman collections using Newman, which is a command-line collection runner for Postman. This tool allows developers to automate their API testing workflows by executing collections directly from the command line, making it easier to integrate into CI/CD pipelines.
Features of MCP Postman
- Seamless Integration: Easily integrates with existing Postman collections, allowing for quick setup and execution.
- Command-Line Interface: Utilizes Newman for running collections, providing a powerful CLI for automation.
- Customizable Reports: Generates detailed reports of test results, helping developers to quickly identify issues.
- Environment Support: Supports multiple environments, allowing for flexible testing scenarios.
- Public Repository: Available on GitHub, enabling collaboration and contributions from the community.
How to Use MCP Postman
-
Installation: First, ensure you have Node.js installed on your machine. Then, install Newman globally using npm:
npm install -g newman -
Clone the Repository: Clone the MCP Postman repository from GitHub:
git clone https://github.com/shannonlal/mcp-postman.git -
Run Collections: Navigate to the cloned directory and run your Postman collection using Newman:
newman run your-collection.json -
View Reports: After running the collection, view the generated reports to analyze the results.
Frequently Asked Questions
What is Newman?
Newman is a command-line tool that allows you to run Postman collections directly from the terminal. It is essential for automating API tests and integrating them into CI/CD pipelines.
Can I use MCP Postman for automated testing?
Yes, MCP Postman is specifically designed for automated testing of APIs using Postman collections, making it ideal for continuous integration and deployment workflows.
Is MCP Postman open-source?
Yes, MCP Postman is an open-source project hosted on GitHub, allowing developers to contribute and improve the tool.
How can I contribute to MCP Postman?
You can contribute by forking the repository, making your changes, and submitting a pull request on GitHub. Be sure to follow the contribution guidelines provided in the repository.
Where can I find more information about MCP Postman?
For more information, you can visit the MCP Postman GitHub repository where you can find documentation, issues, and community discussions.
Details
Postman MCP Server
An MCP (Model Context Protocol) server that enables running Postman collections using Newman. This server allows LLMs to execute API tests and get detailed results through a standardized interface.
<a href="https://glama.ai/mcp/servers/qfx34b2s2v"><img width="380" height="200" src="https://glama.ai/mcp/servers/qfx34b2s2v/badge" alt="Postman Server MCP server" /></a>
Features
- Run Postman collections using Newman
- Support for environment files
- Support for global variables
- Detailed test results including:
- Overall success/failure status
- Test summary (total, passed, failed)
- Detailed failure information
- Execution timings
Installation
Installing via Smithery
To install Postman Runner for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install mcp-postman --client claude
Manual Installation
### Clone the repository
git clone <repository-url>
cd mcp-postman
### Install dependencies
pnpm install
### Build the project
pnpm build
Usage
Configuration
Add the server to your Claude desktop configuration file at ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"postman-runner": {
"command": "node",
"args": ["/absolute/path/to/mcp-postman/build/index.js"]
}
}
}
Available Tools
run-collection
Runs a Postman collection and returns the test results.
Parameters:
collection(required): Path or URL to the Postman collectionenvironment(optional): Path or URL to environment fileglobals(optional): Path or URL to globals fileiterationCount(optional): Number of iterations to run
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
}
}
Example Usage in Claude
You can use the server in Claude by asking it to run a Postman collection:
"Run the Postman collection at /path/to/collection.json and tell me if all tests passed"
Claude will:
- Use the run-collection tool
- Analyze the test results
- Provide a human-friendly summary of the execution
Development
Project Structure
src/
├── index.ts # Entry point
├── server/
│ ├── server.ts # MCP Server implementation
│ └── types.ts # Type definitions
└── newman/
└── runner.ts # Newman runner implementation
test/
├── server.test.ts # Server tests
├── newman-runner.test.ts # Runner tests
└── fixtures/ # Test fixtures
└── sample-collection.json
Running Tests
### Run tests
pnpm test
### Run tests with coverage
pnpm test:coverage
Building
### Build the project
pnpm build
### Clean build artifacts
pnpm clean
Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
ISC
Server Config
{
"mcpServers": {
"mcp-postman": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/metorial/mcp-container--shannonlal--mcp-postman--mcp-postman",
"node ./build/index.js"
],
"env": {}
}
}
}