X Algorithm Toolkit
Provides integration with OpenAI's AI models for rewriting, generating, and optimizing tweets based on X's algorithm signals.
ā” 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: SentimentAlpha
š 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
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityDmaintenanceEnables interaction with X (Twitter) to post tweets, threads, and replies while retrieving tweet metrics and account information. It supports core management tasks like deleting tweets and verifying authentication through the Twitter API.Last updatedMIT
- Flicense-qualityDmaintenanceSocial Arbitrage Intelligence: real-time X/Twitter sentiment, narrative velocity & contrarian signals for AI agents, powered by GrokLast updated
- Alicense-qualityDmaintenanceReal-time X/Twitter social intelligence for AI agents and developers, powered by Grok's live search capabilities.Last updated463MIT
Related MCP Connectors
X (formerly Twitter) posts, profiles, and search for AI agents. Free key, self-minted, no signup.
Twitter/X, Instagram, Reddit & TikTok data for AI agents. Billions of posts. No API keys.
IOCs (URLs, domains, IPs, hashes) shared by the infosec community on X/Twitter. No auth, CC0.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/MrChartist/x-algorithm-toolkit'
If you have feedback or need assistance with the MCP directory API, please join our Discord server