X MCP, X's official hosted server for the X API
Lets your AI assistant search X posts, look up users, read trends and news, manage bookmarks and publish Articles through the X API.
This is X's own hosted server for the X API. It lets Claude, Cursor, VS Code and other assistants search posts, look up users and timelines, read trends and news, manage bookmarks and publish Articles on your account. You need your own X developer app, and each call is billed to it as pay-per-use X API credits. Posting regular tweets is not on X's list of what it can do.
Good for
- Researchers and analysts who want Claude or Cursor to search the full archive of X posts
- Marketers tracking trends, news and what people say about a brand on X
- Developers building on the X API who want the assistant to call it and read the docs
- Writers who draft and publish X Articles from their assistant
Works in
3 supported · 10 should work
Tap an app to see how to set it up and any known problems.
X's docs cover adding the xurl bridge or an app token to the config file, then restarting Claude. docs.x.com
X's docs cover it: add the xurl bridge or an app token to mcp.json, then sign in when your browser opens. docs.x.com
X's docs cover adding the xurl bridge or an app token to .vscode/mcp.json. docs.x.com
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports hosted MCP servers.
X's server has no sign-in ChatGPT can use; it needs the local xurl bridge or a token header. docs.x.com
Install X MCP (X API)
Claude Code
- 1
Copy this prompt.
Add the X MCP (X API) server to Claude Code. Run this command: claude mcp add xapi -e CLIENT_ID=YOUR_X_APP_CLIENT_ID -e CLIENT_SECRET=YOUR_X_APP_CLIENT_SECRET -- npx -y @xdevplatform/xurl mcp https://api.x.com/mcp Ask me for CLIENT_ID, CLIENT_SECRET and only put the values in that config, nowhere else. Then check that it loaded and tell me if I need to sign in or restart.
- 2
Paste it into Claude Code. It shows the change and asks before running it.
Requires An X developer app with OAuth 2.0 on, Redirect URI http://localhost:8080/callback on the app, Node.js (for npx), X API credits (pay-per-use).
Read-only mode: Use the App-only token method instead of the xurl bridge. It reads public data only and cannot act as your account.
X documents the bridge command and the token header for any MCP app; these steps for this app are generated from that. On first start your browser opens to sign in to X; the app waits for it, so set its startup timeout to 300 seconds or more if it has one. The sign-in authorizes whichever X account is open in the browser. The app-only token route needs no bridge or login but can only read public data. A client-not-enrolled error means moving the app to Pay-per-use and Production in the X Developer Portal.
Built from the package data we hold. Not yet tested by us.
Tools
We don't list X MCP (X API)'s tools here yet. After you connect it, ask your assistant "What can you do with X MCP (X API)?" to see them.
Pros and cons
Good
- Made and hosted by X, on the official X API.
- Searches the full archive of posts, not just recent ones.
- Covers users, timelines, mentions, bookmarks, trends, news and Articles in one connection.
- A read-only route with an app token needs no bridge and no browser login.
- The bridge refreshes your sign-in by itself after the first login.
- A second hosted server lets the assistant search X's developer docs.
Watch out
- You need your own X developer app with OAuth set up before it works.
- Every call is billed as pay-per-use X API credits.
- Posting regular tweets is not on its list of abilities.
- Most apps cannot connect directly and need the local xurl bridge, which needs Node.js.
- The first login holds startup, so apps time out unless you raise their startup limit.
- Running several bridge processes can race on token refresh and ask you to sign in again.
Permissions
medium risk · 4 things to watch
Medium risk
The assistant can spend your X API credits and publish Articles or change bookmarks on your account. Use the app-only token if you only need to read, and give the developer app only the access you need.
What it can do
- Read your data
- Create and change things
- Delete things
- Read-only modeHow to turn it on
Watch out for
Every call costs X API credits
The X API is pay-per-use, so each search and lookup the assistant runs is billed to your developer account. Check usage in the Developer Console. docs.x.com
It can publish Articles as you
With the bridge sign-in it can draft and publish Articles and add or remove bookmarks on your account. Use the app-only token if you only need to read. docs.x.com
Sign-in uses whichever X account is open
The browser login authorizes the account currently signed in to X. Switch accounts first if the assistant should act as a different one. docs.x.com
Tokens are stored in a local folder
The bridge keeps tokens in ~/.xurl. Keep that folder private and do not commit your app secret in a config file. docs.x.com
Security advisories
No published security advisories as of Nov 1, 2026.
Technical details
| Turning on read-only | Use the app-only route: point the client at https://api.x.com/mcp with an Authorization: Bearer <app-only token> header and no xurl bridge. It reaches read endpoints only and cannot act as your account. |
|---|---|
| Talks to | api.x.com (X API). X sign-in pages during the first login |
| Sign-in and keys | The xurl bridge caches OAuth tokens in ~/.xurl on your machine and refreshes them; app credentials sit in the client config env. |
Alternatives
Use X MCP if you have an X developer app and want official, full-archive access. twitter-mcp is the pick for posting tweets with your own X API keys, and X-Use researches X without an API key.
| Server | Official | Runs | Sign-in | GitHub stars |
|---|---|---|---|---|
| For X (Twitter) | ||||
| X MCPThis page | Official | Hosted | Developer app | – |
| x-twitter-scraper | Community | – | – | 225 |
| X-Use | Community | Local | – | 179 |
| Other tools for the same job | ||||
| twitter-mcp | Community | Local | – | 407 |
Questions
Is the X MCP server free?
No. Connecting costs nothing, but every X API call it makes is billed as pay-per-use credits, for example about half a cent per post read and one cent per user lookup. X says prices may change.
What is the X MCP server URL?
https://api.x.com/mcp. Most apps reach it through X's xurl bridge, or directly with an app-only token in the request header. X's docs search server is https://docs.x.com/mcp.
Can it post tweets for me?
X does not list posting among its abilities. It can read posts, search, look up users, manage bookmarks, read trends and news, and draft and publish Articles.
Do I need an X developer account?
Yes. You need your own developer app with OAuth 2.0 turned on, and its client ID and secret go in your app's config.
Can I make it read-only?
Yes. Use your app's app-only token instead of the bridge sign-in. It can read public data but cannot act as your account.
Why do I get a client-not-enrolled error?
Your developer app is not in the right plan. Move it to Pay-per-use and Production in the X Developer Portal, then sign in again.
Why does my app time out when it starts?
The bridge waits for your first browser login before it starts. Raise the app's startup timeout to 300 seconds or more.
Why does it keep asking me to sign in again?
Several bridge copies sharing one saved sign-in can clash when they refresh it. Run one copy at a time, or sign in again once.
Can I use it on a server without a browser?
Yes. Sign in once from the command line with xurl's headless login, which gives you a link and asks you to paste back a code. The bridge then reuses that sign-in.
How do I add it to Claude Desktop?
Use the steps in the install box above. You add the bridge with your app's client ID and secret, restart Claude, and sign in when your browser opens.
Information
updated Nov 1, 2026
- Publisher
- Official
- Package
@xdevplatform/xurl- Registry
- npm
- Transport
- Streamable HTTP
- Auth
- OAuth
- Last commit
- Sep 29, 2026
Other X (Twitter) MCP servers
Sources
Docs, issue trackers and discussions this page is built from. Issues, quotes and findings above link to their own source.
Show all 6Hide
- docs.x.com · docs.x.com
- docs.x.com · docs.x.com
- github.com · github.com
- github.com · github.com
- github.com · github.com
- github.com · github.com