Skip to main content
Glama

REST-to-Postman MCP

by runninghare

REST から Postman MCP へ

REST APIコード(NestJSコントローラー、FastAPI/Flaskエンドポイントなど)をPostmanのコレクションと環境に変換するモデルコンテキストプロトコル(MCP)サーバー。このツールは、開発者がREST APIエンドポイントと環境設定をPostmanと自動的に同期するのに役立ちます。

特徴

  • REST APIエンドポイントをPostmanコレクションに変換する
  • 環境変数をPostman環境と同期する
  • さまざまな認証方法のサポート(例:ベアラートークン)
  • 新しいエンドポイントと既存のコレクションのインテリジェントなマージ
  • 敏感な環境変数の自動処理
  • stdio と SSE トランスポートモードの両方をサポート

前提条件

  • 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 claude

npxで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 トークン設定とともに生成されることに注意してください。

発達

ローカルセットアップ

  1. リポジトリをクローンします。
git clone https://github.com/runninghare/rest-to-postman.git cd rest-to-postman
  1. 依存関係をインストールします:
bun install
  1. .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 ファイルを参照してください。

You must be authenticated.

A
security – no known vulnerabilities
F
license - not found
A
quality - confirmed to work

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

REST API コード (NestJS コントローラーや FastAPI エンドポイントなど) を Postman コレクションと環境に変換し、開発者が API エンドポイントを Postman と自動的に同期できるようにします。

  1. 特徴
    1. 前提条件
      1. インストールと使用方法
        1. Smithery経由でインストール
        2. npxでMCPサーバーを実行する
        3. ツールの説明
        4. 応答フォーマット
        5. カーソルでこのMCPを使用する
      2. 発達
        1. ローカルセットアップ
        2. 開発モードで実行
        3. 建物
        4. スクリプト
      3. 貢献
        1. ライセンス

          Related MCP Servers

          • A
            security
            A
            license
            A
            quality
            Enables running Postman collections using Newman for conducting API tests and obtaining detailed result analysis via a standardized interface.
            Last updated -
            1
            27
            26
            TypeScript
            MIT License
          • A
            security
            A
            license
            A
            quality
            An MCP server that generates AI agent tools from Postman collections and requests. This server integrates with the Postman API to convert API endpoints into type-safe code that can be used with various AI frameworks.
            Last updated -
            1
            7
            JavaScript
            MIT License
          • -
            security
            A
            license
            -
            quality
            A server that enables interaction with any API that has a Swagger/OpenAPI specification through Model Context Protocol (MCP), automatically generating tools from API endpoints and supporting multiple authentication methods.
            Last updated -
            61
            TypeScript
            Apache 2.0
          • -
            security
            F
            license
            -
            quality
            A server based on Model Context Protocol that parses Swagger/OpenAPI documents and generates TypeScript types and API client code for different frameworks (Axios, Fetch, React Query).
            Last updated -
            143
            1
            TypeScript

          View all related MCP servers

          MCP directory API

          We provide all the information about MCP servers via our MCP API.

          curl -X GET 'https://glama.ai/api/mcp/v1/servers/runninghare/rest-to-postman'

          If you have feedback or need assistance with the MCP directory API, please join our Discord server