x-relay-mcp
v1.5.4
Published
Deep-research tool for X/Twitter — CLI (xrelay) + MCP shim + Claude Code skill. Live search, profiles, threads, and an incrementally-synced local cache of your bookmarks and posts. No paid X API.
Maintainers
Readme
x-relay
A read + archive + write tool for X/Twitter for AI agents — a TypeScript CLI (xrelay), an MCP server
(x-relay-mcp), and a Claude Code skill. Cast a wide net with live search, rank candidates cheaply on
engagement metadata, and read full threads only for the finalists — plus a local, incrementally-synced cache
of your own bookmarks and posts, full-fidelity archiving (bookmarks / user timelines / lists / likes /
feed to rich JSON), and write operations (post / reply / quote / like / bookmark / retweet / follow /
delete). No paid X API: a from-scratch engine on X's private GraphQL surface using your login cookies.
Status: complete read + archive + write surface. Design and engine research are in
PLAN.mdanddocs/ENGINE-RESEARCH.md. Built in the spirit of its siblingyoutube-relay-mcp: atomic capabilities, the agent composes the strategy, a generatedSKILL.mdteaches the funnel.
Why a CLI + skill (not just an MCP server)
The task is a search/fetch/rank pipeline. An agent shells out to xrelay, taught by the bundled SKILL.md.
The MCP shim is provided for parity and non-CLI hosts.
Agent ergonomics
xrelay doctor [--offline]— run it first when a call prints nothing, errors oddly, or comes back empty. It checks the install/entry, cookie resolution, live auth, and a test search, and reports what's actually wrong.--offlinediagnoses install/config with no network.- Corpus building —
xrelay batch --file queries.txt --out corpus.jsonruns many query variants strictly serialized (with a--delaybetween calls), deduped by tweet id into one archive;xrelay dedupe <files…> --out merged.json [--sort engagement]merges/ranks passes offline. Don't fire parallel searches — serialize with 2–5s gaps and respecterror.retryAfterMsonRATE_LIMITED;batchhandles that pacing for you. - Compact search output —
--compactreturns flat rows,--fields a,b,cprojects chosen columns, and--sort engagementranks bylikes + replies*3 + bookmarks*2— far cheaper on context for ranking passes. Over MCP thesearchtool returns compact rows by default (compact: falsefor the full envelope).
License
MIT © Tamas Gabor
