Skip to main content
Glama

Pinterest MCP-сервер

npm-версияЗагрузки НПМ значок кузнеца

Сервер Model Context Protocol (MCP) для поиска изображений и информации на Pinterest.

Функции

  • Поиск изображений на Pinterest по ключевым словам

  • Получите подробную информацию об изображениях Pinterest

  • Полная интеграция с Cursor IDE через MCP

  • Поддержка режима headless-браузера

  • Ограничение контроля результатов поиска

  • Поиск и загрузка изображений из Pinterest

Related MCP server: Cortex

Предпосылки

Установка

Использование NPX (рекомендуется)

Самый простой способ использовать Pinterest MCP Server — через npx:

npx pinterest-mcp-server

Вы можете настроить сервер с помощью параметров командной строки:

# 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}"

Глобальная установка

Чтобы установить пакет глобально и использовать его непосредственно из командной строки:

npm install -g pinterest-mcp-server

После установки вы можете запустить сервер с помощью:

pinterest-mcp-server

С теми же параметрами командной строки, что и у версии NPX:

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

Установка через Smithery

Чтобы автоматически установить mcp-pinterest для Claude Desktop через Smithery :

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
  3. Сборка сервера:

    npm run build
  4. Запускаем сервер:

    npm start

Настройка в качестве сервера 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. Нажмите «Сохранить».

Альтернатива: использование NPX для настройки курсора

Вы также можете настроить Cursor на использование npx-версии сервера:

  1. Открыть курсор IDE

  2. Перейдите в Настройки (⚙️) > Расширения > MCP.

  3. Нажмите «Добавить сервер».

  4. Введите следующие данные:

    • Имя: Pinterest MCP

    • Тип: Команда

    • Команда: npx

    • Аргументы: ["pinterest-mcp-server"]

  5. Нажмите «Сохранить».

Полный пример конфигурации с переменными среды

Для большей гибкости вы можете настроить сервер с помощью переменных среды в конфигурации Cursor MCP:

"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"]
}

Эта конфигурация:

  • Использует npx для запуска сервера

  • Устанавливает пользовательский каталог загрузки на рабочем столе.

  • Использует пользовательский шаблон имени файла с идентификатором изображения и временной меткой.

  • Настраивает прокси-сервер для пользователей в регионах, где Pinterest может быть заблокирован

Добавьте это в файл ~/.cursor/mcp.json или настройте через интерфейс Cursor IDE.

Доступные функции MCP

Сервер предоставляет следующие функции MCP:

  • pinterest_search : Поиск изображений на Pinterest по ключевому слову

    • Параметры:

      • keyword : Поисковый термин (обязательно)

      • limit : количество возвращаемых изображений (по умолчанию: 10)

      • headless : использовать ли режим headless браузера (по умолчанию: true)

  • pinterest_get_image_info : Получите подробную информацию об изображении Pinterest

    • Параметры:

      • image_url : URL-адрес изображения Pinterest (обязательно)

  • pinterest_search_and_download : Поиск и загрузка изображений с Pinterest

    • Параметры:

      • keyword : Поисковый термин (обязательно)

      • limit : количество возвращаемых изображений (по умолчанию: 10)

      • headless : использовать ли режим headless браузера (по умолчанию: true)

Пример использования в курсоре

После настройки вы сможете использовать функции Pinterest MCP непосредственно в чате ИИ Cursor:

Search for robot images on Pinterest

ИИ будет использовать сервер 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 .

Параметры конфигурации

Параметры командной строки (режим NPX)

При использовании сервера через npx вы можете настроить его с помощью следующих параметров командной строки:

  • --downloadDir : Указывает корневой каталог для загрузки изображений.

    npx pinterest-mcp-server --downloadDir /path/to/downloads
  • --filenameTemplate : Указывает шаблон имени файла для загруженных изображений.

    npx pinterest-mcp-server --filenameTemplate "pin_{imageId}_{timestamp}"
  • --port : указывает порт, который будет прослушивать сервер (по умолчанию: 3000)

    npx pinterest-mcp-server --port 8080
  • --proxyServer : указывает прокси-сервер, используемый для подключения к Pinterest.

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

Вы можете комбинировать несколько вариантов:

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

Переменные среды

Сервер также поддерживает следующие переменные среды для конфигурации:

  • 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. Прямо в вашем терминале (как показано в примерах ниже)

  2. В конфигурации Cursor MCP через поле env (см. Полный пример конфигурации )

  3. В файле .env в корневом каталоге проекта

  4. Через параметры командной строки с npx (как показано в разделе «Параметры командной строки »)

