Postman Mcp サーバー
概要
MCP Postmanとは?
MCP Postmanは、PostmanのコレクションをNewmanを使用して実行するために設計されたサーバーです。NewmanはPostmanのコマンドラインコレクションランナーです。このツールは、開発者がコマンドラインから直接コレクションを実行することでAPIテストのワークフローを自動化できるようにし、CI/CDパイプラインへの統合を容易にします。
MCP Postmanの特徴
- シームレスな統合:既存のPostmanコレクションと簡単に統合でき、迅速なセットアップと実行が可能です。
- コマンドラインインターフェース:コレクションを実行するためにNewmanを利用し、自動化のための強力なCLIを提供します。
- カスタマイズ可能なレポート:テスト結果の詳細なレポートを生成し、開発者が問題を迅速に特定できるようにします。
- 環境サポート:複数の環境をサポートし、柔軟なテストシナリオを可能にします。
- 公開リポジトリ:GitHubで利用可能で、コミュニティからのコラボレーションと貢献を促進します。
MCP Postmanの使い方
-
インストール:まず、マシンにNode.jsがインストールされていることを確認します。その後、npmを使用してNewmanをグローバルにインストールします:
npm install -g newman -
リポジトリのクローン:GitHubからMCP Postmanリポジトリをクローンします:
git clone https://github.com/shannonlal/mcp-postman.git -
コレクションの実行:クローンしたディレクトリに移動し、Newmanを使用してPostmanコレクションを実行します:
newman run your-collection.json -
レポートの表示:コレクションを実行した後、生成されたレポートを表示して結果を分析します。
よくある質問
Newmanとは?
Newmanは、ターミナルから直接Postmanコレクションを実行できるコマンドラインツールです。APIテストを自動化し、CI/CDパイプラインに統合するために不可欠です。
MCP Postmanを自動テストに使用できますか?
はい、MCP PostmanはPostmanコレクションを使用したAPIの自動テストのために特別に設計されており、継続的インテグレーションとデプロイメントのワークフローに最適です。
MCP Postmanはオープンソースですか?
はい、MCP PostmanはGitHubでホストされているオープンソースプロジェクトであり、開発者がツールに貢献し、改善することができます。
MCP Postmanにどのように貢献できますか?
リポジトリをフォークし、変更を加え、GitHubでプルリクエストを提出することで貢献できます。リポジトリに提供されている貢献ガイドラインに従うことを忘れないでください。
MCP Postmanに関する詳細情報はどこで見つけられますか?
詳細情報については、MCP Postman GitHubリポジトリを訪れて、ドキュメント、問題、コミュニティディスカッションを見つけることができます。
詳細
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
サーバー設定
{
"mcpServers": {
"mcp-postman": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/metorial/mcp-container--shannonlal--mcp-postman--mcp-postman",
"node ./build/index.js"
],
"env": {}
}
}
}