Twitter MCP Server — Hosted Api Connectors Integration
MCP Server language Hosted language PublicPost tweets, search content, manage followers, and monitor engagement metrics on Twitter/X — full v2 API coverage for social automation.
Use with AI AssistantsMCP
Connect Claude, Cursor, or any MCP-compatible client — then call tools directly
① Add This MCP Server
Paste into your AI client config — then all its tools are available instantly.
{
"mcpServers": {
"twitter": {
"url": "https://mcp.aerostack.dev/s/aerostack/mcp-twitter",
"headers": {
"Authorization": "Bearer YOUR_AEROSTACK_TOKEN"
}
}
}
}Replace YOUR_AEROSTACK_TOKEN with your API token from the dashboard.
② Call a Tool
Ask your AI assistant to call a specific tool, or send raw JSON-RPC:
Natural Language Prompt
“Use the get_tweet tool to get a tweet by id. returns full tweet object including text, author, creation time, and public metrics (likes, retweets, replies, impressions)”
Using a Workspace?
Add this MCP to your Workspace — your team shares one token, secrets are stored securely, and every AI agent in the workspace can call it without per-user setup.
description Overview
mcp-twitter — Twitter/X MCP Server
Automate Twitter/X from any AI agent — post tweets, search content, manage bookmarks, monitor engagement, and track followers using the full Twitter API v2.
Twitter/X is the world's leading real-time social network. This MCP server gives your AI agents complete access to the Twitter v2 API: searching and creating tweets, managing likes and retweets, fetching user profiles and follower lists, retrieving engagement metrics, and managing bookmarks — all via a single authenticated endpoint.
Live endpoint: https://mcp.aerostack.dev/s/aerostack/mcp-twitter
What You Can Do
- Monitor brand mentions — Search tweets containing your product name, extract insights, and route alerts to Slack or email
- Automate social publishing — Post announcement tweets, schedule replies, and manage a content queue from your AI agent
- Competitive intelligence — Fetch a competitor's recent tweets and engagement metrics on a cron schedule
- Grow audience — Automatically like and retweet relevant content in your niche based on keyword searches
- Engagement tracking — Pull impression and engagement data for any tweet and log it to a dashboard
Available Tools
| Tool | Description |
|---|---|
get_tweet |
Get a tweet by ID with full metrics and author info |
search_tweets |
Search recent tweets (last 7 days) using Twitter search operators |
create_tweet |
Post a new tweet, optionally as a reply |
delete_tweet |
Delete a tweet owned by the authenticated user |
like_tweet |
Like a tweet on behalf of the authenticated user |
retweet |
Retweet a tweet on behalf of the authenticated user |
get_user_by_username |
Get a user profile by @username (followers, tweets, bio) |
get_user_by_id |
Get a user profile by numeric user ID |
get_user_tweets |
Get recent tweets posted by a specific user |
get_user_followers |
Get list of followers for a user |
get_user_following |
Get list of accounts a user follows |
search_users |
Search for Twitter users by name or keyword |
get_trending_topics |
Get current trending topics for any location (WOEID) |
get_tweet_metrics |
Get engagement metrics: impressions, likes, retweets, replies, bookmarks |
get_mentions_timeline |
Get tweets that mention the authenticated user |
get_bookmarks |
Get the authenticated user's bookmarked tweets |
bookmark_tweet |
Bookmark a tweet |
remove_bookmark |
Remove a tweet from bookmarks |
_ping |
Verify credentials by calling /2/users/me |
Configuration
| Variable | Required | Description | How to Get |
|---|---|---|---|
TWITTER_BEARER_TOKEN |
Yes (read ops) | App-only Bearer Token for read operations (search, get, metrics) | Twitter Developer Portal → Your App → Keys and Tokens → Bearer Token |
TWITTER_ACCESS_TOKEN |
Yes (write ops) | OAuth 2.0 User Access Token for write operations (post, like, retweet, bookmarks) | Twitter Developer Portal → OAuth 2.0 → Generate user token via PKCE flow |
Note: Read-only tools (search, get, metrics) work with just TWITTER_BEARER_TOKEN. Write tools (create, delete, like, retweet, bookmarks) require TWITTER_ACCESS_TOKEN with user context.
Quick Start
Add to Aerostack Workspace
- Go to aerostack.dev → Your Project → MCPs
- Search for "Twitter" and click Add to Workspace
- Add your
TWITTER_BEARER_TOKENunder Project → Secrets for read access - Add
TWITTER_ACCESS_TOKENfor write access (posting, liking, bookmarks)
Once added, every AI agent in your workspace can interact with Twitter automatically.
Example Prompts
"Search for recent tweets about Cloudflare Workers and summarize the top 5 results"
"Post a tweet announcing our new product launch: 'Aerostack 2.0 is live — build AI backends on the edge in minutes'"
"Get the engagement metrics for tweet ID 1234567890123456789 and report the impressions"
"Find the top 10 accounts talking about AI developer tools and get their follower counts"
Direct API Call
curl -X POST https://mcp.aerostack.dev/s/aerostack/mcp-twitter \
-H 'Content-Type: application/json' \
-H 'X-Mcp-Secret-TWITTER-BEARER-TOKEN: your-bearer-token' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"search_tweets","arguments":{"query":"aerostack lang:en -is:retweet","max_results":10}}}'
License
MIT
terminal Tools (18)
Available tools on this MCP server. Each tool can be called directly from any AI agent.
get_tweet #1 Get a tweet by ID. Returns full tweet object including text, author, creation time, and public metrics (likes, retweets, replies, impressions).
search_tweets #2 Search recent tweets (last 7 days) matching a query string. Supports Twitter search operators (from:, to:, #hashtag, "exact phrase", -excluded). Returns tweet text, author, and metrics.
create_tweet #3 Post a new tweet. Requires TWITTER_ACCESS_TOKEN (user OAuth token). Optionally reply to an existing tweet.
delete_tweet #4 Delete a tweet by ID. Requires TWITTER_ACCESS_TOKEN. You can only delete tweets that belong to the authenticated user.
like_tweet #5 Like a tweet on behalf of the authenticated user. Requires TWITTER_ACCESS_TOKEN and the authenticated user ID.
retweet #6 Retweet a tweet on behalf of the authenticated user. Requires TWITTER_ACCESS_TOKEN and the authenticated user ID.
get_user_by_username #7 Get a user profile by @username. Returns user ID, name, username, bio, location, follower count, following count, tweet count, and profile image URL.
get_user_by_id #8 Get a user profile by their numeric user ID. Returns the same fields as get_user_by_username.
get_user_tweets #9 Get recent tweets posted by a specific user. Returns tweet text, ID, creation time, and metrics. Supports pagination.
get_user_followers #10 Get a list of users who follow a specified Twitter user. Returns user IDs, names, and usernames.
get_user_following #11 Get a list of accounts that a specified Twitter user follows. Returns user IDs, names, and usernames.
search_users #12 Search for Twitter users by name or username keyword. Returns a list of matching user profiles.
get_trending_topics #13 Get current trending topics for a given WOEID (Where On Earth ID). Defaults to worldwide trending (WOEID 1). Use WOEID 23424977 for USA, 44418 for London.
get_tweet_metrics #14 Get detailed engagement metrics for a tweet: impressions, likes, retweets, replies, quotes, bookmarks, and video views (if applicable). Requires TWITTER_ACCESS_TOKEN for non-public metrics.
get_mentions_timeline #15 Get tweets that mention the authenticated user. Returns recent tweets where @username appears. Requires TWITTER_ACCESS_TOKEN.
get_bookmarks #16 Get the authenticated user's bookmarked tweets. Requires TWITTER_ACCESS_TOKEN.
bookmark_tweet #17 Bookmark a tweet for the authenticated user. Requires TWITTER_ACCESS_TOKEN.
remove_bookmark #18 Remove a bookmark for the authenticated user. Requires TWITTER_ACCESS_TOKEN.
Details
language Live Endpoint
https://mcp.aerostack.dev/s/aerostack/mcp-twitter
Sub-50ms globally · Zero cold start
Publisher
Pre-built functions for the most common MCP tool patterns. Clone, extend, and deploy.
More in API Connectors
Browse API Connectors MCPs →Aerostack Registry
by @aerostack
Discover and invoke any MCP, Function, or Skill published to the Aerostack marketplace — the universal AI capability hub.
Algolia
by @aerostack
Search indexes, manage records, browse data, and configure ranking in Algolia — AI-native instant search access.
Arangodb
by @aerostack
Query documents, run AQL, traverse graphs, and manage collections in your ArangoDB database — AI-native multi-model database access.
Ayrshare
by @aerostack
Post, schedule, and analyze social media across 13 platforms — Facebook, Instagram, X, LinkedIn, TikTok, Bluesky, Threads, Reddit, Pinterest, YouTube, Telegram, Snapchat, Google Business.
Basecamp
by @aerostack
Manage projects, to-dos, messages, schedules, and campfire chats in Basecamp — AI-native project management.
Bigquery
by @aerostack
Run SQL queries, list datasets and tables, inspect schemas, and export results from Google BigQuery — AI-native data warehouse access.
Frequently asked questions
What is the Twitter MCP server and what can it do? +
The Twitter MCP server is hosted on Aerostack and exposes these tools to your AI agent: `get_tweet`, `search_tweets`, `create_tweet`, `delete_tweet`, `like_tweet`. You get one hosted URL — no self-hosting — that works from Claude, Cursor, ChatGPT, Gemini, VS Code, or any MCP-compatible client, and you can share it with your team or combine it with other MCP servers in a workspace.
Is the Twitter MCP server hosted, or do I have to run it myself? +
It's hosted on Aerostack's edge infrastructure — you don't deploy or maintain anything. Add it to a workspace and you get one authenticated URL, with secrets encrypted, that any AI agent or editor can connect to. Use it solo or share the same URL across your whole team.
Which AI agents and editors can use the Twitter MCP server? +
Any MCP client: Claude and Claude Code, Cursor, ChatGPT, Gemini, Windsurf, Cline, VS Code, and custom agents. Because it's one hosted URL, the same Twitter MCP server works everywhere — and you can compose it with other MCP servers, skills, and functions behind a single workspace URL.
How do I install the Twitter MCP server in Claude Desktop? +
Add the following to your Claude Desktop config (`claude_desktop_config.json`): ```json { "mcpServers": { "@aerostack/mcp-twitter": { "command": "npx", "args": ["-y", "@aerostack/@aerostack/mcp-twitter"] } } } ``` Then restart Claude Desktop and the tools will appear automatically.
How do I use the Twitter MCP server in Cursor? +
In Cursor, open **Settings → MCP** and add: ```json { "name": "@aerostack/mcp-twitter", "command": "npx", "args": ["-y", "@aerostack/@aerostack/mcp-twitter"] } ``` Save and reload Cursor. The MCP tools will be available in Agent mode.
Does Twitter MCP require authentication? +
Yes. Twitter requires authentication. Check the MCP's documentation for the required credentials.