Использование

Настройка каталога загрузки

  1. Использование npx с параметрами командной строки:

npx pinterest-mcp-server --downloadDir /path/to/your/download/directory
  1. Задайте каталог загрузки с помощью переменной среды:

# 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. Если переменная окружения не задана, сервер будет использовать каталог загрузки по умолчанию (относительно ../downloads серверного скрипта).

Настройка шаблона имени файла

  1. Использование npx с параметрами командной строки:

npx pinterest-mcp-server --filenameTemplate "pin_{imageId}_{timestamp}.{fileExtension}"
  1. Использование переменной среды:

# 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

Шаблон поддерживает следующие переменные:

  • {imageId} : уникальный идентификатор изображения Pinterest.

  • {fileExtension} : расширение файла (например, jpg, png)

  • {timestamp} : Текущая временная метка UTC в формате ГГГГММДДЧЧММСС

  • {index} : номер индекса при загрузке нескольких изображений (начинается с 1)

Примеры шаблонов:

  • pinterest_{imageId}.{fileExtension} (по умолчанию)

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

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

  • {timestamp}_pinterest.{fileExtension}

Если шаблон недействителен (например, содержит неподдерживаемые переменные или имеет несоответствующие скобки), сервер выведет предупреждение и будет использовать шаблон по умолчанию.

Настройка прокси-сервера

Если вам необходимо использовать прокси-сервер для доступа к Pinterest (особенно в регионах, где Pinterest может быть ограничен), вы можете настроить конфигурацию прокси-сервера:

  1. Использование npx с параметрами командной строки:

npx pinterest-mcp-server --proxyServer "http://127.0.0.1:7890"
  1. Использование переменной среды:

# 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

Поддерживаемые прокси-протоколы:

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

Available Tools

3 tools
pinterest_get_image_infoC

Get Pinterest image information

NameRequiredDescriptionDefault
image_urlYesImage URL

TDQS

C2.1/5.0
Behavior1/5

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

No annotations provided, and the description lacks any behavioral details such as rate limits, authentication, or error handling. It does not even mention that it fetches metadata or requires an image URL.

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

Conciseness2/5

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

The description is a single short sentence, but it is under-specified and lacks necessary detail. It is not a model of conciseness; it is minimal without being helpful.

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

Completeness1/5

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

For a tool that presumably returns image information, the description fails to mention what that information includes, the output format, or any prerequisites. It is completely inadequate given the lack of output schema.

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 description coverage is 100%, with each parameter having a clear description. The tool description adds no extra meaning, but the baseline is adequate.

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

Purpose3/5

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

Description states verb 'Get' and resource 'Pinterest image information', which is clear but vague. It distinguishes from siblings (health, search, similar pins) but does not specify what 'image information' includes.

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 on when to use this tool versus alternatives. The description provides no context for selection.

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

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?

No annotations provided, so description must fully disclose behavior. It omits details like download location, file format, browser automation implications (headless parameter not mentioned), and potential side effects.

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 sentence with no wasted words, but it lacks front-loading of critical context. Appropriate length for the content provided.

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?

With 3 parameters and no output schema, the description fails to explain return behavior (e.g., saved files, temporary storage) or how 'download' works. Incomplete for proper tool invocation.

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%, so baseline is 3. The description adds no additional meaning beyond what is already in the schema for parameters.

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

Purpose5/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', the resource 'images on Pinterest', and the method 'by keyword'. It distinguishes from sibling 'pinterest_search' by adding download functionality.

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 on when to use this tool versus alternatives like 'pinterest_search' or 'pinterest_get_image_info'. The agent is left to infer usage from the name alone.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 3 tool updates
    • First observedpinterest_get_image_info
    • First observedpinterest_search
    • First observedpinterest_search_and_download

TDQS

B3.3/5.0

Scored across 3 tools

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

ActivityMaintained
ResponsivenessUnresponsive

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    A
    maintenance
    An MCP server for capturing, searching, and synthesizing knowledge objects with formal ontology, reasoning, and hybrid retrieval.
    86 PyPI
    20
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    A Model Context Protocol (MCP) server for semantic SVG icon search. Generate infographic SVG icons by keyword — over 100,000 icons with semantic search support.
    1
    9 npm
    1
    MIT