threads-mcp

threads-mcp

site icon
2025.04.18 0
TypeScript社交媒体自动化内容生成交流协作
threads-mcp 是一个基于 TypeScript 的 Node MCP (Model Context Protocol) 服务器,主要用于在 Threads(Meta 的社交媒体平台)上创建帖子,并可以从 Unsplash 获取库存照片添加到帖子中。该项目提供了与 Threads API 和 Unsplash API 的集成,使得用户可以通过简单的命令在 Threads 上发布带有图片的帖子。
View on GitHub

Overview

基本能力

产品定位

threads-mcp 是一个社交媒体自动化工具,专注于在 Threads 平台上自动化发布帖子,并支持从 Unsplash 获取相关图片。

核心功能

  1. Threads 帖子发布:通过 Threads API 发布新帖子。
  2. Unsplash 图片集成:从 Unsplash 获取库存照片并添加到帖子中。
  3. MCP 服务器:作为 Model Context Protocol 服务器,与 Claude Desktop 集成,提供无缝的用户体验。

适用场景

  1. 社交媒体管理:自动化发布 Threads 帖子,节省时间。
  2. 内容创作:快速生成带有高质量图片的帖子。
  3. 开发者工具:为开发者提供 Threads 和 Unsplash API 的集成示例。

工具列表

  1. post_thread:发布新帖子并从 Unsplash 获取图片。

常见问题解答

  1. 如何获取 API 密钥:需要从 Unsplash 和 Meta Developer 平台获取相应的 API 密钥。
  2. 如何配置环境变量:需要在 Claude Desktop 的配置文件中添加相应的环境变量。
  3. 如何授权:Claude Desktop 会引导用户完成授权过程以获取长期令牌。

使用教程

使用依赖

  1. 从 Unsplash 获取 API 密钥。
  2. 在 Meta Developer 平台创建应用并获取 Threads API 的密钥(App ID、App Secret、Redirect Callback URL)。

安装教程

  1. 克隆仓库:
git clone https://github.com/tttn13/threads-mcp
cd threads-mcp
  1. 安装依赖:
npm install
  1. 构建项目:
npm run build
  1. 运行项目:
npm start

调试方式

  1. 确保所有环境变量已正确配置。
  2. 重启 Claude Desktop 以应用配置更改。
  3. 使用 post_thread 功能测试帖子发布。

示例用法

尝试询问 Claude: - "Can you post a thread about cats with photos"

许可证

该项目遵循 MIT 开源许可条款。