Twitter Voice MCP MCP Server

$git clone https://github.com/robgrappler/twitter-voice-mcp twitter-voice-mcp && cd twitter-voice-mcp && python3 -m venv .venv && source .venv/bin/activate && pip install -r requirements.txt && cp .env.example .env
README.md

Generates tweets in your unique voice and manages drafts for Twitter/X.

twitter-voice-mcp

An MCP server that generates tweets in your unique voice and manages drafts for Twitter/X.

Features

  • Voice Analysis: Analyze your Twitter/X voice from existing tweets or custom text
  • AI-Powered Tweet Generation: Generate new tweets in your voice about any topic
  • Draft Management: Create, review, and post tweet drafts
  • Retweet Drafts: Generate voice-aligned comments for quote tweeting
  • Image Tweet Generation: Automatically generate tweets for images in a folder
  • Multi-AI Support: Works with Gemini, OpenAI, or Anthropic models

Installation

Prerequisites

  • Python 3.10+
  • Twitter/X API credentials (Bearer Token)
  • AI API key (Gemini, OpenAI, or Anthropic)

Setup

# Clone and navigate to directory
git clone <repo-url> twitter-voice-mcp
cd twitter-voice-mcp

# Create virtual environment
python3 -m venv .venv
source .venv/bin/activate

# Install dependencies
pip install -r requirements.txt

# Copy env template and add your credentials
cp .env.example .env
# Edit .env with your API keys

Environment Variables

GEMINI_API_KEY=your-gemini-key
OPENAI_API_KEY=your-openai-key
ANTHROPIC_API_KEY=your-anthropic-key
TWITTER_BEARER_TOKEN=your-twitter-bearer-token

MCP Client Installation

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "twitter-voice-mcp": {
      "command": "python",
      "args": [
        "/absolute/path/to/twitter-voice-mcp/src/server.py"
      ],
      "env": {
        "GEMINI_API_KEY": "your-key",
        "TWITTER_BEARER_TOKEN": "your-token"
      }
    }
  }
}

Docker

FROM python:3.14-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install -r requirements.txt
COPY src /app/src
CMD ["python", "src/server.py"]

Available Tools

  • configure_ai_model - Set AI provider and model
  • analyze_my_voice - Analyze voice from tweets
  • import_voice_profile - Import pre-analyzed profile
  • analyze_from_file - Analyze voice from text file
  • generate_draft_tweets - Generate tweets on a topic
  • generate_retweet_drafts - Generate quote tweet comments
  • list_pending_drafts - View all draft tweets
  • approve_and_post_draft - Post approved draft to Twitter
  • export_drafts_csv - Export drafts to CSV
  • scan_and_draft_tweets_from_images - Auto-generate tweets from images

License

MIT

Tools (10)

configure_ai_modelSet AI provider and model.
analyze_my_voiceAnalyze voice from tweets.
import_voice_profileImport pre-analyzed profile.
analyze_from_fileAnalyze voice from text file.
generate_draft_tweetsGenerate tweets on a topic.
generate_retweet_draftsGenerate quote tweet comments.
list_pending_draftsView all draft tweets.
approve_and_post_draftPost approved draft to Twitter.
export_drafts_csvExport drafts to CSV.
scan_and_draft_tweets_from_imagesAuto-generate tweets from images.

Environment Variables

GEMINI_API_KEYrequiredGemini API key for AI provider
OPENAI_API_KEYrequiredOpenAI API key for AI provider
ANTHROPIC_API_KEYrequiredAnthropic API key for AI provider
TWITTER_BEARER_TOKENrequiredTwitter/X Bearer Token for API access

Configuration

claude_desktop_config.json
{
  "mcpServers": {
    "twitter-voice-mcp": {
      "command": "python",
      "args": [
        "/absolute/path/to/twitter-voice-mcp/src/server.py"
      ],
      "env": {
        "GEMINI_API_KEY": "your-key",
        "TWITTER_BEARER_TOKEN": "your-token"
      }
    }
  }
}

Try it

Configure AI model to use Gemini with gemini-1.5-pro.
Analyze my voice from recent tweets.
Generate draft tweets about the latest AI advancements.
List all pending drafts.
Approve and post draft number 1 to Twitter.

Frequently Asked Questions

How do I install Twitter Voice MCP?

Install Twitter Voice MCP by running: git clone https://github.com/robgrappler/twitter-voice-mcp twitter-voice-mcp && cd twitter-voice-mcp && python3 -m venv .venv && source .venv/bin/activate && pip install -r requirements.txt && cp .env.example .env

What MCP clients work with Twitter Voice MCP?

Twitter Voice MCP works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Use Twitter Voice MCP with Conare

Manage MCP servers visually, upload persistent context, and never start from zero with Claude Code & Codex.

Try Free