universal-social
universal-social
A social network with no website. Posts from any network are ranked by the open-source X algorithm, every ranking change is in a public changelog, you drive it through Grok Bot (MCP) or a CLI, and the only public output is X, one approved post at a time.
Bluesky ─┐ ┌─ why_this (every stage)
Mastodon ┼─ read-only adapters ─► local DB ─► X-algorithm ranking ─┼─ algo_compare (old vs new weights)
local ───┘ (SQLite) (pinned version) └─ X queue ─► approve_post ─► XX algorithm ranking. Real weight defaults from xai-org/x-algorithm, versioned per upstream commit, with the value model, mutual-follow boost, author diversity and out-of-network factor ported from upstream. See docs/RANKING.md for what is and is not X's algorithm.
Built-in algorithm changelog.
algo_changeloglists every ranking parameter change (13 versions, Aug 13 to Dec 2, 2026 in the bundled data),pin_versionfixes the version you rank with, andalgo_comparere-ranks your feed under old and new weights. Changelog entries can be queued as X posts, like @XAlgoChangelog.Why you saw this.
why_thisshows the source, every filter, every scoring head (prediction × weight = contribution), the multipliers, and the final rank.Universal. An adapter layer in the spirit of universal-adapter: live, keyless, read-only adapters for Bluesky (public AppView) and Mastodon (any instance's public API), plus native local posts. An X read adapter has its interface in place but is not implemented yet.
X is the only output.
queue_for_x/queue_changelogput text in a queue; nothing posts untilapprove_post. Dry-run is the default. Other people's posts go out as a short attributed quote with a link to the original, never as a copy.No site, by design. No HTTP server, no ports, no accounts to steal. See SECURITY.md for the threat model, including what remains.
Local-only, zero dependencies. Node.js built-ins only (
node:sqlite), one SQLite file, an append-only hash-chained action log.
Run it
Needs Node.js 22.13 or newer. No npm install needed.
git clone https://github.com/fitzyracing1/universal-social && cd universal-social
npm run cli -- seed_demo # demo users and posts (local)
npm run cli -- ingest --adapter bluesky # public Bluesky "what's hot"
npm run cli -- ingest --adapter mastodon --tag opensource
npm run cli -- rank_feed --limit 10
npm run cli -- why_this --post_id <id from the feed>
npm run cli -- algo_changelog
npm run cli -- algo_compare --from 47c1bcd
npm testnpm start runs the MCP server on stdio. To hook it into Grok Bot or another
MCP host, see docs/GROK-BOT.md. Data lives in
~/.universal-social/social.db (set US_DATA_DIR or US_DB_PATH to move it).
Related MCP server: @chirpie/mcp
MCP tools (also CLI commands)
Tool | What it does |
| DB path, owner, pinned version, publisher mode, counts |
| Owner + 3 demo users, follows, sample posts |
| Local accounts (no sign-up, no passwords) |
| See adapters; pull public posts from Bluesky or Mastodon |
| Native post or reply; optional |
| Social graph and filters (works on imported accounts too) |
| Local engagement signals |
| A post and its replies |
| For You feed ranked with the X algorithm |
| Stage-by-stage breakdown for one post |
| Known x-algorithm versions and every ranking change |
| Same feed under old vs new weights, with rank moves |
| Choose the version the feed ranks with |
| Add to the X approval queue |
| Queue by status |
| Publish one approved item (dry-run unless live is configured) |
| Reject an item permanently |
| Read and verify the append-only log |
Posting to X
Publishing is off until both are true:
US_X_PUBLISH=liveX_API_KEY,X_API_SECRET,X_ACCESS_TOKEN,X_ACCESS_TOKEN_SECRET(OAuth 1.0a user context for the account that should post) are set in the environment.
Then approve_post --id N --approved_by "<who>" sends that one item to
POST https://api.x.com/2/tweets. Credentials are read from the environment
at call time and are never stored, logged, or returned.
Limits
The predictions the weights multiply are a local heuristic, not X's Phoenix model, so the order is "X's weights applied to simple signals", not "what X would show you".
Reading from X is not implemented (it needs a paid API tier).
Live posting to X is tested only against a fake X API; no real post has been made.
Single machine, single owner. There is no sync between machines.
Imported posts are snapshots; counts update when you ingest again.
Credits and license
MIT, Copyright (c) 2026 Joshua Almeida. Ranking parameters and ported value-model logic come from xai-org/x-algorithm under the Apache License 2.0; see NOTICE and LICENSES/Apache-2.0.txt. Not affiliated with X Corp. or xAI.
Available Tools
27 toolsaction_logB
Read the append-only, hash-chained action log (newest first) and verify the chain.
Inputs: limit.
algo_changelogA
Changelog of every x-algorithm ranking-parameter change (old -> new), with plain-English notes from fitzyracing1/x-algorithm-changelog where available.
Inputs: limit.
algo_compareA
Rank the same feed under two x-algorithm versions and show how each post moved (old weights vs new weights).
Inputs: from (required), as, to, limit, +1 more.
algo_versionsB
List the x-algorithm ranking versions this app knows (one per upstream commit that changed a ranking parameter).
Inputs: no named parameters.
approve_postA
Approve one queued item and publish it to X. Only call after the account owner explicitly approved this exact text. In dry-run mode (default) nothing is sent and the item stays approved; it is sent when approved again in live mode.
Inputs: id (required), approved_by (required).
compose_postA
Write a native post (stored locally). Optionally also put it in the X approval queue; it is still not posted until approve_post.
Inputs: text (required), as, reply_to, queue_for_x.
create_userA
Create a local account (no sign-up, no password; it exists only in this local DB).
Inputs: handle (required), name.
followB
Follow an account (local or imported) so its posts are in-network.
Inputs: target (required), as.
ingestA
Pull public posts in from another network through a read-only adapter (bluesky or mastodon) and store them locally so they can be ranked. Never posts anywhere.
Inputs: adapter (required), tag, feed, actor, +3 more.
likeB
Like a post (local signal only).
Inputs: post_id (required), as.
list_adaptersC
List the network adapters (universal input layer), their status, and options.
Inputs: no named parameters.
list_queueB
List X queue items, optionally by status (pending, approved, rejected, posted, failed).
Inputs: status.
list_usersB
List local accounts.
Inputs: no named parameters.
muteB
Mute an account (its posts are filtered out).
Inputs: target (required), as.
mute_wordC
Hide posts containing a word or phrase.
Inputs: word (required), as.
not_interestedA
Mark a post not interested (removes it and lowers that author).
Inputs: post_id (required), as.
pin_versionB
Pin the x-algorithm version the feed ranks with ("latest" follows the newest synced version).
Inputs: version (required).
queue_changelogA
Queue an x-algorithm changelog entry as an X post (like @XAlgoChangelog). Still needs approve_post.
Inputs: version.
queue_for_xA
Add a post to the X approval queue. Your own posts go out as written; posts from other people/networks become an attributed quote with a link to the original. Nothing is posted until approve_post.
Inputs: text, post_id.
rank_feedA
Rank the For You feed for a user with the X algorithm weights (pinned version unless "version" is given). Returns ranked posts with scores.
Inputs: as, limit, version, max_age_hours.
reject_postB
Reject a queued item so it can never be posted.
Inputs: id (required), reason.
repostA
Repost inside universal-social (local only; use queue_for_x to share on X).
Inputs: post_id (required), as.
seed_demoA
Create the owner account, three demo users, follows and sample posts (local only). Safe to run twice.
Inputs: no named parameters.
statusA
Show the database path, owner, pinned x-algorithm version, X publisher mode, and counts.
Inputs: no named parameters.
threadB
Show a post and its replies.
Inputs: post_id (required).
unfollowC
Stop following an account.
Inputs: target (required), as.
why_thisB
Explain why a post ranked where it did: source, each filter, every scoring head (prediction x weight), author-diversity and out-of-network multipliers, final rank.
Inputs: post_id (required), as, version, max_age_hours.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 27 tools
Most tools target a distinct resource+action: ranking (rank_feed, why_this, algo_compare), adapters (list_adapters, ingest), and the X queue (queue_for_x, approve_post, reject_post, list_queue) are cleanly separated. The main risk is compose_post vs queue_for_x vs repost vs queue_changelog, plus the mute/mute_word/not_interested cluster, but the descriptions explicitly disambiguate each of these.
The dominant convention is verb_noun (create_user, list_users, rank_feed, pin_version, approve_post, reject_post, queue_for_x), with a coherent algo_* prefix family. However a substantial minority are bare nouns or unqualified verbs (status, thread, action_log, ingest, follow, mute, like, repost), and the list_ prefix is applied to only two of the four listing tools (list_users, list_adapters, list_queue yes, but algo_versions and status are not list_*).
27 tools exceeds the comfortable range, though the server genuinely spans four sub-domains (local social graph, ingest adapters, X-algorithm ranking, X publishing queue). Several tools are narrow single-purpose probes (status, why_this, algo_versions, algo_changelog, action_log) that push the surface toward heavy without being obviously redundant.
The core lifecycle is covered—users, posts, follows, feed ranking, algorithm versioning, and a full queue lifecycle (queue, list, approve, reject)—but notable gaps remain. mute and mute_word have no unmute counterpart, and there is no delete/edit for users or posts, leaving several dead ends an agent cannot undo.
Maintenance
Related MCP Connectors
Agent-first social media publishing, scheduling, analytics, and unified inbox API + 16-tool MCP server across 18 social platforms (X, LinkedIn, Instagram, YouTube, TikTok, Threads, Bluesky, Reddit, Telegram, Discord, Mastodon, Facebook, Pinterest).
Draft, schedule and publish posts on X, Threads, Bluesky and LinkedIn from any MCP client.
Bluesky posts, profiles, feeds, threads & Substack newsletter search and publication feed MCP API.
Bluesky posts, profiles, feeds, threads & Substack newsletter search and publication feed MCP API.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables MCP-based interaction with the X (Twitter) API v2, supporting reads like timeline, mentions, and search, and writes through a two-step draft-and-confirm process that ensures human-visible previews before any public post.-
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to post, schedule, thread, delete, and analyze social media posts across platforms like X, Bluesky, LinkedIn, and Instagram through a single MCP interface.MIT
- AlicenseBqualityDmaintenanceEnables access to the X API v2 through MCP, covering 175 of 190 published operations with tools for browsing, calling, posting, searching, and managing posts.711 npmMIT
- AlicenseNot gradedqualityCmaintenanceEnables MCP clients to search and read X (Twitter) posts, publish posts and threads, upload media, and track account activity through budget-guarded tools that require a dry-run confirmation before anything is published and log estimated spend locally.MIT