Skip to main content
Glama

Pinterest MCP Server

npm-VersionNPM-Downloads Schmiedeabzeichen

Ein Model Context Protocol (MCP)-Server für die Bildersuche und Informationsbeschaffung auf Pinterest.

Merkmale

  • Suchen Sie auf Pinterest nach Bildern anhand von Schlüsselwörtern

  • Detaillierte Informationen zu Pinterest-Bildern abrufen

  • Nahtlose Integration mit Cursor IDE über MCP

  • Unterstützung für den Headless-Browsermodus

  • Limitkontrolle für Suchergebnisse

  • Suchen und laden Sie Bilder von Pinterest herunter

Related MCP server: FGCLIP-MCP

Voraussetzungen

Installation

Verwendung von NPX (empfohlen)

Der einfachste Weg, den Pinterest MCP-Server zu verwenden, ist über npx:

npx pinterest-mcp-server

Sie können den Server mit Befehlszeilenoptionen konfigurieren:

# Specify download directory
npx pinterest-mcp-server --downloadDir /path/to/downloads

# Specify filename template
npx pinterest-mcp-server --filenameTemplate "pinterest_{id}"

# Specify both options
npx pinterest-mcp-server --downloadDir ./images --filenameTemplate "pinterest_{id}"

Globale Installation

So installieren Sie das Paket global und verwenden es direkt über die Befehlszeile:

npm install -g pinterest-mcp-server

Nach der Installation können Sie den Server mit Folgendem ausführen:

pinterest-mcp-server

Mit den gleichen Befehlszeilenoptionen wie die NPX-Version:

pinterest-mcp-server --downloadDir /path/to/downloads --filenameTemplate "pinterest_{id}"

Installation über Smithery

So installieren Sie mcp-pinterest für Claude Desktop automatisch über Smithery :

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

Manuelle Installation

  1. Klonen Sie dieses Repository:

    git clone https://github.com/terryso/mcp-pinterest.git pinterest-mcp-server
    cd pinterest-mcp-server
  2. Installieren Sie Abhängigkeiten:

    npm install
  3. Erstellen Sie den Server:

    npm run build
  4. Führen Sie den Server aus:

    npm start

