This MCP (Model Context Protocol) server enables running Postman collections using Newman, allowing AI language models to execute API tests and receive detailed results through a standardized interface. The server acts as a bridge between language models and Postman, a popular API testing tool.
The easiest way to install the Postman MCP server is through Smithery:
npx -y @smithery/cli install mcp-postman --client claude
Alternatively, you can install the server manually:
# Clone the repository
git clone <repository-url>
cd mcp-postman
# Install dependencies
pnpm install
# Build the project
pnpm build
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"]
}
}
}
The server provides a run-collection
tool that runs a Postman collection and returns the test results.
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 runWhen you run 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
}
}
You can interact with the server through Claude by asking it to run a Postman collection. For example:
"Run the Postman collection at /path/to/collection.json and tell me if all tests passed"
Claude will:
The Postman MCP server supports:
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.
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"
]
}
}
}
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.
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.