TI

tayler-id/social-media-mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

23 stars 5 forks 质量 53 趋势 10

一个可连接多个社交媒体平台的模型上下文协议(MCP)服务器

概览

一个模型上下文协议(MCP)服务器,连接多个社交媒体平台,允许用户通过自然语言指令跨平台创建和发布内容。 - :通过简单说明为多个平台创建帖子 - : 自动研究标签、趋势、事实和新闻 - : 发布到 Twitter/X、Mastodon 和 LinkedIn,采用平台特定格式 - : 使用多种 AI 模型生成引人入胜的内容 - : 优雅地处理 API 速率限制,包含队列和备份 - : 跟踪帖子表现并优化内容策略 - Node.js (v18+) - npm 或 yarn - API 密钥:- Twitter/X - Mastodon - LinkedIn - OpenAI 和/或 Anthropic(用于内容生成)- Brave Search(用于研究) 3. 创建一个包含 API 密钥的 .env 文件: 要将此MCP服务器与Claude或其他兼容MCP的助手一起使用,请将其添加到你的MCP设置中: 根据自然语言指令创建并发布内容到社交媒体平台。

概述(AI 翻译)

一个模型上下文协议(MCP)服务器,连接多个社交媒体平台,允许用户通过自然语言指令跨平台创建和发布内容。

特色

  • 自然语言接口:用简单说明为多个平台创建帖子
  • 研究功能:自动研究标签、趋势、事实和新闻
  • 多平台支持:发布到Twitter/X、Mastodon和LinkedIn,采用平台特定格式
  • 内容生成:利用多个AI模型生成引人入胜的内容
  • 速率限制管理:通过排队和回退优雅地处理API速率限制
  • 分析:跟踪帖子表现并优化内容策略

开始

先决条件

  • Node.js(v18+)
  • NPM或纱线
  • API密钥用于:
  • 推特/X
  • 乳齿象 -LinkedIn
  • OpenAI 和/或 Anthropic(用于内容生成)
  • 勇敢搜索(用于研究)

安装

  1. 克隆仓库:

  2. 安装依赖:

  3. 创建一个包含 API 密钥的 .env 文件:

  4. 建设项目:

  5. 启动服务器:

MCP集成

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

Social Media MCP Server

A Model Context Protocol (MCP) server that connects to multiple social media platforms, allowing users to create and publish content across platforms through natural language instructions.

Features

  • Natural Language Interface: Create posts for multiple platforms with simple instructions
  • Research Capabilities: Automatically research hashtags, trends, facts, and news
  • Multi-platform Support: Post to Twitter/X, Mastodon, and LinkedIn with platform-specific formatting
  • Content Generation: Generate engaging content using multiple AI models
  • Rate Limit Management: Handle API rate limits gracefully with queuing and fallbacks
  • Analytics: Track post performance and optimize content strategy

Getting Started

Prerequisites

  • Node.js (v18+)
  • npm or yarn
  • API keys for:
    • Twitter/X
    • Mastodon
    • LinkedIn
    • OpenAI and/or Anthropic (for content generation)
    • Brave Search (for research)

Installation

  1. Clone the repository:
git clone https://github.com/yourusername/social-media-mcp.git
cd social-media-mcp
  1. Install dependencies:
npm install
  1. Create a .env file with your API keys:
# Twitter API Credentials
TWITTER_API_KEY=your_api_key
TWITTER_API_SECRET=your_api_secret
TWITTER_BEARER_TOKEN=your_bearer_token
TWITTER_ACCESS_TOKEN=your_access_token
TWITTER_ACCESS_SECRET=your_access_secret
TWITTER_OAUTH_CLIENT=your_oauth_client
TWITTER_CLIENT_SECRET=your_client_secret

# Mastodon API Credentials
MASTODON_CLIENT_SECRET=your_client_secret
MASTODON_CLIENT_KEY=your_client_key
MASTODON_ACCESS_TOKEN=your_access_token

# LinkedIn API Credentials
LINKEDIN_CLIENT_ID=your_client_id
LINKEDIN_CLIENT_SECRET=your_client_secret
LINKEDIN_ACCESS_TOKEN=your_access_token

# AI API Keys
ANTHROPIC_API_KEY=your_anthropic_key
OPENAI_API_KEY=your_openai_key
BRAVE_API_KEY=your_brave_key

# Application Settings
LOG_LEVEL=info
CACHE_ENABLED=true
RATE_LIMIT_ENABLED=true
  1. Build the project:
npm run build
  1. Start the server:
npm start

MCP Integration

To use this MCP server with Claude or another MCP-compatible assistant, add it to your MCP settings:

{
  "mcpServers": {
    "social-media-mcp": {
      "command": "node",
      "args": ["path/to/social-media-mcp/build/index.js"],
      "env": {
        "TWITTER_API_KEY": "your_api_key",
        "TWITTER_API_SECRET": "your_api_secret",
        "TWITTER_BEARER_TOKEN": "your_bearer_token",
        "TWITTER_ACCESS_TOKEN": "your_access_token",
        "TWITTER_ACCESS_SECRET": "your_access_secret",
        "TWITTER_OAUTH_CLIENT": "your_oauth_client",
        "TWITTER_CLIENT_SECRET": "your_client_secret",
        "MASTODON_CLIENT_SECRET": "your_client_secret",
        "MASTODON_CLIENT_KEY": "your_client_key",
        "MASTODON_ACCESS_TOKEN": "your_access_token",
        "LINKEDIN_CLIENT_ID": "your_client_id",
        "LINKEDIN_CLIENT_SECRET": "your_client_secret",
在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "social-media-mcp": { "command": "node", "args": ["path/to/social-media-mcp/build/index.js"], "env": { "TWITTER_API_KEY": "your_api_key", "TWITTER_API_SECRET": "your_api_secret", "TWITTER_BEARER_TOKEN": "your_bearer_token", "TWITTER_ACCESS_TOKEN": "your_access_token", "TWITTER_ACCESS_SECRET": "your_access_secret", "TWITTER_OAUTH_CLIENT": "your_oauth_client", "TWITTER_CLIENT_SECRET": "your_client_secret", "MASTODON_CLIENT_SECRET": "your_client_secret", "MASTODON_CLIENT_KEY": "your_client_key", "MASTODON_ACCESS_TOKEN": "your_access_token", "LINKEDIN_CLIENT_ID": "your_client_id", "LINKEDIN_CLIENT_SECRET": "your_client_secret", "LINKEDIN_ACCESS_TOKEN": "your_access_token", "ANTHROPIC_API_KEY": "your_anthropic_key", "OPENAI_API_KEY": "your_openai_key", "BRAVE_API_KEY": "your_brave_key" }, "disabled": false, "autoApprove": [] } } }