A comprehensive Model Context Protocol (MCP) server that provides AI-powered social media management tools. This server enables automated content creation, scheduling, analytics, competitor analysis, and hashtag optimization across multiple platforms.
- Post Scheduling - Schedule posts across Twitter, Instagram, Facebook, LinkedIn
- Hashtag Generation - AI-powered hashtag suggestions with trending analysis
- Analytics & Insights - Comprehensive engagement metrics and audience analytics
- Trending Topics - Real-time trend tracking with content ideas
- Content Management - View and manage scheduled posts
- Content Suggestions - AI-generated content ideas optimized for each platform
- Content Calendar - Strategic content planning with AI recommendations
- Audience Insights - Detailed demographics and engagement analysis
- Competitor Analysis - Track and analyze competitor strategies
- Advanced Hashtags - Smart hashtag optimization with difficulty scoring
- Multi-platform Support - Twitter, Instagram, Facebook, LinkedIn
- Real-time API Integration - Connect with actual social media APIs
- Data Persistence - Intelligent caching and data management
- Secure Authentication - Token-based security for API access
- Scalable Architecture - Built with FastMCP for high performance
- Python 3.8 or higher
- pip (Python package installer)
- ngrok (for external access)
- API keys for social media platforms (optional)
git clone https://github.com/monu808/Social-Media-Management-Suite.git
cd Social-Media-Management-Suite/social-media-mcp-serverpip install -r requirements.txtCreate a .env file in the project root:
# MCP Authentication
AUTH_TOKEN=your_auth_token_here
MY_NUMBER=your_phone_number_here
# Twitter/X API (Optional)
TWITTER_BEARER_TOKEN=your_twitter_bearer_token
TWITTER_API_KEY=your_twitter_api_key
TWITTER_API_SECRET=your_twitter_api_secret
TWITTER_ACCESS_TOKEN=your_twitter_access_token
TWITTER_ACCESS_TOKEN_SECRET=your_twitter_access_token_secret
# Facebook/Instagram API (Optional)
FACEBOOK_APP_ID=your_facebook_app_id
FACEBOOK_APP_SECRET=your_facebook_app_secret
FACEBOOK_ACCESS_TOKEN=your_facebook_access_token
# LinkedIn API (Optional)
LINKEDIN_CLIENT_ID=your_linkedin_client_id
LINKEDIN_CLIENT_SECRET=your_linkedin_client_secret
# AI Services (Optional)
OPENAI_API_KEY=your_openai_api_key
RITEKIT_API_KEY=your_ritekit_api_key
# Analytics Services (Optional)
HOOTSUITE_API_KEY=your_hootsuite_api_keypython mcp_social_server.pyThe server will start on http://0.0.0.0:8086
For external access via Puch AI or other MCP clients:
ngrok http 8086await schedule_post(
content="Your post content here",
platforms="twitter,instagram",
schedule_time="2024-12-25 14:30",
media_url="https://example.com/image.jpg" # optional
)await generate_hashtags(
content="Your post content",
platform="instagram",
count=10
)await get_analytics(
platform="all",
timeframe="30d",
metric_type="engagement"
)await create_content_suggestion(
platform="instagram",
content_type="engagement",
topic="technology"
)| Tool | Description | Parameters |
|---|---|---|
schedule_post |
Schedule posts across platforms | content, platforms, schedule_time, media_url |
generate_hashtags |
Generate relevant hashtags | content, platform, count |
get_analytics |
Get engagement metrics | platform, timeframe, metric_type |
get_trending_topics |
Track trending topics | platform, category, location |
manage_scheduled_posts |
Manage scheduled posts | action, post_id |
create_content_suggestion |
AI content suggestions | platform, content_type, topic |
create_content_calendar |
Strategic content planning | platform, days, focus_topics |
get_audience_insights |
Audience analytics | platform, insight_type |
manage_competitors |
Competitor analysis | action, competitor_name, platforms |
generate_advanced_hashtags |
Advanced hashtag optimization | content, platform, count, strategy |
- Start your server and ngrok
- Get your ngrok URL:
https://your-ngrok-url.ngrok-free.app - In WhatsApp, send:
/mcp use https://your-ngrok-url.ngrok-free.app/mcp/ your_auth_token
Connect to http://your-server:8086/mcp/ with your authentication token.
social-media-mcp-server/
βββ mcp_social_server.py # Main MCP server
βββ requirements.txt # Python dependencies
βββ .env # Environment variables
βββ README.md # This file
βββ .gitignore # Git ignore rules
βββ data/ # Data storage
β βββ scheduled_posts.json
β βββ analytics_cache.json
β βββ trends_cache.json
βββ utils/ # Utility modules
βββ __init__.py
βββ data_manager.py
βββ social_apis.py
βββ hashtag_engine.py
βββ content_creator.py
βββ audience_insights.py
βββ competitor_analysis.py
- Create a Twitter Developer account
- Create a new app and get your credentials
- Add to
.envfile
- Sign up at OpenAI
- Generate an API key
- Add
OPENAI_API_KEYto.env
- Facebook/Instagram: Meta Developer Platform
- LinkedIn: LinkedIn Developer Network
- RiteKit: Hashtag optimization service
Server Not Starting
- Check Python version (3.8+)
- Install dependencies:
pip install -r requirements.txt - Verify port 8086 is available
MCP Connection Failed
- Ensure server is running on correct port
- Check ngrok tunnel is active
- Verify authentication token matches
Missing Utility Modules
- All utility modules are included
- Check for import errors in logs
- Server works with mock data if modules fail
Add debugging to your .env:
DEBUG=true
LOG_LEVEL=debug- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
- FastMCP Documentation: https://gofastmcp.com
- MCP Specification: https://spec.modelcontextprotocol.io
- Puch AI: Connect via WhatsApp for easy access
For issues and questions:
- Create an issue on GitHub
- Check the troubleshooting section
- Review server logs for error details
Built with β€οΈ using FastMCP and Python
Empowering social media management through AI and automation