Pinterest MCP服务器
一种模型上下文协议(MCP)服务器,用于将Pinterest API与AI代理和LLM集成。
概述
该MCP服务器允许AI代理以标准化的方式与Pinterest API交互,实现以下功能:
- 正在检索用户信息
- 管理Pinterest板(列出、创建、查看)
- 管理引脚(列出、创建、查看)
先决条件
- Node.js(v14或更新版本)
- Pinterest开发者账户
- Pinterest API应用程序凭据
设置
- 克隆此存储库:
git clone https://github.com/yourusername/pinterest-mcp-server.git
cd pinterest-mcp-server- 安装依赖项:
npm install- 创建一个
.env模板中的文件:
cp .env.template .env- 编辑
.env使用您的Pinterest API凭据文件:
PINTEREST_APP_ID=your_pinterest_app_id
PINTEREST_APP_SECRET=your_pinterest_app_secret- 添加 http://localhost:3052/ 作为授权重定向URI
用法
- 启动MCP服务器:
npm start- 如果不存在身份验证令牌,服务器将自动打开浏览器窗口进行身份验证。
- 成功身份验证后,MCP服务器将准备好接受来自AI代理的连接。
与AI代理连接
MCP服务器通过Socket实现MCP协议。IO并公开以下工具:
pinterest.user.get_info-获取用户信息pinterest.boards.list-列出用户板pinterest.boards.create-创建新板pinterest.boards.get-获取电路板详细信息pinterest.pins.list-列出电路板上的引脚pinterest.pins.create-创建新引脚pinterest.pins.get-获取引脚详细信息
您可以使用兼容的MCP客户端库将AI代理连接到此MCP服务器。
示例(Claude.ai桌面应用程序)
- 确保您的MCP服务器正在运行
- 打开克劳德桌面应用程序
- 点击“连接本地工具”(右下角)
- 进入
http://localhost:3052作为服务器URL - 现在,您可以要求Claude执行Pinterest操作,例如:
- “列出我的Pinterest板” - “创建一个名为‘度假创意’的新Pinterest板” - “将此图片固定到我的旅游板上”
许可证
麻省理工学院
