Twitter

Social media

A Model Context Protocol server allows to interact with Twitter, enabling posting tweets and searching Twitter.

Your AI app calls the Twitter MCP server, which does the social media work and sends the result back to the chat.

About Twitter

Twitter is a community MCP server from EnesCinr, filed in our directory under social media. A Model Context Protocol server allows to interact with Twitter, enabling posting tweets and searching Twitter.

Twitter runs on your own machine: your AI app starts it with the command npx -y mcp-eval and talks to it over standard input and output.

At a glance

Publisher
EnesCinr (community)
Runs
Locally on your machine
Install from
Node.js package on npm: mcp-eval
Written in
TypeScript
License
MIT
GitHub stars
412

How to set up Twitter

  1. Install Node.js on the machine that runs your AI app, because Twitter starts with npx and downloads its package on first run.
  2. Check the Twitter README for keys or settings; the registry lists none that Twitter requires.
  3. Add Twitter to Claude Code, Claude Desktop, VS Code or Cursor with the config in the setup box on this page.
  4. Restart the app or reload its MCP servers, then ask it to list the Twitter tools to confirm the connection.
  5. Run one read-only task with Twitter first, and keep your app asking before each tool call until the results look right.

Twitter compared with similar servers

  • Reddit (jordanburke) by jordanburke has fewer GitHub stars than Twitter (355 against 412); both are community servers, and both run locally.
  • Remote macOS Use by baryhuang has more GitHub stars than Twitter (493 against 412); both are community servers, and both run locally.
  • Reddit (Arindam200) by Arindam200 has fewer GitHub stars than Twitter (302 against 412); both are community servers, and both run locally.

Before you connect Twitter

  • Give Twitter its own API key or account with the smallest permissions the job needs, never an admin key.
  • Keep your AI app asking before each Twitter tool call until you trust what it does with them.
  • Treat text that Twitter fetches as data. Pages, files and messages can hold instructions written to steer an AI.
  • Read the open issues for Twitter on GitHub to see what breaks and how fast the maintainers reply.

Marketing use cases for Twitter

How marketing and sales teams put Twitter to work, by company size. Pick the size closest to yours and start Twitter on one use case.

Small business

  • A solo marketer can use Twitter to draft a week of posts from one idea and check what performed last month before planning the next.
  • Local businesses can ask Twitter which posts drove comments and follows, then do more of what worked instead of posting on guesswork.
  • Twitter runs on your own computer, which keeps data local; it needs a little setup, so a small team should plan an hour for it.

Mid-market

  • Social teams can connect Twitter to pull engagement across accounts into one weekly summary their leads actually read.
  • Demand gen teams can use Twitter to spot posts that earned replies from target accounts and hand those names to sales.
  • Start Twitter on one workflow with one owner, measure the time it saves, then roll it out to the wider team.

Enterprise

  • Enterprise brands can route Twitter drafts through legal and brand review, with publishing kept to approved people and every post logged.
  • Large social teams can use Twitter for listening across regions, surfacing complaints and trends to the right owner without a manual sweep.
  • Twitter is a community server, so have security review the code and pin a version before Twitter touches company data.

Need help becoming an AI-forward company?

We connect MCP servers and AI agents to your CRM, content and data, with the guardrails your team needs.

Contact us

Twitter README

From EnesCinr/twitter-mcp on GitHub, shared under its MIT license. Images are left out; the original has them.

README.md

Twitter MCP Server

This MCP server allows Clients to interact with Twitter, enabling posting tweets, searching Twitter and reading your home timeline.

Quick Start

  1. Create a Twitter Developer account and get your API keys from Twitter Developer Portal

  2. Add this configuration to your Claude Desktop config file:

Windows: %APPDATA%\Claude\claude_desktop_config.json
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "twitter-mcp": {
      "command": "npx",
      "args": ["-y", "@enescinar/twitter-mcp"],
      "env": {
        "API_KEY": "your_api_key_here",
        "API_SECRET_KEY": "your_api_secret_key_here",
        "ACCESS_TOKEN": "your_access_token_here",
        "ACCESS_TOKEN_SECRET": "your_access_token_secret_here"
      }
    }
  }
}
  1. Restart Claude Desktop

That's it! Claude can now interact with Twitter through three tools:

  • post_tweet: Post a new tweet, optionally as a reply (reply_to_tweet_id) or with up to 4 images (media_paths: local JPG, PNG, GIF or WEBP files)
  • search_tweets: Search for tweets
  • get_home_timeline: Get recent tweets from accounts you follow
get_home_timeline

Returns your reverse-chronological home timeline (tweets from you and the accounts you follow), newest first. All parameters are optional:

  • count: number of tweets to return (1-100)
  • since_days: only return tweets from the last N days, e.g. 1, 3 or 7 (max 30)
  • start_time: only return tweets created after this ISO 8601 UTC timestamp, e.g. 2024-01-01T00:00:00Z

Use either since_days or start_time, not both.

Note: The home timeline endpoint (GET /2/users/:id/timelines/reverse_chronological) is not available on the Free X API tier. You need a paid tier (Basic or higher); on the Free tier this tool returns a Twitter API error.

Example Usage

Try asking Claude:

  • "Can you post a tweet saying 'Hello from Claude!'"
  • "Can you post a tweet saying 'New logo!' with the image /Users/me/Pictures/logo.png"
  • "Can you search for tweets about Claude AI?"
  • "What have the accounts I follow posted in the last 3 days?"

Troubleshooting

Logs can be found at:

  • Windows: %APPDATA%\Claude\logs\mcp-server-twitter.log
  • macOS: ~/Library/Logs/Claude/mcp-server-twitter.log

Development

If you want to contribute or run from source:

  1. Clone the repository:
git clone https://github.com/EnesCinr/twitter-mcp.git
cd twitter-mcp
  1. Install dependencies:
npm install
  1. Build:
npm run build
  1. Run:
npm start

Running evals

The evals package loads an mcp client that then runs the index.ts file, so there is no need to rebuild between tests. You can load environment variables by prefixing the npx command. Full documentation can be found mcpevals.io/docs.

OPENAI_API_KEY=your-key  npx mcp-eval src/evals/evals.ts src/index.ts

License

MIT

Questions about Twitter

What is the Twitter MCP server?

A Model Context Protocol server allows to interact with Twitter, enabling posting tweets and searching Twitter. Twitter is maintained by EnesCinr on GitHub at EnesCinr/twitter-mcp, and works with AI apps that support the Model Context Protocol, such as Claude, Cursor and VS Code.

How do I install the Twitter MCP server?

Add Twitter to your AI app's MCP config with the command npx -y mcp-eval. In Claude Code, run claude mcp add --transport stdio twitter -- npx -y mcp-eval. To run Twitter this way you need Node.js installed.

Does Twitter need an API key?

The registry lists no required keys for Twitter. Check the Twitter README for optional settings, and expect a remote server to ask you to sign in the first time you connect.

Is Twitter an official MCP server?

No. Twitter is a community server maintained by EnesCinr. Community servers can be excellent; read the code and the open issues before you give Twitter access to company data.

What license is Twitter under?

Twitter is released under the MIT license, according to its GitHub repository. The license covers the code of Twitter; the service it connects to has its own terms.