Skip to main content
Glama
x-readonly

x-readonly

by bonsko

x-readonly

A tiny, read-only MCP server for X/Twitter. Built for feeding news, timelines and opinions into a local agent without giving it the ability to post anything.

Seven tools, no writes: no create, no like, no retweet, no DMs. The code only ever calls search, users, tweets, trends and timelines read paths.

  • One file, no MCP SDK. server.mjs speaks JSON-RPC over stdio directly.

  • Works without an account. No token → guest mode: profiles and user timelines read fine. Search, trends and home timelines need a real auth_token (X returns 404 for those GraphQL operations to guests).

  • Nothing is stored. No database, no cache, no logs of posts.

Powered by emusks, a reverse-engineered X API client. That means it impersonates a browser's TLS fingerprint — read their caveats and X's terms before you use it, and use an account you don't mind losing.

Tools

tool

what it does

search

search posts; sort=top or latest (chronological, best for news), cursors, full search operators

user

profile by @username: bio, followers, post count, join date

user_tweets

recent posts from one account: tweets, replies, media, originals, reposts

tweet

a single post by id, with engagement stats

thread

a post plus its reply thread

trends

current trending topics (needs auth)

home

your own Following/For You timeline, latest or home (needs auth)

Results come back as compact text — author, timestamp, id, engagement, body clipped at 600 chars, expanded links, permalink — so a 20-post search costs about a screen of tokens instead of a wall of JSON.

Related MCP server: Twitter/X MCP

Install

git clone https://github.com/bonsko/x-readonly-mcp
cd x-readonly-mcp
npm install --no-audit --no-fund

npm install pulls ~142 MB, almost all of it cycletls (a bundled Go binary that does the TLS impersonation). That is the price of the API answering at all.

The library wants the cookie, not OAuth:

  1. sign in to x.com in a browser

  2. DevTools → Application → Cookies → https://x.com → copy auth_token

  3. save it:

umask 077
mkdir -p ~/.config/x-readonly-mcp
cat > ~/.config/x-readonly-mcp/auth.json <<'EOF'
{"auth_token": "PASTE_HERE"}
EOF
chmod 600 ~/.config/x-readonly-mcp/auth.json

X_AUTH_TOKEN in the environment overrides the file. Without either, the server runs as a guest.

Note that an auth_token is a full-account credential — it can do everything you can. Use an account you don't care about.

Register with an MCP client

{
  "mcpServers": {
    "x-readonly": {
      "command": "node",
      "args": ["/home/you/x-readonly-mcp/server.mjs"]
    }
  }
}

Claude Desktop, Cursor, Hermes and anything else that speaks stdio MCP take that shape. Hermes: hermes mcp add x-readonly --command node --args /path/server.mjs.

Limits

  • Guest tokens are IP-bound and rate-limited hard; expect 429s on long sessions.

  • users.tweets returns a full page (~100) regardless of the requested count; the server trims and reports "showing N of M".

  • Search and trends are plain GraphQL reads — X changes query ids without warning, so a 404 on those means the emusks release needs updating, not that your token is wrong.

Licence

MIT. No warranty, no affiliation with X Corp.

Available Tools

7 tools
homeB

The authenticated account's own timeline (Following + For You). kind=latest is chronological. Needs an auth token.

Inputs: kind, count.

threadC

Fetch a post together with its reply thread/conversation.

Inputs: id (required), count.

tweetB

Fetch a single post by id, including its stats.

Inputs: id (required).

userB

Look up an X profile by @username or bare username.

Inputs: username (required).

user_tweetsB

Recent posts from one account. kind: tweets (default), replies, media, originals, reposts. Newest first.

Inputs: username (required), kind, count.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.3/5.0

    Scored across 7 tools

    Disambiguation4/5

    Each tool targets a reasonably distinct retrieval shape: search is broad query, user is profile lookup, user_tweets is per-account feed, tweet is a single post, thread is a conversation, and home/trends are account-context views. There is some overlap because a single tweet can be fetched by tweet or as the root of thread, and user_tweets could partly be emulated with search's from: operator, but the descriptions make the intended boundaries clear.

    Naming Consistency3/5

    All names are lowercase snake_case, which is consistent at the surface level, but the semantic pattern mixes bare resources (user, tweet, thread, trends), a verb (search), and a compound resource (user_tweets). It remains readable and predictable enough for an agent, but there is no single dominant naming convention such as verb_noun throughout.

    Tool Count5/5

    Seven tools is well-scoped for a read-only X client, covering search, profiles, per-user posts, individual posts, threads, trends, and home timeline without obvious filler. Each tool corresponds to a meaningful browsing operation.

    Completeness4/5

    The surface covers the core read-only workflows for searching and reading X content, including profiles, posts, conversations, trends, and the authenticated home timeline. Minor gaps exist for adjacent read operations such as follower/following lists or bookmarks, but agents can work around these for the stated purpose.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      C
      maintenance
      Enables reading public X (Twitter) content like profiles, tweets, and search results via a stealth browser, without official API costs.
      11
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables reading public X posts, replies, and profiles, and searching X, via Rettiwt by default or the official X API.
      40 npm
      1
      ISC
    • A
      license
      A
      quality
      C
      maintenance
      Provides read-only access to X (Twitter) data — posts, threads, profiles, timelines, followers, media, and trends — through twelve tools, with no login or API key required.
      12
      20 npm
      1
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Enables read-only research on public X data through tools for posts, threads, profiles, search, trends, collections, and saved-result analysis using free public APIs and optional sessions.
      8
      MIT