Skip to main content
Glama

Servidor MCP de Pinterest

insignia de herrería

Un servidor de Protocolo de Contexto Modelo (MCP) para la búsqueda de imágenes y la recuperación de información en Pinterest.

Características

  • Buscar imágenes en Pinterest por palabras clave

  • Recuperar información detallada sobre las imágenes de Pinterest

  • Integración perfecta con Cursor IDE a través de MCP

  • Compatibilidad con el modo de navegador sin cabeza

  • Control de límites para los resultados de búsqueda

  • Busca y descarga imágenes de Pinterest

Related MCP server: FGCLIP-MCP

Prerrequisitos

Instalación

Instalación mediante herrería

Para instalar mcp-pinterest para Claude Desktop automáticamente a través de Smithery :

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

Manual

  1. Clonar este repositorio:

    git clone https://github.com/terryso/mcp-pinterest.git pinterest-mcp-server
    cd pinterest-mcp-server
  2. Instalar dependencias:

    npm install

Uso

Modo de comando (recomendado)

Construir el servidor:

npm run build

Ahora puedes usar este servidor como servidor MCP en Cursor.

Configuración como servidor MCP en Cursor

  1. Abrir cursor IDE

  2. Vaya a Configuración (⚙️) > Extensiones > MCP

  3. Haga clic en "Agregar servidor"

  4. Introduzca los siguientes datos:

    • Nombre: Pinterest MCP

    • Tipo: Comando

    • Comando: node

    • Argumentos: ["/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. Haga clic en "Guardar"

Funciones MCP disponibles

El servidor expone las siguientes funciones MCP:

  • pinterest_search : busca imágenes en Pinterest por palabra clave

    • Parámetros:

      • keyword : término de búsqueda (obligatorio)

      • limit : Número de imágenes a devolver (predeterminado: 10)

      • headless : si se debe utilizar el modo de navegador sin cabeza (valor predeterminado: verdadero)

  • pinterest_get_image_info : Obtenga información detallada sobre una imagen de Pinterest

    • Parámetros:

      • image_url : URL de la imagen de Pinterest (obligatorio)

  • pinterest_search_and_download : Busca y descarga imágenes de Pinterest

    • Parámetros:

      • keyword : término de búsqueda (obligatorio)

      • limit : Número de imágenes a devolver (predeterminado: 10)

      • headless : si se debe utilizar el modo de navegador sin cabeza (valor predeterminado: verdadero)

Ejemplo de uso en Cursor

Una vez configurado, puedes usar las funciones de Pinterest MCP directamente en el chat de IA de Cursor:

Search for robot images on Pinterest

La IA utilizará el servidor MCP para buscar en Pinterest y mostrar los resultados.

Ejemplo de captura de pantalla

Ejemplo de búsqueda en Pinterest

Captura de pantalla que muestra una búsqueda de 20 imágenes de 三上悠亚 con todas las imágenes descargadas correctamente.

Desarrollo

Estructura del proyecto

  • pinterest-mcp-server.ts : Archivo del servidor principal

  • dist/pinterest-mcp-server.js : Archivo JavaScript creado para producción

  • package.json : Configuración del proyecto y dependencias

Añadiendo nuevas funciones

Para agregar nuevas funciones MCP:

  1. Modificar pinterest-mcp-server.ts

  2. Registrar nuevas funciones utilizando el SDK de MCP

  3. Implementar la lógica de la función

  4. Reconstruir con npm run build

Solución de problemas

  • Si el servidor no se inicia, verifique si el puerto ya está en uso

  • Asegúrese de que todas las dependencias estén instaladas correctamente con npm install

  • Asegúrese de que TypeScript esté configurado correctamente con un archivo tsconfig.json

  • Si encuentra errores de compilación, intente ejecutar npm install -D typescript @types/node

  • Verificar la conectividad de red para acceder a Pinterest

Licencia

Este proyecto está licenciado bajo la licencia MIT: consulte el archivo de LICENCIA para obtener más detalles.

Opciones de configuración

Variables de entorno

El servidor admite las siguientes variables de entorno para la configuración:

  • MCP_PINTEREST_DOWNLOAD_DIR : Especifica el directorio raíz para descargar imágenes. Si no se configura, el valor predeterminado es el directorio ../downloads correspondiente al script del servidor.

  • MCP_PINTEREST_FILENAME_TEMPLATE : Especifica la plantilla de nombre de archivo para las imágenes descargadas. Si no se configura, el valor predeterminado es pinterest_{imageId}.{fileExtension} .

  • MCP_PINTEREST_PROXY_SERVER : Especifica el servidor proxy que se usará para conectarse a Pinterest. El formato debe ser protocol://host:port , por ejemplo, http://127.0.0.1:7890 o socks5://127.0.0.1:1080 .

Uso

Configuración del directorio de descarga

  1. Establezca el directorio de descarga mediante una variable de entorno (método recomendado):

# 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. Si la variable de entorno no está configurada, el servidor utilizará el directorio de descarga predeterminado (relativo al ../downloads del script del servidor).

Configuración de la plantilla de nombre de archivo

Puede personalizar el patrón del nombre de archivo para las imágenes descargadas utilizando la variable de entorno 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

La plantilla admite las siguientes variables:

  • {imageId} : El ID único de la imagen de Pinterest

  • {fileExtension} : La extensión del archivo (por ejemplo, jpg, png)

  • {timestamp} : Marca de tiempo UTC actual en formato AAAAMMDDHHMMSS

  • {index} : El número de índice al descargar varias imágenes (comienza desde 1)

Plantillas de ejemplo:

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

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

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

  • {timestamp}_pinterest.{fileExtension}

Si la plantilla no es válida (por ejemplo, contiene variables no admitidas o tiene corchetes no coincidentes), el servidor registrará una advertencia y utilizará la plantilla predeterminada.

Configuración del servidor proxy

Si necesita utilizar un proxy para acceder a Pinterest (especialmente en regiones donde Pinterest podría estar restringido), puede establecer la configuración del proxy:

# 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

Protocolos proxy compatibles:

  • HTTP: http://host:port

  • HTTPS: https://host:port

  • CALCETINES4: socks4://host:port

  • CALCETINES5: socks5://host:port

La configuración del proxy afecta tanto al navegador utilizado para la búsqueda como al proceso de descarga de imágenes.

Notas

  • El servidor verificará la existencia y la escritura en el directorio de descarga al iniciarse. Si el directorio no existe, intentará crearlo; si no se puede crear ni escribir en él, el servidor cerrará.

  • Los clientes no deben especificar rutas de descarga o plantillas de nombres de archivos a través de parámetros al llamar a herramientas relacionadas con la descarga, ya que todas las descargas utilizarán la configuración o los valores predeterminados de la variable de entorno del servidor.

  • El servidor desinfecta automáticamente los nombres de archivos reemplazando caracteres ilegales (como / , \ , : , * , ? , " , < , > , | ) con guiones bajos.

Descripción de la interfaz

El servidor proporciona las siguientes herramientas MCP:

  1. pinterest_search : busca imágenes de Pinterest por palabra clave

  2. pinterest_get_image_info : Obtenga información detallada sobre una imagen de Pinterest

  3. pinterest_search_and_download : Busca y descarga imágenes de Pinterest

Para obtener referencias detalladas de los parámetros de la interfaz, consulte las definiciones de la herramienta MCP.

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