getxapi-mcp
Official# GetXAPI MCP: Twitter/X API for Claude, Cursor and any MCP client
[](https://www.npmjs.com/package/@getxapi/mcp)
[](./LICENSE)
[](https://www.getxapi.com/status)
The official **[GetXAPI](https://www.getxapi.com)** MCP server. Give your AI assistant
direct access to the Twitter/X API: **search tweets, look up users, read
replies and followers, and post tweets, send DMs, manage articles, and more**,
through one [Model Context Protocol](https://modelcontextprotocol.io) server.
Unlike read-only Twitter MCP servers, GetXAPI MCP can **act**: post tweets,
reply, like, retweet, send DMs, and publish articles, not just read.
โ **[Get a free API key at getxapi.com](https://www.getxapi.com)** ยท **[API docs](https://docs.getxapi.com)** ยท **[Pricing](https://www.getxapi.com/pricing)** ($0.001/call, $0.05 per 1,000 tweets)
---
## Install
Add it to your MCP client config (Claude Desktop, Cursor, Windsurf, etc.):
```json
{
"mcpServers": {
"getxapi": {
"command": "npx",
"args": ["-y", "@getxapi/mcp@latest"],
"env": {
"GETXAPI_KEY": "get-x-api-..."
}
}
}
}
```
Get your `GETXAPI_KEY` from your [GetXAPI dashboard](https://www.getxapi.com). That's
all the **read** tools need.
Or via the Claude Code CLI:
```bash
claude mcp add getxapi -- npx -y @getxapi/mcp@latest
```
---
## What you can do
Once installed, just ask your assistant naturally:
> "Find Elon Musk's latest tweets"
> "Search tweets about OpenAI from the last week"
> "Who are @vercel's verified followers?"
> "Get the replies to this tweet: 1799โฆ"
> "Post 'shipping ๐' to my X account" *(requires X auth, see below)*
---
## Read vs. write tools
| | Needs | Examples |
|---|---|---|
| **Read** | `GETXAPI_KEY` only | search tweets, user info, followers/following, replies, mentions, user tweets, lists |
| **Write / private** | `GETXAPI_KEY` **+ X account auth** | post / reply / like / retweet / bookmark / delete tweet, send DM, read DMs/timeline/bookmarks, publish articles, update profile |
### Enabling write tools
Write and private tools act on a real X account, so they need that account's
auth. Two ways to provide it:
**Option A, log in through the assistant** (convenient):
> "Log in to my X account"
The assistant calls the `x_login` tool with your credentials and keeps the
session for write tools.
โ ๏ธ Your X password is passed as tool arguments, so it transits the AI model's
context. For sensitive accounts, prefer Option B.
**Option B, set credentials in config** (recommended for sensitive accounts):
```json
{
"mcpServers": {
"getxapi": {
"command": "npx",
"args": ["-y", "@getxapi/mcp@latest"],
"env": {
"GETXAPI_KEY": "get-x-api-...",
"X_AUTH_TOKEN": "...",
"X_CT0": "...",
"X_TWID": "...",
"X_PROXY": "http://user:pass@host:port"
}
}
}
}
```
`X_CT0`, `X_TWID`, and `X_PROXY` are optional. `X_AUTH_TOKEN` alone is enough
for most write tools; the others improve reliability on some accounts.
Your X password never touches the model. The credential fields are never shown
to the AI. The server injects them only into the calls that need them.
---
## How billing works
Every tool call is a normal GetXAPI API call authenticated with your
`GETXAPI_KEY`, metered exactly like direct API usage. No separate MCP billing.
See [pricing](https://www.getxapi.com/pricing).
---
## Related repositories
- [twitter-api-alternatives](https://github.com/getxapi/twitter-api-alternatives): all 73 endpoints, per-1,000-tweet cost math and the X API v2 migration map
- [getxapi-examples](https://github.com/getxapi/getxapi-examples): runnable samples in curl, Python, Node.js, Go, Rust, PHP, Ruby and Java
## Links
- ๐ **Website:** [getxapi.com](https://www.getxapi.com)
- ๐ **Status:** [getxapi.com/status](https://www.getxapi.com/status)
- ๐ **API docs:** [docs.getxapi.com](https://docs.getxapi.com)
- ๐ณ **Pricing:** [getxapi.com/pricing](https://www.getxapi.com/pricing)
- ๐ **Get an API key:** [getxapi.com](https://www.getxapi.com)
GetXAPI is an independent third-party API for developers and researchers. Not
affiliated with, endorsed by, or sponsored by X Corp.
## License
MIT
TDQS
Scored across 53 tools
Most tools have clearly distinct purposes, but there are overlapping pairs like get_user_followers/get_user_followers_v2 and multiple get_user_info variants that could cause confusion. Descriptions help differentiate, but the duplication reduces clarity.
The majority of tools follow a consistent verb_noun naming pattern in snake_case. However, 'x_login' breaks the pattern and v2 suffixes (get_user_followers_v2) are slightly inconsistent with the base tools.
53 tools is excessive for a single server, especially when many functionality clusters (e.g., followers have multiple variants) could be consolidated. This heavy surface makes selection harder for agents.
The tool set covers a broad spectrum of Twitter operations: tweets, users, followers, DMs, articles, bookmarks, communities, and profile management. Minor gaps exist (e.g., no list creation or DM deletion), but overall it's comprehensive.