pinterest-mcp
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+
一个 Pinterest 账户,并通过浏览器登录
安装
git clone https://github.com/Nuu-maan/pinterest-mcp.git
cd pinterest-mcp
uv sync获取你的 Pinterest cookie
此工具以你的身份运行,使用你自己的登录会话——它不会创建或需要单独的 API 密钥。
在浏览器中打开 pinterest.com,确保你已登录。
打开开发者工具(F12)→ 网络 标签页。
刷新页面,点击任何发送到
pinterest.com的请求。在请求标头中找到
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.pyPINTEREST_DOMAIN 默认为 www.pinterest.com。如果 Pinterest 在登录时将你重定向到特定国家/地区的域名(例如 in.pinterest.com),请改用该域名。
图片默认保存到 ~/Pictures/pinterest-downloads/<name>/,或者保存到你传递给工具的自定义 out_dir。
用法
配置完成后,只需说:
“搜索 Pinterest 上的极简标志设计,下载 10 张”
“列出我的 Pinterest 板块”
“从这个板块获取 5 个 Pin:https://pin.it/xxxxxxx”
工具
工具 | 描述 |
| 搜索并下载图片 |
| 列出用户的板块 |
| 查询板块的名称和 Pin 数量 |
| 从板块下载图片 |
开发
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 toolsfetch_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
Scored across 4 tools
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.
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.
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.
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
Related MCP Connectors
Pinterest pins, boards, profiles and keyword search to JSON: saves, images, links, creators.
Download and save Pinterest boards, Instagram posts and web pages into a library you own.
Pinterest automation: schedule pins, manage boards, write AI blogs and auto-pin them.
Create Pinterest pins from blog posts and Shopify/Etsy products, and schedule them to your boards.
Related MCP Servers
- AlicenseAqualityDmaintenanceExtracts images, gifs, videos, and search results from Pinterest without authentication. Supports search, pin details, board pins, related pins, autocomplete, and media downloads.61MIT
- AlicenseBqualityDmaintenanceEnables image search and information retrieval from Pinterest using the Model Context Protocol. Supports searching by keywords, getting similar pins, and downloading images directly.5MIT
- FlicenseNot gradedqualityDmaintenanceEnables 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.-
- AlicenseAqualityBmaintenanceEnables 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.62MIT