Skip to main content
Glama
amydojo

pinterest-mcp

by amydojo

pinterest-mcp

一个受保护的远程 MCP 桥接器,用于发布原创 Pinterest Pin,而无需长期停留在 Pinterest 界面中。

当前状态

v0.1 实现了 Pinterest API + MCP 安全核心。它专为 Amy/LabDojo 自己的 Pinterest 企业账户设计,默认使用 dry-run(试运行)。

MCP 工具

  • pinterest_status — 读取安全/配置状态

  • list_boards — 读取画板

  • get_pin — 直接读取 Pin

  • preview_pin — 验证 + 重复检查,从不写入

  • publish_pin — 仅在 live 模式下创建单个图片 Pin

  • publish_batch — 顺序有界批处理,最多 10 个 Pin

  • create_board — 仅在 live 模式下创建单个画板

v0.1 刻意不提供更新或删除工具。

Related MCP server: Andrew Social Bridge

安全契约

  1. PINTEREST_WRITE_MODE=dry-run 是默认值。

  2. 远程 MCP 端点要求 MCP_BRIDGE_TOKEN Bearer 认证。

  3. Pin 的目标链接限制在 PINTEREST_ALLOWED_LINK_HOSTS(默认 Etsy)。

  4. Pin 图片必须使用 HTTPS。

  5. 在 API 调用前强制执行 Pinterest 字段限制:标题 100、描述 800、替代文本 500、链接 2048 个字符。

  6. 创建前,桥接器会检查目标画板是否已有相同规范化标题 + 目标链接的 Pin。

  7. 创建后,桥接器会回读返回的 Pin ID,并验证画板、标题和目标链接。

  8. 批量写入是顺序且有界的,最多 10 个。

  9. 任何秘密都不应出现在 Git、Notion、Figma、Drive 文档或聊天记录中。

认证

MVP 使用 Pinterest 客户端凭据,因为此桥接器自动化的是应用所有者自己的账户。仅将应用 ID 和应用密钥存储在部署环境变量中。Pinterest 要求此授权类型使用双因素认证。

请求的权限范围:

  • boards:read

  • boards:write

  • pins:read

  • pins:write

服务器按需生成并缓存访问令牌;不会提交长期有效的访问令牌。

Pinterest 开发者前提条件

  1. 使用 Pinterest 企业账户并验证其电子邮件。

  2. 为账户/应用所有者启用 2FA。

  3. 注册 Pinterest 开发者应用并申请 API 访问权限。

  4. 试用访问可以练习创建 Pin,但创建的 Pin 仅对创建者可见。标准访问才是公开自动化的生产目标。

  5. 仅将 App ID + App Secret 复制到部署机密中。

环境

复制 .env.example 并进行设置:

PINTEREST_APP_ID=...
PINTEREST_APP_SECRET=...
PINTEREST_WRITE_MODE=dry-run
PINTEREST_DEFAULT_BOARD_ID=...
PINTEREST_ALLOWED_LINK_HOSTS=etsy.com,www.etsy.com
MCP_BRIDGE_TOKEN=<random 24+ char secret>

部署

该仓库已为 Vercel 做好准备。

  • 健康检查:/health

  • MCP:/mcp

MCP 端点使用无状态 Streamable HTTP,因此可以在无服务器基础设施上顺畅运行。

图片交付

Pinterest 可以从公开的 HTTPS image_url 创建图片 Pin。私有的 Google Drive 文件应保持私有,且不是有效的直接 Pinterest 媒体源。

计划中的 Remy 工作流:

Drive approved master -> posting derivative -> controlled public asset URL -> preview_pin -> publish_pin/publish_batch -> Pinterest readback -> Notion status

公开交付层有意与源头真相分离。Drive 仍是权威存档。

Remy Relics

examples/remy-relics-parked-evidence-batch.json 包含四个证据 Pin;在前四个对象 Pin 手动发布后,这些证据 Pin 仍处于暂存状态。在受控公开媒体层接入之前,其图片 URL 有意留空。

本地检查

npm install
npm run check

生产规则

在以下所有条件满足之前,不要将 PINTEREST_WRITE_MODE=live 切换为 live:

  • Pinterest 应用访问已获批准

  • 通过 API 回读验证画板 ID

  • 媒体 URL 是已批准的最终衍生版本

  • preview_pin 显示无冲突

  • 标题/描述/替代文本/链接与规范一致

然后进行窄幅写入,验证 Pin ID,并在进行一次性维护时将桥接器停回 dry-run。

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    B
    maintenance
    A safety-gated MCP bridge for the Instagram API, enabling read-only profile and recent-post access and draft preparation of image posts with human approval for publishing.
    Apache 2.0
  • A
    license
    A
    quality
    C
    maintenance
    A minimal MCP server for the Pinterest API v5 that reads boards, pins, and analytics and publishes new pins and boards, with human sign-off required before any public changes.
    8
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Read-only MCP server for exposing Pinterest boards, sections, pins, and imagery as a visual reference library. Enables ChatGPT and other clients to list, search, and retrieve Pinterest content through natural language.
    MIT