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

要求

  • 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

A
license - permissive license
A
quality
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

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

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI agents to manage Pinterest boards and pins, create and update pins, and track analytics via the Pinterest API v5.
    4
    MIT
  • F
    license
    A
    quality
    C
    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

View all related MCP servers

Related MCP Connectors

  • Read your Savee saves, boards and home feed, and search its public library. Read-only.

  • Search PubMed/Europe PMC, fetch articles and full text (PMC/EPMC/Unpaywall), citations, MeSH terms.

  • Stealth web browser for agents: search, fetch, click, download and type in persistent MCP sessions.

View all MCP Connectors

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

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