TwitterAPIs — Claude Code MCP server: what it does, how to install
TwitterAPIs is a Claude Code MCP server that connects models to Twitter data without an X developer account. It enables tweet search, audience analytics, and automated posting.
MIT ★ 7 updated 2026-11-17
claude mcp add --transport http twitterapis-mcp https://api.twitterapis.com/mcpWhat TwitterAPIs does
The server connects clients directly to twitterapis.com endpoints, providing 120 tools divided into 71 reading and 49 writing operations. Agents can execute advanced searches using standard X syntax, retrieve follower lists, inspect profiles, and follow conversations. To keep token consumption low, read endpoints accept a fields filter and a compact mode.
Public lookups require only a TWITTERAPIS_KEY. Accounts receive 0.50 dollars in starting credits without entering payment card details, with standard reads billed at 0.0008 dollars per call and tweet creation at 0.0016 dollars.
Personal operations such as reading direct messages or posting tweets require account authentication via saved cookies, login, or inline credentials. Sending writes through a residential proxy via proxy_url prevents soft blocks triggered by datacenter IP addresses.
What it helps with
- search posts using advanced search operators and date filters
- audit account followers and check the estimated bot ratio
- publish posts and replies without subscribing to the official X API
- fetch complete user timelines with automated cursor pagination
Example prompts for the agent
- Search for recent posts mentioning claude code with min_faves:50
- Inspect the audience breakdown and bot share for account openai
- Post a status update using my active TwitterAPIs session
How to install TwitterAPIs
1Platform CLI: remote server
claude mcp add --transport http twitterapis-mcp https://api.twitterapis.com/mcp2Platform CLI
claude mcp add --env TWITTERAPIS_KEY=<TWITTERAPIS_KEY> --env TWITTERAPIS_BASE_URL=<TWITTERAPIS_BASE_URL> --env TWITTERAPIS_TIMEOUT_MS=<TWITTERAPIS_TIMEOUT_MS> --transport stdio twitterapis -- npx -y @twitterapis/mcpReplace <…> with your own values
1Platform CLI: remote server
codex mcp add twitterapis --url https://api.twitterapis.com/mcp2Platform CLI
codex mcp add twitterapis --env TWITTERAPIS_KEY=<TWITTERAPIS_KEY> --env TWITTERAPIS_BASE_URL=<TWITTERAPIS_BASE_URL> --env TWITTERAPIS_TIMEOUT_MS=<TWITTERAPIS_TIMEOUT_MS> -- npx -y @twitterapis/mcpReplace <…> with your own values
Config file
{
"mcpServers": {
"twitterapis": {
"url": "https://api.twitterapis.com/mcp"
}
}
}{
"mcpServers": {
"twitterapis": {
"command": "npx",
"args": [
"-y",
"@twitterapis/mcp"
],
"env": {
"TWITTERAPIS_KEY": "<TWITTERAPIS_KEY>",
"TWITTERAPIS_BASE_URL": "<TWITTERAPIS_BASE_URL>",
"TWITTERAPIS_TIMEOUT_MS": "<TWITTERAPIS_TIMEOUT_MS>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"twitterapis": {
"type": "http",
"url": "https://api.twitterapis.com/mcp"
}
}
}{
"servers": {
"twitterapis": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@twitterapis/mcp"
],
"env": {
"TWITTERAPIS_KEY": "<TWITTERAPIS_KEY>",
"TWITTERAPIS_BASE_URL": "<TWITTERAPIS_BASE_URL>",
"TWITTERAPIS_TIMEOUT_MS": "<TWITTERAPIS_TIMEOUT_MS>"
}
}
}
}Replace <…> with your own values
1Platform CLI: remote server
gemini mcp add -t http twitterapis https://api.twitterapis.com/mcp2Platform CLI
gemini mcp add -e TWITTERAPIS_KEY=<TWITTERAPIS_KEY> -e TWITTERAPIS_BASE_URL=<TWITTERAPIS_BASE_URL> -e TWITTERAPIS_TIMEOUT_MS=<TWITTERAPIS_TIMEOUT_MS> twitterapis npx -y @twitterapis/mcpReplace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about TwitterAPIs
How to install TwitterAPIs in Claude Code?
Add the hosted endpoint using claude mcp add --transport http twitterapis https://api.twitterapis.com/mcp.
What does TwitterAPIs do?
It translates tool calls into X platform requests, giving assistants access to search, timeline reads, follower relationships, and automated posting.
What is required to run TwitterAPIs?
An active TWITTERAPIS_KEY is necessary. Write actions and private data reads additionally require an authenticated X session or inline auth_token and ct0 credentials.