X Official MCP Server: Setup, Cost and Limits (2026)
X's official MCP runs at api.x.com/mcp. What it needs (your own developer app), what calls cost on pay-per-use, which tools write, and when to pick another.
Tarun Khatri
Published · Updated · 8 min read
X's official MCP server is a hosted endpoint at api.x.com/mcp that lets AI tools call the X API through your own developer app.
This guide is for you if you want Claude, Cursor or Grok to work with X (Twitter) data. You get the setup, the real cost and the tools that write, checked on X's own pages on 21 October 2026. We run a rival server, Weir, so weigh our view knowing that.
This is X's own config for Cursor, copied from its docs:
{
"mcpServers": {
"xapi": {
"command": "npx",
"args": ["-y", "@xdevplatform/xurl", "mcp", "https://api.x.com/mcp"],
"env": {
"CLIENT_ID": "YOUR_X_APP_CLIENT_ID",
"CLIENT_SECRET": "YOUR_X_APP_CLIENT_SECRET"
}
}
}
}
What is the X official MCP server?
X runs two hosted MCP servers: one for the API, one for its docs.
The API server is the one people mean. X announced it on 30 June 2026, on its developer forum and from @XDevelopers. It speaks Streamable HTTP at https://api.x.com/mcp, and it names itself xmcp.
The second server, https://docs.x.com/mcp, only searches X's developer docs. X's config for it is just the URL.
Here is what X's docs say the API server can do:
| Area | What the model can do | Type |
|---|---|---|
| Posts | Fetch posts, likers, reposters, quoters | Read |
| Search | Full-archive posts, users, news | Read |
| Users | Look up accounts, timelines, mentions | Read |
| Bookmarks | List, add, remove, manage folders | Write |
| News and trends | Stories, and trends for a location | Read |
| Articles | Create drafts and publish them | Write |
Posting isn't on the list. On launch day, TechCrunch reported that X confirmed the MCP "is not compatible with X's Write API endpoints." Read that as: no posts, replies, likes or follows.
We searched @XDevelopers' posts for "MCP" through Weir on 21 October 2026. The top result was the launch post:
→ search_x {"fromUsers": ["XDevelopers"], "query": "MCP", "sort": "top", "limit": 3}
← 4 posts · 5 credits
2026-06-30 · 10,455 likes
"Announcing the hosted X MCP. ... Connect Grok, Cursor, or any
MCP-compatible AI tool to the X API without any setup!"
"Without any setup" is the slogan. The docs tell a longer story.
How to set up X's MCP server
Every route starts with your own X developer app.
X's docs say it plainly: "X's OAuth requires your own developer app." There is no dynamic client registration, so a chat app can't sign you in from the URL alone. A small local bridge, xurl, holds your app's keys and signs in for you.
- Create an X appIn the Developer Console, with OAuth 2.0 turned on.
- Register the callbackAdd http://localhost:8080/callback to the app.
- Copy the client ID and secretThey go in the env block of your client's config.
- Start the bridgenpx runs xurl; the first run opens a browser to sign in.
X lists configs for Grok Build, Cursor, Claude Desktop and VS Code. Give your client a startup timeout of at least 300 seconds, so that first sign-in can finish.
On a server with no browser, sign in first with xurl auth oauth2 --headless.
If login ends in client-not-enrolled, X's fix is to move the app to Pay-per-use and Production in the portal.
Is there a read-only X MCP option?
Yes. X's simple route skips the bridge: you send your app-only Bearer token in an Authorization header to https://api.x.com/mcp.
X calls this route read-only, with "no user context," so it can't act as you. It also needs a client that lets you set custom headers.
That rules out most web chat apps, which connect custom servers by signing in.
Does X MCP cost money?
Yes. Connecting costs nothing, but every tool call is an X API call at pay-per-use rates.
X's MCP page lists no separate fee. The server calls X API endpoints with your app. Its fix for client-not-enrolled is moving that app to Pay-per-use.
When pay-per-use launched on 6 February 2026, @XDevelopers listed MCP among its new tools. These are the X pricing page rates an agent spends most, as of October 2026:
So an agent that reads 1,000 posts while it researches spends $5. Pay-per-use accounts stop at 3 million post reads a month. Past that, X points you to Enterprise.
There's no free monthly tier. X's pricing page lists $20 in credits after your first purchase, plus a match of your first auto-recharge, up to $50.
What about xmcp, the self-hosted server?
Before the hosted server, X published xmcp on GitHub: a Python server you run yourself.
Its README calls it the "X API FastMCP Server." It turns X's whole OpenAPI spec into tools, except streams and webhooks. That list includes createPosts, likePost, followUser and DM tools, which the hosted server doesn't offer.
You need Python 3.9 or later, your app's OAuth 1.0a keys and a Bearer token. It serves on http://127.0.0.1:8000/mcp, and its calls hit the same X API at the same rates.
X's launch post pitched the hosted server as needing "no local XMCP server to clone and run." The repo's last code push was in April 2026.
Don't confuse it with xmcp.dev. That site is "The TypeScript MCP framework" from basement.studio, for building your own servers. It has nothing to do with X.
X MCP or a hosted read-only server?
Pick by whether your agent must write, and whether you want to run an X app. We run Weir, a read-only server at https://api.weirapp.io/mcp, so weigh this knowing that.
X's hosted MCP is the official route:
Good
- X's own server, under X's own terms
- Bookmarks and Articles, as your account
- News search and trends by location
Watch out
- Needs your own developer app, plus a local bridge to sign in
- $0.005 per post read, with no free monthly tier
- X only
Weir's MCP signs you in with OAuth, with no X developer app:
Good
- One URL, nothing to install, works in claude.ai and chatgpt.com
- Reddit tools on the same connection
- 5,000 free credits every month, no card
Watch out
- Read-only: no bookmarks, Articles or posts
- A third party, not licensed by X, so access can change
On Weir, a call costs 1 credit plus 1 per post, and X serves about 20 posts per page. So 1,000 posts take about 50 calls, or 1,050 credits:
The Claude setup guide covers claude.ai, Desktop and Claude Code. The API side is in Weir vs the official X API.
Our decision, by job:
- Bookmarks or Articles: use X's MCP.
- Posts, likes or DMs: neither hosted server does it. X's self-hosted xmcp lists those tools.
- Research in a chat app: a read-only server is cheaper and quicker. See the X MCP server page.
- Reddit and X together: our Reddit and X MCP guide shows a real session.
When not to use Weir
- Your agent writes to X. Weir has no write tools, by design.
- You need X's terms or a contract with X. Weir isn't affiliated with X.
- You read your own account. X charges $0.001 per item for owned reads, and only X sees your bookmarks.
- You already run a funded X app. X's MCP plugs into it with no new account.
FAQ
Is X's MCP server free?
Connecting is free, but the calls aren't. Each tool call is an X API request at pay-per-use rates, such as $0.005 per post read, as of October 2026. The Docs MCP at docs.x.com/mcp needs no app in X's setup.
Do I need an X API key for the X MCP?
Yes. Both routes start from your own developer app. Use an app-only Bearer token for read-only access, or the app's client ID and secret for the xurl sign-in. X has no dynamic client registration, so there's no way around the app.
Can I use the X MCP in Claude Code?
X's docs don't list Claude Code by name. They list Grok Build, Cursor, Claude Desktop and VS Code, and say any MCP-compatible client works with the xurl bridge. We haven't tested that pairing ourselves.
Can the X MCP post tweets?
No. X's hosted server lists no posting tool, and X told TechCrunch it doesn't work with the Write API endpoints. Its writes are bookmarks and Articles. X's self-hosted xmcp code does list a createPosts tool.
What is the difference between xmcp and xmcp.dev?
xmcp is X's Python MCP server for the X API, published on GitHub under xdevplatform. xmcp.dev is an unrelated TypeScript framework from basement.studio for building your own MCP servers.
Sources
All checked on 21 October 2026.
- X docs, MCP servers: https://docs.x.com/tools/mcp
- X forum, hosted X MCP launch (30 June 2026): https://devcommunity.x.com/t/announcing-the-hosted-x-mcp/269558
- @XDevelopers, launch post (30 June 2026): https://x.com/XDevelopers/status/2071752389183647758
- @XDevelopers, pay-per-use thread (6 Feb 2026): https://x.com/XDevelopers/status/2019881226874552564
- X API pricing: https://docs.x.com/x-api/getting-started/pricing
- TechCrunch (30 June 2026): https://techcrunch.com/2026/06/30/x-now-offers-an-mcp-server-to-make-its-platform-easier-for-AI-tools-to-use/
- xmcp README: https://github.com/xdevplatform/xmcp
- xurl: https://github.com/xdevplatform/xurl
- xmcp.dev: https://xmcp.dev
- Weir MCP docs: https://docs.weirapp.io/mcp
- Weir billing: https://docs.weirapp.io/billing