Skip to main content
Glama

Pinterest MCP サーバー

鍛冶屋のバッジ

Pinterest の画像検索と情報取得用の Model Context Protocol (MCP) サーバー。

特徴

  • Pinterestでキーワードで画像を検索する

  • Pinterestの画像に関する詳細情報を取得する

  • MCP による Cursor IDE とのシームレスな統合

  • ヘッドレスブラウザモードのサポート

  • 検索結果の制限制御

  • Pinterestから画像を検索してダウンロードする

前提条件

インストール

Smithery経由でインストール

Smithery経由で Claude Desktop 用の mcp-pinterest を自動的にインストールするには:

npx -y @smithery/cli install mcp-pinterest --client claude

マニュアル

  1. このリポジトリをクローンします:

    git clone https://github.com/terryso/mcp-pinterest.git pinterest-mcp-server cd pinterest-mcp-server
  2. 依存関係をインストールします:

    npm install

使用法

コマンドモード(推奨)

サーバーを構築します。

npm run build

これで、このサーバーを Cursor の MCP サーバーとして使用できるようになりました。

カーソルでMCPサーバーとして設定する

  1. オープンカーソルIDE

  2. 設定(⚙️)>拡張機能>MCPに移動します

  3. 「サーバーを追加」をクリックします

  4. 次の詳細を入力してください。

    • 名前: Pinterest MCP

    • タイプ: コマンド

    • コマンド: node

    • 引数: ["/path/to/mcp-pinterest/dist/pinterest-mcp-server.js"]

    または、Cursor を直接押す MCP 構成ファイル (通常は~/.cursor/mcp.jsonにあります)、以下の内容を追加します。

    "pinterest": { "command": "node", "args": ["/path/to/mcp-pinterest/dist/pinterest-mcp-server.js"] }
  5. 「保存」をクリック

利用可能なMCP機能

サーバーは次の MCP 機能を公開します。

  • pinterest_search : Pinterestでキーワードで画像を検索

    • パラメータ:

      • keyword : 検索語(必須)

      • limit : 返される画像の数(デフォルト: 10)

      • headless : ヘッドレスブラウザモードを使用するかどうか(デフォルト: true)

  • pinterest_get_image_info : Pinterest 画像の詳細情報を取得します

    • パラメータ:

      • image_url : Pinterest画像のURL(必須)

  • pinterest_search_and_download : Pinterest から画像を検索してダウンロードします

    • パラメータ:

      • keyword : 検索語(必須)

      • limit : 返される画像の数(デフォルト: 10)

      • headless : ヘッドレスブラウザモードを使用するかどうか(デフォルト: true)

カーソルでの使用例

設定が完了すると、Cursor の AI チャットで Pinterest MCP 機能を直接使用できるようになります。

Search for robot images on Pinterest

AI は MCP サーバーを使用して Pinterest を検索し、結果を表示します。

スクリーンショットの例

Pinterest検索の例

三上悠亚の画像20枚を検索し、すべての画像が正常にダウンロードされたことを示すスクリーンショット。

発達

プロジェクト構造

  • pinterest-mcp-server.ts : メインサーバーファイル

  • dist/pinterest-mcp-server.js : 本番環境用に構築された JavaScript ファイル

  • package.json : プロジェクトの構成と依存関係

新機能の追加

新しい MCP 機能を追加するには:

  1. pinterest-mcp-server.ts変更する

  2. MCP SDKを使用して新しい関数を登録する

  3. 関数ロジックを実装する

  4. npm run buildでリビルドする

トラブルシューティング

  • サーバーの起動に失敗した場合は、ポートがすでに使用されていないか確認してください。

  • npm installですべての依存関係が正しくインストールされていることを確認します。

  • TypeScriptがtsconfig.jsonファイルで適切に設定されていることを確認してください

  • ビルドエラーが発生した場合は、 npm install -D typescript @types/nodeを実行してみてください。

  • Pinterest にアクセスするためのネットワーク接続を確認する

ライセンス

このプロジェクトは MIT ライセンスに基づいてライセンスされています - 詳細についてはLICENSEファイルを参照してください。

設定オプション

環境変数

サーバーは、構成用に次の環境変数をサポートしています。

  • MCP_PINTEREST_DOWNLOAD_DIR : 画像をダウンロードするルートディレクトリを指定します。設定されていない場合は、サーバースクリプトを基準とした../downloadsディレクトリがデフォルトとなります。

  • MCP_PINTEREST_FILENAME_TEMPLATE : ダウンロードした画像のファイル名テンプレートを指定します。設定されていない場合、デフォルトはpinterest_{imageId}.{fileExtension}です。

  • MCP_PINTEREST_PROXY_SERVER : Pinterestへの接続に使用するプロキシサーバーを指定します。形式はprotocol://host:portです。例: http://127.0.0.1:7890またはsocks5://127.0.0.1:1080

使用法

ダウンロードディレクトリの設定

  1. 環境変数を使用してダウンロード ディレクトリを設定します (推奨方法):

