Get the FREE Ultimate OpenClaw Setup Guide →

MCP

MCP server from TannisaS/MCP-Server

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio tannisas-mcp-server python tweet_scheduler.py \
  --env TWITTER_PASSWORD="your_twitter_password" \
  --env TWITTER_USERNAME="your_twitter_username" \
  --env GOOGLE_APPLICATION_CREDENTIALS="path/to/service_account.json"

How to use

TweetScheduler is an automation tool that reads tweet content and status information from a Google Sheet, posts tweets to Twitter using Selenium, and updates the sheet once a tweet has been posted. It is exposed via the MCP server so external systems can schedule and manage tweets programmatically through the schedule-tweets tool. The MCP endpoint accepts a sheet_url and sheet_name, enabling you to specify which sheet to read from and where the tweets are located. Use the MCP client to invoke the schedule-tweets tool and pass in the required inputs. This enables automated workflows where other services trigger tweet scheduling without direct interaction with the script.

How to install

Prerequisites:

  • Python 3.8+ installed
  • Google Cloud service account JSON key with Sheets and Drive APIs enabled
  • ChromeDriver installed and in your system PATH

Step-by-step installation:

  1. Clone the repository: git clone https://github.com/your-username/TweetScheduler.git cd TweetScheduler

  2. Install Python dependencies: pip install gspread oauth2client selenium mcp pydantic

  3. Place your Google service account key:

    • Put the service_account.json file in the project directory (or a known path) and update the path in the script
    • Ensure the file path is correctly referenced in your environment variable or script
  4. Ensure ChromeDriver is installed and accessible via PATH. Verify by running chromedriver in your command line.

  5. Prepare environment variables for MCP usage (optional but recommended):

    • Set GOOGLE_APPLICATION_CREDENTIALS to the path of your service account JSON
    • Set TWITTER_USERNAME and TWITTER_PASSWORD with your Twitter credentials (used by Selenium in the script)
  6. Run the script directly to test: python tweet_scheduler.py

Additional notes

Tips and notes:

  • Use a dedicated test Google Sheet and Twitter account to avoid violating Twitter's terms of service.
  • Keep your service account key secure and do not commit it to version control.
  • Selenium-based posting may be rate-limited or blocked by Twitter; implement proper delays and error handling in production.
  • The MCP integration expects a JSON payload with sheet_url and sheet_name via the schedule-tweets tool; ensure the Google Sheet has the required columns (Tweet Content, Status).
  • ChromeDriver version should match your installed Chrome browser version for compatibility.
  • If you encounter authentication issues with Google Sheets, double-check that the service account has access to the target sheet and that the sheet is shared appropriately.

Related MCP Servers

Sponsor this space

Reach thousands of developers