
为企业管理Pinterest广告账户的MCP服务器。
概览
连接你的AI助手(Cursor、Claude Desktop等),这样它可以读取性能数据、运行账户审计并进行更改(先预览,再确认)。 你不需要写代码。你只需复制设置,运行几个终端命令,点击一次Pinterest登录,然后把一个小的JSON配置粘贴到你的AI工具里。 一个小型网页应用加上一个(模型上下文协议)桥接器。MCP是兼容的AI应用调用结构化“工具”的方式,而不是从截图猜测。 多品牌代理仪表盘、账单管理器或删除任何内容的管理面板。一次部署 = 一个广告账户。 1. 将该仓库克隆或下载到你将保留的文件夹(例如 ~/pinterest-ads-mcp)。2. 打开终端,进入该文件夹: 1. 复制模板:2. 在文本编辑器中打开 .env.local 并填写数值(见下文)。 生成强随机秘密(在终端中运行,输出粘贴到.env.local): 使用TOKEN_ENCRYPTION_KEY、MCP_AUTH_TOKEN和OAUTH_STATE_SECRET的数值。
概述(AI 翻译)
把你的AI助手(光标、Claude桌面等)连接到一个Pinterest广告账号,这样它可以读取性能数据、运行账号审计,并进行*受保护**的更改(先预览,然后确认)。
你不需要写代码。你只需复制设置,运行几个终端命令,点击一次Pinterest登录,然后把一个小的JSON配置粘贴到你的AI工具里。
这是什么: 一个小型网页应用加上一个 MCP(模型上下文协议)桥接器。MCP 是兼容的 AI 应用所称的结构化“工具”,而不是从截图中猜测。
**这不是:**多品牌代理仪表盘、账单管理器或删除任何内容的管理面板。一次部署=一个广告账户。
开始之前——清单
安装前请收集这些:
| 需求 | 你为什么需要它 |
|---|---|
| Pinterest 商业账号 | 广告 API 访问与企业身份绑定。 |
| 广告账户 你将管理 | 本服务器锁定于单个PINTEREST_AD_ACCOUNT_ID。 |
| 广告账户角色:管理员或活动经理(分析师为只读) | 写作工具需要创建/更新权限;分析师→应用时的403。 |
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
Pinterest Ads MCP — setup guide
Connect your AI assistant (Cursor, Claude Desktop, etc.) to one Pinterest ad account so it can read performance data, run account audits, and make guarded changes (preview first, then confirm).
You do not need to write code. You will copy settings, run a few terminal commands, click through Pinterest login once, and paste a small JSON config into your AI tool.
What this is: a small web app plus an MCP (Model Context Protocol) bridge. MCP is how compatible AI apps call structured “tools” instead of guessing from screenshots.
What this is not: a multi-brand agency dashboard, billing manager, or delete-anything admin panel. One deployment = one ad account.
Before you start — checklist
Gather these before installing:
| Requirement | Why you need it |
|---|---|
| Pinterest Business account | Ads API access is tied to business identity. |
| Ad account you will manage | This server is locked to a single PINTEREST_AD_ACCOUNT_ID. |
| Ad account role: Admin or Campaign Manager (Analyst is read-only) | Write tools need create/update permission; Analyst → 403 on applies. |
| Valid ads billing on the account (for live ads) | Pinterest may block creation or delivery without billing. |
| Pinterest developer app | OAuth client ID and secret for login. |
| Node.js 20+ and npm | Runs the server locally (nodejs.org). |
| Terminal access on your Mac/PC | For npm install and npm run dev. |
Optional later:
| Requirement | Why |
|---|---|
| Vercel (or similar) account | Host the app on a URL instead of only localhost. |
| Strong secrets | Protect OAuth and MCP endpoints in production. |
Part 1 — Local setup (recommended first)
Step 1 — Get the project on your machine
- Clone or download this repository to a folder you will keep (e.g.
~/pinterest-ads-mcp). - Open Terminal and go to that folder:
cd /path/to/pinterest-ads-mcp
Step 2 — Install dependencies
npm install
Step 3 — Create your environment file
- Copy the template:
cp .env.example .env.local - Open
.env.localin a text editor and fill in values (see Environment variables below).
Generate strong random secrets (run in Terminal, paste output into .env.local):
# 32+ characters — used to encrypt the Pinterest refresh token on disk
openssl rand -base64 32
# 16+ characters — protects the MCP HTTP endpoint
openssl rand -base64 24
# 16+ characters — signs OAuth “state” during login (CSRF protection)
openssl rand -base64 24
Use different values for TOKEN_ENCRYPTION_KEY, MCP_AUTH_TOKEN, and OAUTH_STATE_SECRET.
Step 4 — Create a Pinterest developer app
- Go to Pinterest Developers and sign in with the same business identity that owns the ad account.
- Create an app (or use an existing one).
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →配置
{
"mcpServers": {
"pinterest-ads": {
"url": "http://localhost:3000/api/mcp",
"headers": {
"Authorization": "Bearer YOUR_MCP_AUTH_TOKEN"
}
}
}
}