X-Agent
A Twitter/X automation agent combining free reads (cookie-auth CLI) with official API writes (xmcp MCP server). Two-backend design: Agent Reach for search/read, official OAuth for tweets/DMs.
- Repo: https://github.com/Kevin-Liu-01/X-Agent
- Built on: xmcp + Agent Reach
Architecture
Two-backend split driven by cost:
| Path | Tool | Auth | Cost |
|---|---|---|---|
| Read/Search | twitter-cli (Agent Reach) |
Cookie-based | $0 |
| Write (tweet, DM, retweet) | xmcp MCP server | OAuth 1.0a (OOB/PIN flow) | X API credits |
The xmcp server runs as a Cursor MCP (start-xmcp.sh), routing rules in .cursor/rules/x-agent.mdc direct the agent to pick the right backend per action.
Official X API agent surface
Chris Park's April 2026 self-thread matters because X moved from "API endpoint plus docs" toward an explicit agent-facing surface: Pay-Per-Use availability, XMCP/xurl for agents, official Python and TypeScript XDKs, and an API Playground. Current X docs list official Python and TypeScript SDKs, xurl, API Playground, agent resources, and MCP servers as first-class tools. Source: X/@chrisparkX self-thread, 2026-04-05; Source: X docs, checked 2026-07-04
The current MCP docs expose two hosted servers: X MCP at https://api.x.com/mcp for API actions and Docs MCP at https://docs.x.com/mcp for documentation search. The full user-context route is the local xurl mcp bridge, which performs OAuth 2.0 PKCE and injects a fresh bearer token; app-only bearer can connect directly for read-only endpoints. This updates the original X-Agent design: keep the cost split, but treat official docs MCP + xurl bridge as the current source of truth before extending the older local xmcp setup. Source: X MCP docs, checked 2026-07-04
Source snapshot
As of 2026-07-04, xdevplatform/xmcp is an unlicensed public repo on default branch master, HEAD 63d34362d88ed9f94d54ccd5ecd5bb4d12e11759, pushed 2026-04-09T19:59:20Z, with 829 stars, 123 forks, 17 open issues, and no release tags returned by the source check. xdevplatform/xurl is MIT-licensed, default branch main, npm package @xdevplatform/xurl@1.2.2, GitHub HEAD bfb0f365d14f5ed63416d29aa3abbb21a613f5cb, latest tag v1.2.2, pushed 2026-06-29T22:50:53Z, with 1,252 stars, 105 forks, and 7 open issues. The TypeScript XDK package is @xdevplatform/xdk@0.5.0. Source: npm/GitHub source checks, 2026-07-04
Key Decisions
- OOB/PIN OAuth for desktop use - no callback server needed. Token cached to
.oauth_tokensfor persistence across sessions. Source: Cursor transcript, 2026-04-07 - Read + Write + DM permissions on the X Developer Portal app. Required Basic tier ($200/mo credits) for DM access. Source: Cursor transcript, 2026-04-07
- Voice/content gated - agent drafts posts using
social-draftandcontent-strategyskills but never posts without user approval. Source: Cursor transcript, 2026-04-07
Repo Maintenance
Also used as a workspace for batch-updating GitHub repo metadata: ran gh repo edit across ~38 repos under Kevin-Liu-01 to improve About sections and add consistent topic tags. Source: Cursor transcript, 2026-04-07
Timeline
- 2026-04-07 | Project created. xmcp integrated, OAuth OOB flow working, DMs sent to @itscathydi, @itsaryanmahajan, @WindsorNguyen, @supermistyx. Repo pushed to GitHub. Source: Cursor transcript, 2026-04-07
- 2026-04-07 | Batch GitHub repo metadata update: ~38 repos under Kevin-Liu-01 got improved descriptions and topic tags via
gh repo edit. Source: Cursor transcript, 2026-04-07 - 2026-06-17 | Referenced in X For You Algorithm (2026 Open Source) — X open-sourced its For You ranking/moderation stack; relevant to how this agent drafts and times posts (algorithm-aware posting via Algorithmic Slop Throttling (Posting for the X Algorithm)). Source: xai-org/x-algorithm, 2026-05-15
- 2026-07-04 | Source-reviewed Chris Park's X API agent-surface thread and refreshed the official tool stack. X-Agent should now check official X docs, Docs MCP, X MCP, and
xurlbefore extending older localxmcpassumptions; the original read/write cost split still stands. Source: X/@chrisparkX, 2026-04-05; Source: X docs/GitHub/npm, 2026-07-04