Agent MCP Server

MCP server for Twitter integration using agent-twitter-client

Local serverstdioPython

What is the Agent MCP server?

MCP server for Twitter integration using agent-twitter-client. The agent mcp server wraps that behind the Model Context Protocol, so an assistant can use it through 14 defined tools rather than through you.

What it actually does

A Model Context Protocol (MCP) server that integrates with Twitter using the agent-twitter-client package, allowing AI models to interact with Twitter without direct API access.

  • Authentication Options —
  • Cookie-based authentication (recommended)
  • Username/password authentication
  • Twitter API v2 credentials
  • Tweet Operations —
  • Fetch tweets from users

Adding it to your client

The server ships on npm as agent-twitter-client-mcp, so your MCP client can launch it on demand — there is no separate build step. Add the server block to your client's configuration, restart it, and the tools register themselves.

Its toolset

Everything the assistant can do here goes through one of these:

  • get_user_tweets — Fetch tweets from a specific user
  • get_tweet_by_id — Fetch a specific tweet by ID
  • search_tweets — Search for tweets
  • send_tweet — Post a new tweet
  • send_tweet_with_poll — Post a tweet with a poll
  • like_tweet — Like a tweet
  • retweet — Retweet a tweet
  • quote_tweet — Quote a tweet
  • get_user_profile — Get a user's profile
  • follow_user — Follow a user
  • get_followers — Get a user's followers
  • get_following — Get users a user is following

Configuration

You will need 8 environment variables: AUTH_METHOD, TWITTER_COOKIES, TWITTER_USERNAME, TWITTER_PASSWORD, TWITTER_EMAIL, TWITTER_2FA_SECRET, TWITTER_API_KEY, TWITTER_API_SECRET_KEY. 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.

  • Node.js 18+ - npm

Caveats

  • 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 14 tools registered it takes up a noticeable share of the context window; turn it off in projects that never touch Agent.
  • 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 agent mcp server does with a few real requests.

When to reach for it

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. Agent's toolset — get_user_tweets, get_tweet_by_id, search_tweets and 11 more — is a fair guide to whether it matches your workflow. It is maintained by ryanmac-npm; worth a glance at recent repository activity before you build anything load-bearing on it.

This entry was verified against Agent's own documentation before publication; SyncDev keeps the directory reviewed rather than auto-generated.

Available tools

ToolWhat it does
get_user_tweetsFetch tweets from a specific user
get_tweet_by_idFetch a specific tweet by ID
search_tweetsSearch for tweets
send_tweetPost a new tweet
send_tweet_with_pollPost a tweet with a poll
like_tweetLike a tweet
retweetRetweet a tweet
quote_tweetQuote a tweet
get_user_profileGet a user's profile
follow_userFollow a user
get_followersGet a user's followers
get_followingGet users a user is following
grok_chatChat with Grok via Twitter
health_checkCheck the health of the Twitter MCP server

How to install the Agent MCP server

{
  "mcpServers": {
    "agent-twitter-client-mcp": {
      "command": "npx",
      "args": ["-y", "agent-twitter-client-mcp"],
      "env": {
        "AUTH_METHOD": "cookies",
        "TWITTER_COOKIES": "[\"auth_token=YOUR_AUTH_TOKEN; Domain=.twitter.com\", \"ct0=YOUR_CT0_VALUE; Domain=.twitter.com\", \"twid=u%3DYOUR_USER_ID; Domain=.twitter.com\"]"
      }
    }
  }
}

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

Configuration

  • Node.js 18+ - npm
VariableDescriptionRequired
AUTH_METHODConfiguration value read at startup.Optional
TWITTER_COOKIESConfiguration value read at startup.Optional
TWITTER_USERNAMEConfiguration value read at startup.Optional
TWITTER_PASSWORDConfiguration value read at startup.Optional
TWITTER_EMAILConfiguration value read at startup.Optional
TWITTER_2FA_SECRETCredential the server authenticates with.Yes
TWITTER_API_KEYCredential the server authenticates with.Yes
TWITTER_API_SECRET_KEYCredential the server authenticates with.Yes

Example prompts to try

  • Use Agent to get user tweets.
  • Use Agent to get tweet by id.
  • Use Agent to search tweets.

Frequently asked questions

It connects Agent to MCP-compatible AI assistants such as Claude and Cursor, exposing 14 tools (get_user_tweets, get_tweet_by_id, 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 Agent directly.