这是一个基于 TypeScript 的 Node MCP(模型上下文协议)服务器项目,其主要价值在于能让你在 Threads(由 Meta 开发的社交媒体平台)上创建帖子,并且还能在帖子中添加来自 Unsplash 的免费图片。
%APPDATA%\Claude\claude_desktop_config.json
~/Library/Application Support/Claude/claude_desktop_config.json
git clone https://github.com/tttn13/threads-mcp
cd threads-mcp
npm install
npm run build
npm start
%APPDATA%\Claude\claude_desktop_config.json
~/Library/Application Support/Claude/claude_desktop_config.json
{
"threads-dev": {
"command": "node",
"args": [
"/Users/path/to/project/build/index.js"
],
"env": {
"HOST": "https://graph.threads.net",
"APP_ID": "threads_app_id",
"APP_SECRET": "threads_app_secret",
"REDIRECT_URI": "public_url",
"INITIAL_USER_ID": "threads_user_id"
}
}
}
git clone https://github.com/tttn13/threads-mcp
cd threads-mcp
npm install
npm run build
threads-mcp
├── src
│ ├── index.ts # 入口点
│ ├── stock-photos.ts # Unsplash HTTP 客户端
│ ├── threads-api.ts # Threads API HTTP 客户端
│ ├── threads-server.ts # Threads MCP 服务器
│ └── types.ts # 类型定义
├── package.json # NPM 包配置
├── tsconfig.json # TypeScript 配置
└── README.md # 项目文档