Twitter MCP Server

Twitter MCP Server based on ElizaOS Agent Twitter Client

Local serverstdioTypeScript

What is the Twitter MCP server?

Twitter MCP server exists for a simple reason — assistants are far more useful when they can act on Twitter directly instead of describing what you should do. Twitter MCP Server based on ElizaOS Agent Twitter Client.

What you get

A powerful Twitter integration for AI agents that leverages the Model Context Protocol (MCP) standard, providing a comprehensive set of Twitter functionality through a clean and consistent interface.

This server provides access to Twitter's features through MCP tools, allowing seamless integration with AI assistants and other MCP-compatible clients. It's built on top of the agent-twitter-client library and provides robust error handling, rate limiting, and consistent response formatting.

What the assistant can call

Once Twitter is connected, these are the calls the assistant has available:

  • get_tweets — Fetch recent tweets from a user
  • get_profile — Get a user's profile information
  • search_tweets — Search for tweets by hashtag or keyword
  • like_tweet — Like or unlike a tweet
  • retweet — Retweet or undo retweet
  • post_tweet — Post a new tweet with optional media
  • create_thread — Create a Twitter thread
  • get_timeline — Get tweets from different timeline types
  • get_list_tweets — Get tweets from a Twitter list
  • get_trends — Get current trending topics
  • get_user_relationships — Get followers or following list
  • follow_user — Follow or unfollow a user

Configuration and credentials

You will need 4 environment variables: TWITTER_API_KEY, TWITTER_API_SECRET_KEY, TWITTER_ACCESS_TOKEN, TWITTER_ACCESS_TOKEN_SECRET. The server will not start without them, which is usually why the tools fail to appear on a first run. Keep credentials in your client's env block or a secrets manager rather than in a file you might commit.

Setting it up

Setup follows the usual MCP pattern — install or clone the server, register it in your client's configuration file, restart the client. The configuration blocks on this page cover the common clients.

Choosing this one

Among the developer tooling options, the useful question is rarely "what can it do" but "what does it cost you to run" — permissions, credentials, and how much of your context its toolset consumes. Twitter's toolset — get_tweets, get_profile, search_tweets and 10 more — is a fair guide to whether it matches your workflow. It is maintained by taazkareem; worth a glance at recent repository activity before you build anything load-bearing on it.

SyncDev reviews every entry in this directory against the project's own documentation before publishing, and revisits them as servers change.

Before you rely on it

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • With 13 tools registered it takes up a noticeable share of the context window; turn it off in projects that never touch Twitter.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the twitter mcp server does with a few real requests.

Available tools

ToolWhat it does
get_tweetsFetch recent tweets from a user
get_profileGet a user's profile information
search_tweetsSearch for tweets by hashtag or keyword
like_tweetLike or unlike a tweet
retweetRetweet or undo retweet
post_tweetPost a new tweet with optional media
create_threadCreate a Twitter thread
get_timelineGet tweets from different timeline types
get_list_tweetsGet tweets from a Twitter list
get_trendsGet current trending topics
get_user_relationshipsGet followers or following list
follow_userFollow or unfollow a user
DebuggingSince MCP servers communicate over stdio, you can use the MCP Inspector for debugging: bash npm run inspector

How to install the Twitter MCP server

{
  "mcpServers": {
    "twitter-mcp-server": {
      "command": "/path/to/twitter-mcp-server/build/index.js"
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Configuration

VariableDescriptionRequired
TWITTER_API_KEYCredential the server authenticates with.Yes
TWITTER_API_SECRET_KEYCredential the server authenticates with.Yes
TWITTER_ACCESS_TOKENCredential the server authenticates with.Yes
TWITTER_ACCESS_TOKEN_SECRETCredential the server authenticates with.Yes

Example prompts to try

  • Use Twitter to get tweets.
  • Use Twitter to get profile.
  • Use Twitter to search tweets.

Frequently asked questions

It connects Twitter to MCP-compatible AI assistants such as Claude and Cursor, exposing 13 tools (get_tweets, get_profile, search_tweets, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Twitter directly.