Postman MCP server

Executes Postman collections to run API tests, validate responses, and generate reports for automated testing and documentation workflows.
Back to servers
Provider
Shannon Lal
Release date
Jan 01, 2025
Language
TypeScript
Package
Stats
433 downloads
49 stars

The Postman MCP server enables running Postman collections using Newman, allowing LLMs to execute API tests and receive detailed results through a standardized interface. This tool bridges the gap between language models and API testing capabilities.

Installation

Via Smithery

The easiest way to install the Postman Runner for Claude Desktop is via Smithery:

npx -y @smithery/cli install mcp-postman --client claude

Manual Installation

If you prefer to install manually:

# Clone the repository
git clone <repository-url>
cd mcp-postman

# Install dependencies
pnpm install

# Build the project
pnpm build

Configuration

To use the server with Claude desktop, add it to your configuration file located at ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "postman-runner": {
      "command": "node",
      "args": ["/absolute/path/to/mcp-postman/build/index.js"]
    }
  }
}

Usage

Running Collections

The server provides the run-collection tool with the following 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

Response Format

When running a collection, you'll receive a response like this:

{
  "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
  }
}

Using with Claude

To use the server with Claude, simply ask 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

Features

The Postman MCP server offers several powerful capabilities:

  • 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

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later