Skip to main content
Glama

pinterest-mcp

一个 MCP 服务器,让 Claude(或任何 MCP 客户端)能够搜索 Pinterest 并直接将图片下载到你的机器上——无需手动浏览,无需手动保存。

它通过 Pinterest 自己的内部 Web API(即你在浏览器登录时发出的相同请求)进行通信,并使用你的个人会话 cookie 进行身份验证。Pinterest 没有官方的公共 API 可用于此目的,因此本项目对内部 API 进行了逆向工程。

功能

  • 搜索并下载 — 输入一个关键词,即可将 N 张全分辨率图片保存到本地。

  • 板块下载 — 提供一个板块链接(pin.it 短链接也可用),即可从中获取 N 张图片。

  • 列出板块 — 查看用户的板块及其 Pin 数量,无需直接链接。

  • 板块信息 — 查询板块的名称和 Pin 数量。

  • 重复运行去重 — 重新获取相同查询或板块时,会跳过已下载的图片,而不是重新获取或留下过时文件。

  • 元数据旁车文件 — 每张图片的标题、描述和来源链接会保存到隐藏的 .meta 文件夹中对应的 .json 文件中,从而保持图片文件夹本身的整洁。

Related MCP server: Pinterest MCP Server

要求

  • Python 3.14+

  • uv

  • 一个 Pinterest 账户,并通过浏览器登录

安装

git clone https://github.com/Nuu-maan/pinterest-mcp.git
cd pinterest-mcp
uv sync

此工具以你的身份运行,使用你自己的登录会话——它不会创建或需要单独的 API 密钥。

  1. 在浏览器中打开 pinterest.com,确保你已登录。

  2. 打开开发者工具(F12)→ 网络 标签页。

  3. 刷新页面,点击任何发送到 pinterest.com 的请求。

  4. 在请求标头中找到 Cookie:,并复制整个值。

请将此值保密——它等同于你的登录会话。

配置

使用 Claude Code 注册服务器:

claude mcp add pinterest --scope user \
  -e PINTEREST_COOKIE="<paste your cookie here>" \
  -e PINTEREST_DOMAIN="www.pinterest.com" \
  -- uv --directory /path/to/pinterest-mcp run server.py

PINTEREST_DOMAIN 默认为 www.pinterest.com。如果 Pinterest 在登录时将你重定向到特定国家/地区的域名(例如 in.pinterest.com),请改用该域名。

图片默认保存到 ~/Pictures/pinterest-downloads/<name>/,或者保存到你传递给工具的自定义 out_dir。

用法

配置完成后,只需说:

  • “搜索 Pinterest 上的极简标志设计,下载 10 张”

  • “列出我的 Pinterest 板块”

  • “从这个板块获取 5 个 Pin:https://pin.it/xxxxxxx”

工具

工具

描述

search_pinterest_images(query, count=20, out_dir=...)

搜索并下载图片

get_pinterest_boards(username)

列出用户的板块

get_pinterest_board_info(board_url)

查询板块的名称和 Pin 数量

fetch_pinterest_board(board_url, count, out_dir=...)

从板块下载图片

开发

uv run -- python -m tests.test_pins
uv run -- python -m tests.test_downloader

免责声明

此工具使用 Pinterest 内部的非官方 API,而非公共开发者 API。如果 Pinterest 更改其端点,它可能会失效;频繁使用可能会引起其机器人检测的注意。请仅针对你自己的账户使用,风险自负。

许可证

MIT — 参见 LICENSE。

贡献

参见 CONTRIBUTING.md。

Available Tools

4 tools
fetch_pinterest_boardB

Download up to count full-resolution images from a Pinterest board (accepts pin.it short links).

Inputs: count (required), board_url (required), out_dir.

get_pinterest_board_infoA

Look up a Pinterest board's name and total pin count from its URL (accepts pin.it short links).

Inputs: board_url (required).

get_pinterest_boardsA

List a Pinterest user's boards with url and pin count.

Inputs: username (required).

search_pinterest_imagesB

Search Pinterest for query and download up to count full-resolution images.

Inputs: query (required), count, out_dir.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 4 tools

    Disambiguation4/5

    Each tool has a clear purpose: search images, list boards, get board info, and fetch board images. The slight overlap between search_pinterest_images and fetch_pinterest_board (both download images) is mitigated by their distinct sources (query vs. board). No two tools are truly confusing.

    Naming Consistency4/5

    All names follow a verb_noun pattern (search, get, fetch). However, there is a mix of 'get' and 'fetch' for similar actions, and 'get_pinterest_boards' vs 'get_pinterest_board_info' could be slightly more distinctive. Still, the pattern is consistent enough for an agent to predict behavior.

    Tool Count4/5

    Four tools is a reasonable scope for a Pinterest-focused server. It covers the core actions of searching and retrieving board content without being overly sparse or bloated. The count fits well within the typical 3-15 range.

    Completeness3/5

    The server covers browsing and downloading images from searches and boards, but lacks operations for pin-level details, user profiles, or any create/update/delete actions. For a read-only image-centric tool, it's decent, but there are noticeable gaps for a full Pinterest API surface.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Extracts images, gifs, videos, and search results from Pinterest without authentication. Supports search, pin details, board pins, related pins, autocomplete, and media downloads.
      6
      1
      MIT
    • A
      license
      B
      quality
      D
      maintenance
      Enables image search and information retrieval from Pinterest using the Model Context Protocol. Supports searching by keywords, getting similar pins, and downloading images directly.
      5
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables AI agents to search public Pinterest pins, retrieve pin metadata and media URLs, and download matching images, GIFs, or videos into a local folder, with read-only tools and explicit confirmation for downloads.
      -
    • A
      license
      A
      quality
      B
      maintenance
      Enables AI coding agents to search pins, inspect and preview images, find related pins, read public boards, and download full-resolution originals with no login, API key, or headless browser required.
      6
      2
      MIT