REST-to-Postman MCP
REST から Postman MCP へ
REST APIコード(NestJSコントローラー、FastAPI/Flaskエンドポイントなど)をPostmanのコレクションと環境に変換するモデルコンテキストプロトコル(MCP)サーバー。このツールは、開発者がREST APIエンドポイントと環境設定をPostmanと自動的に同期するのに役立ちます。
特徴
REST APIエンドポイントをPostmanコレクションに変換する
環境変数をPostman環境と同期する
さまざまな認証方法のサポート(例:ベアラートークン)
新しいエンドポイントと既存のコレクションのインテリジェントなマージ
敏感な環境変数の自動処理
stdio と SSE トランスポートモードの両方をサポート
Related MCP server: Codebase Insights MCP Server
前提条件
Bun v1.2.2以降
Postman APIキー
Postman ワークスペース ID
インストールと使用方法
これは、コレクションと環境を作成/更新するために Postman ワークスペースへのアクセスを必要とする Model Context Protocol (MCP) stdio サーバーです。
Smithery経由でインストール
Smithery経由で Claude Desktop 用の REST-to-Postman MCP を自動的にインストールするには:
npx -y @smithery/cli install @runninghare/rest-to-postman-mcp --client claudenpxでMCPサーバーを実行する
npxで MCP サーバーを使用するには:
npx -y rest-to-postman@latest --postman-api-key your_api_key --postman-workspace-id your_workspace_idまたは環境変数を使用します:
export POSTMAN_API_KEY=your_api_key
export POSTMAN_ACTIVE_WORKSPACE_ID=your_workspace_id
npx -y rest-to-postman@latest このコマンドは、MCP をサポートするさまざまな AI コード エディターと統合できます。
クロードデスクトップ
カーソル
ウィンドサーフィン
ルー・クライン編集者
重要事項:サーバーが機能するにはPostman API認証情報が必要です。サーバーを起動する前に、APIキーとワークスペースIDの両方をご用意ください。
ツールの説明
サーバーは主に 2 つのツールを提供します。
1. RESTからPostman環境へ( rest_to_postman_env )
アプリケーションの環境変数を使用して Postman 環境を作成または更新します。
入力パラメータ:
envName(文字列): Postman環境の名前envVars(オブジェクト): 環境変数のキーと値のペア
入力例:
{
"envName": "REST Environment",
"envVars": {
"API_URL": "https://api.example.com",
"API_TOKEN": "secret-token-1"
}
}2. REST から Postman コレクション ( rest_to_postman_collection )
REST API エンドポイントを使用して Postman コレクションを作成または更新します。
入力パラメータ:
collectionRequest(オブジェクト): 次の内容を含む Postman コレクション構成:info: コレクションのメタデータauth: 認証設定item: APIエンドポイントの配列
入力例:
{
"info": {
"name": "REST Collection",
"description": "REST Collection",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"auth": {
"type": "bearer",
"bearer": [
{
"key": "Authorization",
"value": "Bearer {{API_TOKEN}}",
"type": "string"
}
]
},
"item": [
{
"name": "Get Users",
"request": {
"method": "GET",
"url": {
"raw": "{{API_URL}}/users",
"protocol": "https",
"host": ["api", "example", "com"],
"path": ["users"]
}
}
}
]
}応答フォーマット
どちらのツールも、Postman リソースの作成/更新を確認する成功メッセージを返します。
{
"content": [{
"type": "text",
"text": "Successfully created/updated Postman environment: REST Environment"
}]
}カーソルでこのMCPを使用する
このMCPサーバーはCursorで使用できます。Nest.js Typescriptコントローラーに基づいてPostmanコレクションを生成する例を以下に示します。
プロンプト:
Create a postman collection named "Campaign Endpoints" based on this next.js controller. The baseUrl is `http://localhost:7022`. The collection should have a Bear token which applies to all the endpoints自動的に生成された Postman コレクションは次のとおりです。
Campaign Controller からのすべてのエンドポイントが、Bear トークン設定とともに生成されることに注意してください。
発達
ローカルセットアップ
リポジトリをクローンします。
git clone https://github.com/runninghare/rest-to-postman.git
cd rest-to-postman依存関係をインストールします:
bun install.envファイルを作成します。
POSTMAN_API_KEY=your_api_key_here
POSTMAN_ACTIVE_WORKSPACE_ID=your_workspace_id_here開発モードで実行
開発の場合、Bun を使用してサーバーを直接実行できます。
# Start in stdio mode (default)
bun run src/mcp.ts
# Start in SSE mode
bun run src/mcp.ts --sse建物
プロジェクトをビルドするには:
bun run buildこれにより、 distディレクトリにバンドルされた出力が作成されます。
スクリプト
bun run build- プロジェクトをビルドするbun run dev- 開発モードでサーバーを実行するbun run startSSE- SSEモードでサーバーを起動する
貢献
貢献を歓迎します!お気軽にプルリクエストを送信してください。
ライセンス
このプロジェクトは MIT ライセンスに基づいてライセンスされています - 詳細については LICENSE ファイルを参照してください。
Available Tools
2 toolsrest_to_postman_collectionA
Creates or updates a Postman collection with the provided collection configuration. This tool helps synchronize your REST API endpoints with Postman. When updating an existing collection, it intelligently merges the new endpoints with existing ones, avoiding duplicates while preserving custom modifications made in Postman. Here's an example:
{
"info": {
"name": "REST Collection",
"description": "REST Collection",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"auth": {
"type": "bearer",
"bearer": [
{
"key": "Authorization",
"value": "Bearer {{API_TOKEN}}",
"type": "string"
}
]
},
"item": [
{
"name": "Get Users",
"request": {
"method": "GET",
"url": {
"raw": "{{API_URL}}/users",
"protocol": "https",
"host": ["api", "example", "com"],
"path": ["users"]
}
}
},
{
"name": "Create User",
"request": {
"method": "POST",
"url": {
"raw": "{{API_URL}}/users"
},
"body": {
"mode": "raw",
"raw": "{"name":"John Doe","email":"john.doe@example.com"}"
}
}
}
]
}
Inputs: collectionRequest (required).
rest_to_postman_envA
Creates or updates a Postman environment with the provided environment variables. This tool helps synchronize your REST application's environment configuration with Postman. It supports both creating new environments and updating existing ones in your Postman workspace. Environment variables related to sensitive data (containing 'token' in their names) are automatically marked as secrets. Here's an example:
{ "envName": "REST Environment", "envVars": { "API_URL": "https://api.example.com", "API_TOKEN": "secret-token-1" } }
Inputs: envName (required), envVars (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
The two tools have completely distinct purposes: one handles Postman collections (API endpoint configurations), while the other handles Postman environments (environment variables). There is no overlap in functionality, making it impossible to confuse them.
Both tools follow a perfect 'rest_to_postman_' prefix pattern with descriptive suffixes ('collection' and 'env'). The naming is completely consistent in style and structure throughout the set.
With only 2 tools, this server feels severely under-scoped for a REST-to-Postman integration purpose. A complete synchronization system would typically need tools for operations like listing collections/environments, deleting resources, or handling authentication flows, not just create/update operations.
The toolset is significantly incomplete for REST-to-Postman synchronization. While create/update operations exist for collections and environments, there are no tools for reading existing resources, deleting them, managing workspaces, or handling more complex Postman features like monitors or mocks. This creates dead ends for agents trying to perform full lifecycle management.
Maintenance
Related MCP Connectors
AI-callable tools for API mocking, testing, monitoring, security, and automation.
End-to-end API testing — generate and run tests from OpenAPI, curl, Postman, or real user traffic.
Discover, compare, and monitor 1,400+ APIs directly from your AI coding agent.
Publish your API docs so AI assistants can look up endpoints and call your API correctly.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAutomatically converts Postman API collections into MCP-compatible tools for AI assistants. Enables users to interact with any API through natural language by generating JavaScript tools from Postman requests.MIT
- AlicenseNot gradedqualityCmaintenanceAnalyzes API codebases from GitHub and Bitbucket repositories to generate Postman collections, business reports, and detailed code insights. Supports multiple frameworks including FastAPI, Spring Boot, Flask, Express, and OpenAPI/Swagger specifications.MIT
- AlicenseAqualityDmaintenanceIntegrates Postman with Cursor IDE to manage collections and requests through natural language. It features specialized tools for automatically migrating API endpoints and metadata directly from .NET controller code into Postman collections.8MIT
- AlicenseBqualityDmaintenanceAutomatically generates Postman collections from code directories by analyzing API endpoints and parameters, enabling easy testing, documentation, and sharing.143MIT