MCP Directory

Twitter MCP

Post tweets and search Twitter/X from Claude or any MCP client using your Twitter API keys.

Unverified
stdio (local)
API key
Stale
TypeScript

Add to your client

Copy the config for your MCP client and paste it into its config file.

Install / run
npx -y @enescinar/twitter-mcp

Paste into ~/Library/Application Support/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "twitter-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@enescinar/twitter-mcp"
      ],
      "env": {
        "API_KEY": "<your-api-key>",
        "API_SECRET_KEY": "<your-api-secret-key>",
        "ACCESS_TOKEN": "<your-access-token>",
        "ACCESS_TOKEN_SECRET": "<your-access-token-secret>"
      }
    }
  }
}

Step-by-step guides: Add to Claude Desktop · Add to Cursor · Add to Windsurf

Before you start

  • A Twitter/X developer account with an app created in the Developer Portal
  • Four credentials from that app: API key, API secret key, access token, access token secret (with write permission for posting)
  • Node.js with npx; an X API tier that includes the endpoints you need (search usually requires a paid tier)

About Twitter MCP

This is a deliberately tiny server: TypeScript, two tools, four env vars. post_tweet publishes a plain-text tweet as the authenticated account; search_tweets runs a search and returns results into the conversation. There is no abstraction layer to learn — if you can create an app in the Twitter Developer Portal and copy four strings, you are done in five minutes.

Credentials use the OAuth 1.0a user-context style (API key/secret + access token/secret), which is what allows posting on your behalf. That cuts both ways: any conversation with the server connected can produce a real public tweet, so treat the config like a saved password and prefer a dedicated app scoped to a account you are comfortable automating.

The practical ceiling is X's API pricing rather than the server. Free-tier apps are limited to a small monthly write quota and effectively no search, so search_tweets typically needs Basic or higher; rate-limit errors surface as tool failures with logs in Claude's MCP log files (e.g. ~/Library/Logs/Claude/mcp-server-twitter.log on macOS). The README documents those log paths for troubleshooting.

Maintenance is the other consideration: 401 stars and a Smithery listing, but the last commit landed in July 2025. For posting-plus-search from chat it remains one of the simplest options; for threads, media uploads, or timeline reading you will need a bigger Twitter/X server or direct API calls.

Tools & capabilities (2)

post_tweet

Post a new tweet as the authenticated account.

search_tweets

Search for tweets matching a query.

What this server can do

Twitter MCP provides tools for these capabilities — tap one to see every MCP server that does the same:

When to use it

  • Draft a tweet in conversation, review the wording, and have Claude post it
  • Search what people are saying about a topic or product and summarize the sentiment inline
  • Light social automation: turn a changelog entry or blog TL;DR into a posted update
  • Quick competitive checks — search a competitor's product name and skim recent chatter without opening X

Quick setup

  1. 1Create an app at developer.twitter.com and generate the API key/secret and access token/secret (enable write access for posting)
  2. 2Add the npx config block with the four env vars to claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/, Windows: %APPDATA%\Claude\)
  3. 3Restart Claude Desktop and confirm the twitter-mcp server shows as connected
  4. 4Test with 'post a tweet saying hello' or 'search tweets about Claude AI'
  5. 5If a tool fails, check the MCP log (macOS: ~/Library/Logs/Claude/mcp-server-twitter.log) — most errors are X API tier or permission issues

Security notes

The four credentials in your config can post as your account — use a dedicated X developer app with the narrowest permissions you can, and remember they sit in plain text in claude_desktop_config.json. The project has not seen a commit since July 2025, so factor in unpatched drift against X API changes.

Twitter MCP FAQ

Is twitter-mcp free to use?

The server is MIT-licensed and free, but the X API behind it is not: free-tier apps get only a small monthly posting quota and essentially no search access, so search_tweets usually requires the paid Basic tier or higher. Costs come from X, not the server.

Can it post threads, images, or read my timeline?

No — the README documents exactly two tools: post_tweet (plain-text tweets) and search_tweets. Threads, media uploads, DMs, timelines, and deletes are all out of scope; you would need a more full-featured X server for those.

Is the project still maintained?

Activity has stalled: the last commit was July 2025. It still works against the current X API as of this writing, but if X changes endpoints or auth, fixes would likely come from forks rather than upstream — worth knowing before building anything durable on it.

Alternatives to Twitter MCP

Compare all alternatives →

Connect your personal WhatsApp: search, read and send messages and media locally

Verified
stdio (local)
No auth
Python
12 tools
Updated 1 month agoRepo

Lets agents read LinkedIn profiles, companies, jobs and messages through your own logged-in browser session.

Unverified
stdio (local)
No auth
Python
17 tools
Updated 1 day agoRepo

Powerful Slack MCP with stdio/SSE/HTTP, DMs, group DMs and no-admin token auth

Verified
stdio (local)
API key
Go
12 tools
Updated 1 month agoRepo