Social Media Sync MCP server

Enables cross-platform social media content creation by integrating Twitter, Mastodon, and LinkedIn through a unified server that leverages multiple AI models for generating and posting content with robust platform-specific formatting and research capabilities.
Back to servers
Setup instructions
Provider
Tayler Ramsay
Release date
Mar 07, 2025
Language
TypeScript
Stats
7 stars

The Social Media MCP Server is a Model Context Protocol server that connects to multiple social media platforms. It allows you to create and publish content across Twitter/X, Mastodon, and LinkedIn through simple natural language instructions, with built-in research capabilities and AI-powered content generation.

Installation

Prerequisites

Before installing the server, ensure you have:

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

Setup Process

  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",
        "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": []
    }
  }
}

Using the MCP Tools

Creating Posts

The create_post tool lets you create and post content to social media platforms using natural language instructions:

{
  "instruction": "Post about the latest AI developments in healthcare",
  "platforms": ["twitter", "mastodon", "linkedin"],
  "postImmediately": false
}

This tool will:

  • Process your natural language instruction
  • Research relevant information if needed
  • Generate appropriate content for each platform
  • Either post immediately or return drafts for your approval

Researching Topics

Use the research_topic tool to gather information before creating posts:

{
  "topic": "artificial intelligence ethics",
  "includeHashtags": true,
  "includeFacts": true,
  "includeTrends": true,
  "includeNews": true
}

This will return relevant information about your topic, including popular hashtags, key facts, trending discussions, and recent news.

Getting Trending Topics

The get_trending_topics tool helps you stay current with what's popular on social media:

{
  "platform": "twitter",
  "category": "technology",
  "count": 5
}

This returns the top trending topics from your specified platform and category, which you can use to inform your content strategy.

Features and Capabilities

The Social Media MCP Server offers:

  • Multi-platform Publishing: Post to Twitter/X, Mastodon, and LinkedIn with platform-specific formatting
  • AI-Powered Content: Generate engaging content using multiple AI models
  • Research Integration: Automatically research hashtags, trends, facts, and news
  • Rate Limit Management: Handle API rate limits with queuing and fallbacks
  • Performance Tracking: Analytics to track post performance

When creating posts, the server intelligently formats content for each platform, ensuring optimal presentation whether you're posting to Twitter's character-limited environment or LinkedIn's professional audience.

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "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":[]}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "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": []
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "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": []
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later