Fire in da houseTop Tip:Most people pay up to $340 per month for Perplexity, MidJourney, Runway, ChatGPT, and more - but you can get them all your AI tools for $15 with Galaxy. It's free to test!Fire in da houseCheck it out

mcp-postman

MCP.Pizza Chef: shannonlal

The mcp-postman server is an MCP server that enables running Postman collections using Newman, providing a standardized interface for LLMs to execute API tests. It supports environment files and global variables, delivering detailed test results including success/failure status, test summaries, failure details, and execution timings. This server facilitates automated API testing workflows integrated with language models, enhancing testing accuracy and observability.

Use This MCP server To

Execute Postman API tests programmatically Automate API testing with environment variables Retrieve detailed API test results for analysis Integrate API test execution into AI workflows Run Postman collections from LLM-powered tools

README

Postman MCP Server

smithery badge

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.

MCP Postman Server Demo

Postman Server MCP server

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 collection
  • environment (optional): Path or URL to environment file
  • globals (optional): Path or URL to globals file
  • iterationCount (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:

  1. Use the run-collection tool
  2. Analyze the test results
  3. 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

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

ISC

mcp-postman FAQ

How do I install the mcp-postman server?
You can install the mcp-postman server via Smithery for automatic setup or follow manual installation instructions from the GitHub repository.
Can mcp-postman handle Postman environment files?
Yes, mcp-postman supports environment files to customize API test execution contexts.
Does mcp-postman provide detailed test results?
Yes, it offers comprehensive test summaries including pass/fail status, failure details, and execution timings.
Is it possible to use global variables with mcp-postman?
Yes, global variables are supported to manage reusable data across Postman collections.
Can mcp-postman be integrated with different LLM providers?
Yes, it works with models like OpenAI, Claude, and Gemini through the MCP protocol.
What is Newman in the context of mcp-postman?
Newman is the command-line tool used by mcp-postman to run Postman collections programmatically.
How does mcp-postman improve API testing workflows?
By enabling LLMs to execute and analyze API tests automatically, it streamlines testing and debugging processes.
Are there any demo resources available for mcp-postman?
Yes, a demo video is available on YouTube showcasing the server's capabilities.