by shannonlal
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 is an MCP (Model Context Protocol) server designed to run Postman collections using Newman. It allows Large Language Models (LLMs) to execute API tests and receive detailed results through a standardized interface, making it easier to integrate API testing into AI-driven workflows.
Installation:
npx -y @smithery/cli install mcp-postman --client claude
pnpm install
), and build the project (pnpm build
).Configuration:
Add the server to your Claude desktop configuration file (~/Library/Application Support/Claude/claude_desktop_config.json
) by specifying the command and arguments to run the built index.js
file.
Available Tools:
run-collection
: Runs a Postman collection and returns test results. Parameters include collection
(required path/URL), environment
(optional path/URL), globals
(optional path/URL), and iterationCount
(optional number of iterations).Example Usage in Claude: "Run the Postman collection at /path/to/collection.json and tell me if all tests passed"
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.
To install Postman Runner for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install mcp-postman --client claude
# Clone the repository
git clone <repository-url>
cd mcp-postman
# Install dependencies
pnpm install
# Build the project
pnpm build
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"]
}
}
}
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 runExample 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
}
}
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:
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
# Run tests
pnpm test
# Run tests with coverage
pnpm test:coverage
# Build the project
pnpm build
# Clean build artifacts
pnpm clean
git checkout -b feature/amazing-feature
)git commit -m 'Add some amazing feature'
)git push origin feature/amazing-feature
)ISC
Reviews feature coming soon
Stay tuned for community discussions and feedback