# Linux/macOS export MCP_PINTEREST_DOWNLOAD_DIR=/path/to/your/download/directory # Then start the server node pinterest-mcp-server.js # Windows (CMD) set MCP_PINTEREST_DOWNLOAD_DIR=C:\path\to\your\download\directory # Then start the server node pinterest-mcp-server.js # Windows (PowerShell) $env:MCP_PINTEREST_DOWNLOAD_DIR="C:\path\to\your\download\directory" # Then start the server node pinterest-mcp-server.js
  1. 環境変数が設定されていない場合、サーバーはデフォルトのダウンロード ディレクトリ (サーバー スクリプトの../downloadsを基準としたディレクトリ) を使用します。

ファイル名テンプレートの設定

MCP_PINTEREST_FILENAME_TEMPLATE環境変数を使用して、ダウンロードした画像のファイル名パターンをカスタマイズできます。

# Linux/macOS export MCP_PINTEREST_FILENAME_TEMPLATE="pin_{imageId}_{timestamp}.{fileExtension}" # Then start the server node pinterest-mcp-server.js # Windows (CMD) set MCP_PINTEREST_FILENAME_TEMPLATE="pin_{imageId}_{timestamp}.{fileExtension}" # Then start the server node pinterest-mcp-server.js # Windows (PowerShell) $env:MCP_PINTEREST_FILENAME_TEMPLATE="pin_{imageId}_{timestamp}.{fileExtension}" # Then start the server node pinterest-mcp-server.js

テンプレートは次の変数をサポートします。

  • {imageId} : Pinterest画像の一意のID

  • {fileExtension} : ファイル拡張子(例:jpg、png)

  • {timestamp} : 現在の UTC タイムスタンプ(YYYYMMDDHHMMSS 形式)

  • {index} : 複数の画像をダウンロードする場合のインデックス番号(1から始まる)

テンプレートの例:

  • pinterest_{imageId}.{fileExtension} (デフォルト)

  • pin_{timestamp}_{imageId}.{fileExtension}

  • pinterest_image_{index}_{imageId}.{fileExtension}

  • {timestamp}_pinterest.{fileExtension}

テンプレートが無効な場合 (サポートされていない変数が含まれている、括弧が一致していないなど)、サーバーは警告をログに記録し、デフォルトのテンプレートを使用します。

プロキシサーバーの設定

Pinterest にアクセスするためにプロキシを使用する必要がある場合 (特に Pinterest が制限されている可能性のある地域)、プロキシ構成を設定できます。

# Linux/macOS export MCP_PINTEREST_PROXY_SERVER="http://127.0.0.1:7890" # Then start the server node pinterest-mcp-server.js # Windows (CMD) set MCP_PINTEREST_PROXY_SERVER=http://127.0.0.1:7890 # Then start the server node pinterest-mcp-server.js # Windows (PowerShell) $env:MCP_PINTEREST_PROXY_SERVER="http://127.0.0.1:7890" # Then start the server node pinterest-mcp-server.js

サポートされているプロキシ プロトコル:

  • HTTP: http://host:port

  • HTTPS: https://host:port

  • SOCKS4: socks4://host:port

  • SOCKS5: socks5://host:port

プロキシ設定は、検索に使用されるブラウザと画像のダウンロードプロセスの両方に影響します。

注記

  • サーバーは起動時にダウンロードディレクトリの存在と書き込み可能性を確認します。ディレクトリが存在しない場合は作成を試みます。ディレクトリを作成または書き込みできない場合は、サーバーは終了します。

  • すべてのダウンロードではサーバーの環境変数設定またはデフォルトが使用されるため、クライアントはダウンロード関連のツールを呼び出すときにパラメータを使用してダウンロード パスまたはファイル名テンプレートを指定しないでください。

  • サーバーは、不正な文字 ( /\:*?"<>|など) をアンダースコアに置き換えて、ファイル名を自動的にサニタイズします。

インターフェースの説明

サーバーは次の MCP ツールを提供します。

  1. pinterest_search : キーワードでPinterestの画像を検索

  2. pinterest_get_image_info : Pinterest 画像の詳細情報を取得します

  3. pinterest_search_and_download : Pinterest の画像を検索してダウンロードする

詳細なインターフェース パラメータのリファレンスについては、MCP ツール定義を参照してください。

Related MCP Servers

  • A
    security
    A
    license
    A
    quality
    A Model Context Protocol (MCP) server that provides search and crawl functionality using Search1API.
    Last updated -
    97
    158
    MIT License
    • Apple
  • A
    security
    A
    license
    A
    quality
    A Model Context Protocol (MCP) server that provides tools for searching and fetching information from Hacker News.
    Last updated -
    4
    56
    MIT License
    • Apple
  • A
    security
    A
    license
    A
    quality
    A Model Context Protocol (MCP) server that provides web search capabilities through DuckDuckGo, with additional features for content fetching and parsing.
    Last updated -
    648
    MIT License
    • Apple
  • A
    security
    A
    license
    A
    quality
    A Model Context Protocol server that enables searching for images on Pixabay with query parameters and returns formatted results with image URLs and metadata.
    Last updated -
    1
    18
    4
    MIT License
    • Apple
    • Linux

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/terryso/mcp-pinterest'

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