X Algorithm Toolkit
Provides integration with OpenAI's AI models for rewriting, generating, and optimizing tweets based on X's algorithm signals.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
β‘ X Algorithm Toolkit
Score, optimize, and generate tweets using the actual signal weights from X's open-source recommendation algorithm.
π§ What This Does
This toolkit reverse-engineers X's recommendation algorithm from the open-source codebase and gives you:
Tweet Scorer β Score any draft (0-100) against the actual algorithm weights
Hook Analyzer β Test your opening line against the -11Γ
not_dwelledpenaltyDiversity Calculator β Plan posting cadence using the decay formula from
author_diversity_scorer.rs18 Filter Checker β Run tweets through quality/safety gates
AI Rewrite, Generate & Thread Builder β Multi-provider AI (Groq, Gemini, OpenAI, Claude)
Draft Manager, Compare Mode, Score History β Full workflow tools
Export Scorecard β Branded PNG downloads
Related MCP server: Grok X Insights MCP Server
π The 22 Algorithm Signals
From weighted_scorer.rs + ranking_scorer.rs:
Signal | Weight | What It Means |
Reply | 27.0Γ | #1 signal β end every post with a question |
Bookmark | 10.0Γ | Save-worthy content gets massive boost |
Follow | 4.0Γ | "I want more" β the career signal |
Dwell (Binary) | 2.0Γ | Multi-line posts earn more read time |
Cont. Dwell Time | 1.5Γ | Longer reads score higher |
Click-Dwell Time | 1.5Γ | Deep interest after expanding |
Report | -369Γ | Nuclear penalty β content becomes invisible |
Not Interested | -74Γ | Off-topic = algorithmic death |
Scrolled Past | -11Γ | Weak hooks trigger this |
+ 13 more signals (Like, Repost, Quote, Quoted Click, Share, DM Share, Copy Link, Click, Profile Click, Photo Expand, Video Quality View)
π Quick Start
# Clone
git clone https://github.com/MrChartist/x-algorithm-toolkit.git
cd x-algorithm-toolkit
# Install & Run
npm install
npm run devOpen http://localhost:5173 β no API key needed for scoring, filters, and analysis.
For AI features (Rewrite, Generate, Thread), add an API key in Settings (Groq free tier recommended).
π§ MCP Server (npm)
Install the MCP server to connect the algorithm engine to any AI assistant:
Option 1: Via npx (Recommended)
Add to claude_desktop_config.json:
{
"mcpServers": {
"x-algorithm": {
"command": "npx",
"args": ["-y", "x-algorithm-mcp"]
}
}
}Option 2: Global Install
npm install -g x-algorithm-mcpOption 3: From Source
cd mcp && npm install && npm run build11 Tools: score_tweet, check_filters, analyze_hook, get_signals, get_optimal_schedule, compare_tweets, detect_spam_patterns, diversity_penalty, classify_niche, get_thread_strategy, full_audit
3 Resources: x-algorithm://weights, x-algorithm://filters, x-algorithm://niches
π― AI Skill (Antigravity / Gemini CLI)
400+ lines of domain expertise that makes any AI an X algorithm expert:
Install Globally
mkdir -p ~/.gemini/antigravity/skills/x-algorithm-expert
curl -o ~/.gemini/antigravity/skills/x-algorithm-expert/SKILL.md \
https://raw.githubusercontent.com/MrChartist/x-algorithm-toolkit/master/skill/SKILL.mdWhat's Covered:
All 22 signal weights with optimization strategies
Phoenix Grok-based transformer architecture
77+ topic categories from
topic_ids_filter.rs10-point scoring system with letter grades
Hook writing rules and 7 templates
Author diversity decay formula
OON viral mechanics
Thread building strategy (6 templates)
18 safety filter checklist
Niche-specific optimization (7 niches)
π Architecture
x-algo-toolkit/
βββ src/ # React Web App (13 tabs)
β βββ engine/ # Scoring engine + AI abstraction
β βββ components/ # 15 UI components
βββ mcp/ # MCP Server (11 tools, 3 resources)
β βββ src/ # TypeScript source
β βββ dist/ # Compiled output
β βββ package.json # npm: x-algorithm-mcp
βββ skill/ # AI Skill
β βββ SKILL.md # 400+ line expertise file
βββ public/ # Static assetsπ οΈ Tech Stack
Frontend: React 19, TypeScript, Vite
Animations: Framer Motion
AI: Multi-provider (Groq/Gemini/OpenAI/Claude)
MCP:
@modelcontextprotocol/sdkv1.12+Storage: localStorage (no backend needed)
π License
MIT β Built by @Mr_Chartist
Data sourced from X's open-source algorithm: weighted_scorer.rs, ranking_scorer.rs, author_diversity_scorer.rs, oon_scorer.rs, topic_ids_filter.rs, recsys_model.py
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
This server cannot be deployed
Maintenance
Related MCP Connectors
Evidence for your AI's next X post: your post metrics, X ranking weights and chosen references.
Stop guessing what works on X/Twitter. Analyze your history, draft in your voice, schedule posts.
X assistant: researches your niche daily, scores the posts your AI writes, publishes approved ones.
Polymarket & Kalshi sentiment from X (Twitter) via Grok. Free daily scores; live scoring via x402.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceSocial Arbitrage Intelligence: real-time X/Twitter sentiment, narrative velocity & contrarian signals for AI agents, powered by Grok-
- AlicenseNot gradedqualityDmaintenanceReal-time X/Twitter social intelligence for AI agents and developers, powered by Grok's live search capabilities.3MIT
- AlicenseNot gradedqualityDmaintenanceProvides MCP tools to fetch, filter, curate, and summarize high-quality content from X (Twitter), reducing noise and focusing on high-signal posts, threads, and accounts.MIT

OpenTweet MCP Serverofficial
AlicenseAqualityCmaintenanceProvides 30 tools to post, schedule, thread, and analyze X (Twitter) content, including AI media generation and multi-account management. No X developer account or OAuth setup required.30162 npmMIT