Konfigurieren als MCP-Server im Cursor

  1. Öffnen Sie die Cursor-IDE

  2. Gehen Sie zu Einstellungen (⚙️) > Erweiterungen > MCP

  3. Klicken Sie auf „Server hinzufügen“

  4. Geben Sie die folgenden Details ein:

    • Name: Pinterest MCP

    • Typ: Befehl

    • Befehl: node

    • Argumente: ["/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. Klicken Sie auf „Speichern“

Alternative: Verwenden von NPX zur Cursorkonfiguration

Sie können Cursor auch so konfigurieren, dass die NPX-Version des Servers verwendet wird:

  1. Öffnen Sie die Cursor-IDE

  2. Gehen Sie zu Einstellungen (⚙️) > Erweiterungen > MCP

  3. Klicken Sie auf „Server hinzufügen“

  4. Geben Sie die folgenden Details ein:

    • Name: Pinterest MCP

    • Typ: Befehl

    • Befehl: npx

    • Argumente: ["pinterest-mcp-server"]

  5. Klicken Sie auf „Speichern“

Vollständiges Konfigurationsbeispiel mit Umgebungsvariablen

Für maximale Flexibilität können Sie den Server mit Umgebungsvariablen in Ihrer Cursor-MCP-Konfiguration konfigurieren:

"pinterest": {
  "command": "npx",
  "env": {
    "MCP_PINTEREST_DOWNLOAD_DIR": "/Users/xxx/Desktop/Images",
    "MCP_PINTEREST_FILENAME_TEMPLATE": "pin_{imageId}_{timestamp}.{fileExtension}",
    "MCP_PINTEREST_PROXY_SERVER": "http://127.0.0.1:7890"
  },
  "args": ["pinterest-mcp-server"]
}

Diese Konfiguration:

  • Verwendet npx zum Ausführen des Servers

  • Legt ein benutzerdefiniertes Download-Verzeichnis auf Ihrem Desktop fest

  • Verwendet eine benutzerdefinierte Dateinamenvorlage mit Bild-ID und Zeitstempel

  • Konfiguriert einen Proxyserver für Benutzer in Regionen, in denen Pinterest möglicherweise blockiert ist

Fügen Sie dies Ihrer Datei ~/.cursor/mcp.json hinzu oder richten Sie es über die Cursor-IDE-Schnittstelle ein.

Verfügbare MCP-Funktionen

Der Server stellt die folgenden MCP-Funktionen bereit:

  • pinterest_search : Suche nach Bildern auf Pinterest nach Stichworten

    • Parameter:

      • keyword : Suchbegriff (erforderlich)

      • limit : Anzahl der zurückzugebenden Bilder (Standard: 10)

      • headless : Ob der Headless-Browsermodus verwendet werden soll (Standard: true)

  • pinterest_get_image_info : Erhalten Sie detaillierte Informationen zu einem Pinterest-Bild

    • Parameter:

      • image_url : URL des Pinterest-Bildes (erforderlich)

  • pinterest_search_and_download : Bilder von Pinterest suchen und herunterladen

    • Parameter:

      • keyword : Suchbegriff (erforderlich)

      • limit : Anzahl der zurückzugebenden Bilder (Standard: 10)

      • headless : Ob der Headless-Browsermodus verwendet werden soll (Standard: true)

Beispielverwendung im Cursor

Nach der Konfiguration können Sie die Pinterest MCP-Funktionen direkt im KI-Chat von Cursor verwenden:

Search for robot images on Pinterest

Die KI verwendet den MCP-Server, um Pinterest zu durchsuchen und die Ergebnisse anzuzeigen.

Beispiel-Screenshot

Beispiel für eine Pinterest-Suche

Screenshot, der eine Suche nach 20 Bildern von 三上悠亚 zeigt, wobei alle Bilder erfolgreich heruntergeladen wurden.

Entwicklung

Projektstruktur

  • pinterest-mcp-server.ts : Hauptserverdatei

  • dist/pinterest-mcp-server.js : Erstellte JavaScript-Datei für die Produktion

  • package.json : Projektkonfiguration und Abhängigkeiten

Neue Funktionen hinzufügen

So fügen Sie neue MCP-Funktionen hinzu:

  1. Ändern Sie pinterest-mcp-server.ts

  2. Registrieren neuer Funktionen mit dem MCP SDK

  3. Implementieren der Funktionslogik

  4. Neuaufbau mit npm run build

Fehlerbehebung

  • Wenn der Server nicht startet, prüfen Sie, ob der Port bereits verwendet wird

  • Stellen Sie sicher, dass alle Abhängigkeiten mit npm install korrekt installiert sind

  • Stellen Sie sicher, dass TypeScript mit einer tsconfig.json Datei richtig konfiguriert ist

  • Wenn beim Erstellen Fehler auftreten, versuchen Sie npm install -D typescript @types/node auszuführen.

  • Überprüfen Sie die Netzwerkkonnektivität für den Pinterest-Zugriff

Lizenz

Dieses Projekt ist unter der MIT-Lizenz lizenziert – Einzelheiten finden Sie in der Datei LICENSE .

Konfigurationsoptionen

Befehlszeilenoptionen (NPX-Modus)

Wenn Sie den Server über npx verwenden, können Sie ihn mit den folgenden Befehlszeilenoptionen konfigurieren:

  • --downloadDir : Gibt das Stammverzeichnis zum Herunterladen von Bildern an

    npx pinterest-mcp-server --downloadDir /path/to/downloads
  • --filenameTemplate : Gibt die Dateinamenvorlage für heruntergeladene Bilder an

    npx pinterest-mcp-server --filenameTemplate "pin_{imageId}_{timestamp}"
  • --port : Gibt den Port an, auf dem der Server lauschen soll (Standard: 3000)

    npx pinterest-mcp-server --port 8080
  • --proxyServer : Gibt den Proxyserver an, der für die Verbindung mit Pinterest verwendet werden soll

    npx pinterest-mcp-server --proxyServer "http://127.0.0.1:7890"

Sie können mehrere Optionen kombinieren:

npx pinterest-mcp-server --downloadDir ./images --filenameTemplate "pinterest_{id}" --port 8080 --proxyServer "http://127.0.0.1:7890"

Umgebungsvariablen

Der Server unterstützt außerdem die folgenden Umgebungsvariablen zur Konfiguration:

  • MCP_PINTEREST_DOWNLOAD_DIR : Gibt das Stammverzeichnis für den Download von Bildern an. Wenn nicht festgelegt, wird standardmäßig das Verzeichnis ../downloads relativ zum Serverskript verwendet.

  • MCP_PINTEREST_FILENAME_TEMPLATE : Gibt die Dateinamenvorlage für heruntergeladene Bilder an. Wenn nicht festgelegt, lautet der Standardwert pinterest_{imageId}.{fileExtension} .

  • MCP_PINTEREST_PROXY_SERVER : Gibt den Proxyserver an, der für die Verbindung mit Pinterest verwendet werden soll. Das Format sollte protocol://host:port sein, z. B. http://127.0.0.1:7890 oder socks5://127.0.0.1:1080 .

Diese Umgebungsvariablen können auf verschiedene Arten festgelegt werden:

  1. Direkt in Ihrem Terminal (wie in den folgenden Beispielen gezeigt)

  2. In Ihrer Cursor-MCP-Konfiguration über das Feld env (siehe Vollständiges Konfigurationsbeispiel )

  3. In einer .env -Datei im Stammverzeichnis des Projekts

  4. Über Befehlszeilenoptionen mit npx (wie im Abschnitt „Befehlszeilenoptionen “ gezeigt)

Verwendung

Download-Verzeichnis festlegen

  1. Verwenden von npx mit Befehlszeilenoptionen:

npx pinterest-mcp-server --downloadDir /path/to/your/download/directory
  1. Legen Sie das Download-Verzeichnis mithilfe einer Umgebungsvariablen fest:

# Linux/macOS
export MCP_PINTEREST_DOWNLOAD_DIR=/path/to/your/download/directory
npx pinterest-mcp-server

# Windows (CMD)
set MCP_PINTEREST_DOWNLOAD_DIR=C:\path\to\your\download\directory
npx pinterest-mcp-server

# Windows (PowerShell)
$env:MCP_PINTEREST_DOWNLOAD_DIR="C:\path\to\your\download\directory"
npx pinterest-mcp-server
  1. Wenn die Umgebungsvariable nicht festgelegt ist, verwendet der Server das Standard-Downloadverzeichnis (relativ zum Verzeichnis ../downloads des Serverskripts).

Festlegen einer Dateinamenvorlage

  1. Verwenden von npx mit Befehlszeilenoptionen:

npx pinterest-mcp-server --filenameTemplate "pin_{imageId}_{timestamp}.{fileExtension}"
  1. Verwenden einer Umgebungsvariablen:

# Linux/macOS
export MCP_PINTEREST_FILENAME_TEMPLATE="pin_{imageId}_{timestamp}.{fileExtension}"
npx pinterest-mcp-server

# Windows (CMD)
set MCP_PINTEREST_FILENAME_TEMPLATE="pin_{imageId}_{timestamp}.{fileExtension}"
npx pinterest-mcp-server

# Windows (PowerShell)
$env:MCP_PINTEREST_FILENAME_TEMPLATE="pin_{imageId}_{timestamp}.{fileExtension}"
npx pinterest-mcp-server

Die Vorlage unterstützt die folgenden Variablen:

  • {imageId} : Die eindeutige ID des Pinterest-Bildes

  • {fileExtension} : Die Dateierweiterung (z. B. jpg, png)

  • {timestamp} : Aktueller UTC-Zeitstempel im Format JJJJMMTTHHMMSS

  • {index} : Die Indexnummer beim Herunterladen mehrerer Bilder (beginnt bei 1)

Beispielvorlagen:

  • pinterest_{imageId}.{fileExtension} (Standard)

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

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

  • {timestamp}_pinterest.{fileExtension}

Wenn die Vorlage ungültig ist (z. B. nicht unterstützte Variablen enthält oder nicht übereinstimmende Klammern aufweist), protokolliert der Server eine Warnung und verwendet die Standardvorlage.

Proxyserver einrichten

Wenn Sie für den Zugriff auf Pinterest einen Proxy verwenden müssen (insbesondere in Regionen, in denen Pinterest möglicherweise eingeschränkt ist), können Sie die Proxy-Konfiguration festlegen:

  1. Verwenden von npx mit Befehlszeilenoptionen:

npx pinterest-mcp-server --proxyServer "http://127.0.0.1:7890"
  1. Verwenden einer Umgebungsvariablen:

# Linux/macOS
export MCP_PINTEREST_PROXY_SERVER="http://127.0.0.1:7890"
npx pinterest-mcp-server

# Windows (CMD)
set MCP_PINTEREST_PROXY_SERVER=http://127.0.0.1:7890
npx pinterest-mcp-server

# Windows (PowerShell)
$env:MCP_PINTEREST_PROXY_SERVER="http://127.0.0.1:7890"
npx pinterest-mcp-server

Unterstützte Proxy-Protokolle:

  • HTTP: http://host:port

  • HTTPS: https://host:port

  • SOCKS4: socks4://host:port

  • SOCKS5: socks5://host:port

Die Proxy-Konfiguration wirkt sich sowohl auf den für die Suche verwendeten Browser als auch auf den Bilddownloadvorgang aus.

Hinweise

  • Der Server prüft beim Start, ob das Download-Verzeichnis vorhanden und beschreibbar ist. Falls das Verzeichnis nicht vorhanden ist, wird versucht, es zu erstellen. Ist dies nicht möglich, wird der Server beendet.

  • Clients sollten beim Aufrufen von Download-bezogenen Tools keine Downloadpfade oder Dateinamenvorlagen über Parameter angeben, da alle Downloads die Umgebungsvariablenkonfiguration oder Standardeinstellungen des Servers verwenden.

  • Der Server bereinigt Dateinamen automatisch, indem er ungültige Zeichen (wie / , \ , : , * , ? , " , < , > , | ) durch Unterstriche ersetzt.

Schnittstellenbeschreibung

Der Server stellt die folgenden MCP-Tools bereit:

  1. pinterest_search : Suche nach Pinterest-Bildern nach Stichwort

  2. pinterest_get_image_info : Erhalten Sie detaillierte Informationen zu einem Pinterest-Bild

  3. pinterest_search_and_download : Pinterest-Bilder suchen und herunterladen

Ausführliche Referenzen zu den Schnittstellenparametern finden Sie in den MCP-Tooldefinitionen.

Available Tools

3 tools
pinterest_get_image_infoC

Get Pinterest image information

ParametersJSON Schema
NameRequiredDescriptionDefault
image_urlYesImage URL

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are present, and the description does not disclose any behavioral traits such as read-only nature, authentication requirements, or rate limits. It merely restates the name.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence with no unnecessary words. It is appropriately concise, though it could include more information without becoming verbose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is simple with one parameter and no output schema, but the description does not mention what information is returned. Without output schema, the agent has no indication of the response format or content, making it incomplete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema already provides a description for the single parameter 'image_url' as 'Image URL'. The tool description does not add any additional meaning or context beyond the schema. With 100% schema coverage, baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb 'Get' and resource 'Pinterest image information', distinguishing it from sibling tools like search and search_and_download. However, it does not specify what information is retrieved, which could be improved.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. For instance, it could mention that this is used after searching to fetch details for a specific image.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

pinterest_search_and_downloadB

Search for images on Pinterest by keyword and download them

ParametersJSON Schema
NameRequiredDescriptionDefault
keywordYesSearch keyword
limitNoNumber of images to return and download (default: 10)
headlessNoWhether to use headless browser mode (default: true)

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description must disclose behavior. It only states the action, not side effects (e.g., file saving location, format, or any destructive operations). Minimal behavioral transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single, efficient sentence with no wasted words. Could be slightly more structured but overall well-sized.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool that downloads images, missing details on output format, file saving behavior, and how it differs from sibling tools. Incomplete for an agent to reliably invoke.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, and the description adds no extra meaning beyond what the schema already provides. Baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'search and download' and resource 'images on Pinterest by keyword'. It distinguishes from siblings by combining both actions, though not explicitly differentiating from pinterest_search.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance on when to use this tool vs siblings. The context is implied by the name and description, but lacks when-not-to-use or alternative mentions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

TDQS

B3.3/5.0
Disambiguation5/5

Each tool has a distinct purpose: retrieving metadata, searching, and searching with download. The names and descriptions make it easy to distinguish between them.

Naming Consistency4/5

All tools use the 'pinterest_' prefix and snake_case, but 'pinterest_search_and_download' combines two verbs while the others use a single verb, introducing slight inconsistency.

Tool Count4/5

Three tools is a minimal but reasonable set for an image search and download service. It covers core functionality without being too sparse or excessive.

Completeness3/5

The set covers basic search and metadata retrieval, but lacks common Pinterest operations like board management, pinning, or user actions, leaving notable gaps for broader use.

Maintenance

ActivityInactive
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

Latest Blog Posts

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