X’s (formerly Twitter) hosted MCP server, connected through the open-source
xurlbridge (xdevplatform/xurl).
Why it matters
Searching X posts or analyzing a user’s timeline meant the X developer portal or the raw API. Connect the X MCP and you can search posts and users, manage bookmarks, fetch trends, and draft Articles as a conversation in Claude Code.
What you can do
Representative tasks from X’s official docs:
- Search posts — “Search the full archive for ‘Claude Code’ posts from the last week and summarize them.” (full-archive search)
- Analyze users — “Look up @username and summarize the main topics in their recent timeline.” (user lookup, timeline)
- Manage bookmarks — “Bookmark this post into my ‘AI’ folder.” (bookmarks, folders)
- Trends and news — “Show me what’s trending right now and the related news.” (trends by WOEID, news)
- Draft Articles — “Draft an X Article from this content.” (draft Articles)
Grounded in docs.x.com/tools/mcp.
Key features
- Posts — fetch posts, see likers/reposters/quoters, recent counts
- Search — full-archive post search, user search, news search
- Users — resolve current user, look up by ID/handle, read posts/timeline/mentions
- Bookmarks — list, add, remove, manage folders
- News & Trends — get stories, trends by location (WOEID)
- Articles — create and publish draft Articles
Cost
The MCP server and the xurl bridge are free, but every tool call goes through the X API. The X API has no free tier — it “uses pay-per-usage pricing. No subscriptions—pay only for what you use.” You buy credits upfront in the developer console and they are deducted as you call. There are no contracts, subscriptions, or minimum spend.
| Operation | Charged | Rate |
|---|---|---|
| Posts (read) | per resource returned in the response | $0.005 |
| Users (read) | per resource returned in the response | $0.010 |
| Likes, mutes, blocks (read) | per resource returned in the response | $0.001 |
| Owned Reads (your own data) | per resource returned in the response | $0.001 |
| Post creation | per request | $0.015 |
| Posts with URLs | per request | $0.200 |
Reads bill on resources returned, not on the number of requests. “Search the full archive for ‘Claude Code’ posts from the last week” returning 100 posts costs $0.5, so a single broad conversation can add up quickly — set a spending limit in the developer console.
Grounded in docs.x.com/x-api/getting-started/pricing.
Setup
The app you create in the X Developer Portal has to be moved to the Pay-per-use package and the Production environment before the MCP server will work.
OAuth 2.0 (read and write):
claude mcp add xapi --env CLIENT_ID=YOUR_X_APP_CLIENT_ID --env CLIENT_SECRET=YOUR_X_APP_CLIENT_SECRET -- npx -y @xdevplatform/xurl mcp https://api.x.com/mcp
App-only Bearer (read-only):
claude mcp add --transport http xapi https://api.x.com/mcp --header "Authorization: Bearer YOUR_APP_ONLY_BEARER_TOKEN"
Notes
- Usage limits — writes (bookmarks,
article_publish) count against rate limits and are stricter than reads; expect occasional429s and back off. Pay-per-usage plans are capped at 2 million Post reads per monthly billing cycle, above which you need an Enterprise plan - Auth — OAuth 2.0 PKCE (automatic token refresh) needs the X app’s
CLIENT_IDandCLIENT_SECRET; read-only uses an app-only Bearer token. For remote/server environments, usexurl auth oauth2 --headless - First run — the first OAuth login needs a browser, so set
startup_timeout_secto 300+ in client configs - Install command source — the official docs provide a
claude_desktop_config.jsonJSON for Claude Desktop; the commands above port that to Claude Code’sclaude mcp addform - License — the
xurlbridge is MIT; the MCP server is a service hosted by X