
An AI receptionist platform with an MCP server for accessing business calls, contacts and appointments from AI assistants.

An MCP server that lets AI tools interact with Twitter (X) to fetch, post, and search tweets and manage profiles through natural language commands.
X (Twitter) MCP server for AI tools is cataloged as an MCP server attributed to rafaljanicki. An MCP server that lets AI tools interact with Twitter (X) to fetch, post, and search tweets and manage profiles through natural language commands. It is categorized under communication social. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.
Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.
Catalog license label: MIT License. Check the source repository's current license and terms before using, modifying or distributing this software.
能力定义尚未审核。未核验的采集内容不会作为可信接口展示。
暂无可展示的已审核记录。这不表示上游不支持此能力。
暂无可展示的已审核记录。这不表示上游不支持此能力。
暂无可展示的已审核记录。这不表示上游不支持此能力。
Email delivery is not connected. This page does not collect email addresses or create subscriptions.
Browse the registry for current listings instead.
Reviews for X (Twitter) MCP server for AI tools are not available yet
Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.
It requires Twitter API credentials (API Key, API Secret, Access Token, Access Token Secret, and Bearer Token) from the Twitter Developer Portal, and bookmark tools additionally require an OAuth 2.0 user access token.
The delete_all_bookmarks tool is described as destructive and irreversible, permanently deleting all bookmarks by fetching every page and removing them one by one.
README.md · 1d22ed4fc4f7 · 采集于 2026-11-13 09:45:18 UTC
保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。
当前显示最后一次成功采集的文档快照,请以来源页面为准。
A Model Context Protocol (MCP) server for interacting with Twitter (X) via AI tools. This server allows you to fetch tweets, post tweets, search Twitter, manage followers, and more, all through natural language commands in AI Tools.
uv or pip for Python dependencies.To install X (Twitter) MCP server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @rafaljanicki/x-twitter-mcp-server --client claude
The easiest way to install x-twitter-mcp is via PyPI:
pip install x-twitter-mcp
If you prefer to install from the source repository:
Clone the Repository:
git clone https://github.com/rafaljanicki/x-twitter-mcp-server.git
cd x-twitter-mcp-server
Set Up a Virtual Environment (optional but recommended):
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
Install Dependencies:
Using uv (recommended, as the project uses uv.lock):
uv sync
Alternatively, using pip:
pip install .
Configure Environment Variables:
.env file in the project root (you can copy .env.example if provided).TWITTER_API_KEY=your_api_key
TWITTER_API_SECRET=your_api_secret
TWITTER_ACCESS_TOKEN=your_access_token
TWITTER_ACCESS_TOKEN_SECRET=your_access_token_secret
TWITTER_BEARER_TOKEN=your_bearer_token
get_bookmarks, delete_all_bookmarks), also add an OAuth 2.0 user access token:
TWITTER_OAUTH2_USER_ACCESS_TOKEN=your_oauth2_user_token
See Obtaining an OAuth 2.0 User Token below.The bookmark endpoints (GET /2/users/:id/bookmarks, DELETE /2/users/:id/bookmarks/:tweet_id) require OAuth 2.0 User Context — they reject both app-only bearer tokens and OAuth 1.0a. You need to perform the PKCE authorization flow once to obtain a user-scoped token.
In the Twitter Developer Portal, open your app → Settings → User authentication settings and enable OAuth 2.0. Set a callback URL (e.g. https://localhost/).
Run the PKCE flow using Tweepy:
import tweepy
handler = tweepy.OAuth2UserHandler(
client_id="YOUR_CLIENT_ID", # OAuth 2.0 Client ID (from Developer Portal)
redirect_uri="https://localhost/",
scope=["bookmark.read", "bookmark.write", "users.read", "offline.access"],
client_secret="YOUR_CLIENT_SECRET", # Optional for public clients
)
print(handler.get_authorization_url())
# Open the URL, authorize, copy the redirected URL, then:
redirected_url = input("Paste redirected URL: ")
token = handler.fetch_token(redirected_url)
print(token["access_token"])
TWITTER_OAUTH2_USER_ACCESS_TOKEN in your environment or .env file.Preferred transport is Streamable HTTP. Use one of the following:
Run the server as an HTTP service with Streamable HTTP and SSE endpoints.
Build the Docker image:
docker build -t x-twitter-mcp .
Run the container (Smithery uses PORT; default here is 8081):
docker run -p 8081:8081 -e PORT=8081 x-twitter-mcp
Endpoints:
POST http://localhost:8081/mcpGET http://localhost:8081/ssePass config per-request (recommended in Smithery) via base64-encoded config query parameter. Example config JSON:
{"twitterApiKey":"...","twitterApiSecret":"...","twitterAccessToken":"...","twitterAccessTokenSecret":"...","twitterBearerToken":"..."}
Encode and call initialize:
CONFIG_B64=$(printf '%s' '{"twitterApiKey":"YOUR_KEY","twitterApiSecret":"YOUR_SECRET","twitterAccessToken":"YOUR_TOKEN","twitterAccessTokenSecret":"YOUR_TOKEN_SECRET","twitterBearerToken":"YOUR_BEARER"}' | base64)
curl -sS -X POST "http://localhost:8081/mcp?config=${CONFIG_B64}" \
-H 'content-type: application/json' \
-d '{"jsonrpc":"2.0","id":"1","method":"initialize","params":{"capabilities":{}}}'
Notes:
POST / will return 404; use /mcp for Streamable HTTP and /sse for SSE.smithery.yaml is configured for runtime: container and startCommand.type: http.Run the ASGI server directly.
If installed from PyPI:
python -m x_twitter_mcp.http_server
If installed from source with uv:
uv run python -m x_twitter_mcp.http_server
Endpoints and config passing are the same as above.
The project also exposes a STDIO CLI script x-twitter-mcp-server for desktop clients that expect STDIO.
If installed from PyPI:
x-twitter-mcp-server
If installed from source with uv:
uv run x-twitter-mcp-server
To use this MCP server with Claude Desktop, you need to configure Claude to connect to the server. Follow these steps:
Claude Desktop uses Node.js to run MCP servers. If you don't have Node.js installed:
node --version
Claude Desktop uses a claude_desktop_config.json file to configure MCP servers.
%APPDATA%\Claude\claude_desktop_config.json~/Library/Application Support/Claude/claude_desktop_config.jsonIf the file doesn't exist, create it.
Edit claude_desktop_config.json to include the x-twitter-mcp server. Replace /path/to/x-twitter-mcp-server with the actual path to your project directory (if installed from source) or the path to your Python executable (if installed from PyPI).
If installed from PyPI:
{
"mcpServers": {
"x-twitter-mcp": {
"command": "x-twitter-mcp-server",
"args": [],
"env": {
"PYTHONUNBUFFERED": "1",
"TWITTER_API_KEY": "your_api_key",
"TWITTER_API_SECRET": "your_api_secret",
"TWITTER_ACCESS_TOKEN": "your_access_token",
"TWITTER_ACCESS_TOKEN_SECRET": "your_access_token_secret",
"TWITTER_BEARER_TOKEN": "your_bearer_token",
"TWITTER_OAUTH2_USER_ACCESS_TOKEN": "your_oauth2_user_token"
}
}
}
}
If installed from source with uv:
{
"mcpServers": {
"x-twitter-mcp": {
"command": "uv",
"args": [
"--directory",
"/path/to/x-twitter-mcp-server",
"run",
"x-twitter-mcp-server"
],
"env": {
"PYTHONUNBUFFERED": "1"
}
}
}
}
"command": "x-twitter-mcp-server": Uses the CLI script directly if installed from PyPI."env": If installed from PyPI, you may need to provide environment variables directly in the config (since there's no .env file). If installed from source, the .env file will be used."env": {"PYTHONUNBUFFERED": "1"}: Ensures output is unbuffered for better logging in Claude.x-twitter-mcp, such as post_tweet, search_twitter, get_user_profile, etc.You can now interact with Twitter using natural language in Claude Desktop. Here are some example prompts:
Fetch a User Profile:
Get the Twitter profile for user ID 123456.
Claude will call the get_user_profile tool and return the user's details.
Post a Tweet:
Post a tweet saying "Hello from Claude Desktop! #MCP"
Claude will use the post_tweet tool to post the tweet and confirm the action.
Search Twitter:
Search Twitter for recent tweets about AI.
Claude will invoke the search_twitter tool and return relevant tweets.
Get Trends:
What are the current trending topics on Twitter?
Claude will use the get_trends tool to fetch trending topics.
When prompted, grant Claude permission to use the MCP tools for the chat session.
This MCP server is best when an MCP client should call Twitter API v2 tools directly. If the workflow runs in OpenClaw and needs plugin install metadata, endpoint discovery, monitor alerts, webhooks, giveaway draws, media upload or download workflows, direct messages, follower export, or approval-gated post and reply actions, use TweetClaw as a separate OpenClaw plugin and pass reviewed tweet IDs or URLs between the tools.
See OpenClaw Companion Workflow for a command flow that keeps credentials separate and avoids duplicate write actions.
Below is a list of all tools provided by the x-twitter-mcp server, along with example executions in Claude Desktop using natural language prompts.
get_user_profileGet the Twitter profile for user ID 123456789.
Claude will return the user's profile details, including ID, name, username, profile image URL, and description.get_user_by_screen_nameGet the Twitter user with screen name "example_user".
Claude will return the user's profile details.get_user_by_idFetch the Twitter user with ID 987654321.
Claude will return the user's profile details.get_user_followersGet the followers of user ID 123456789, limit to 50.
Claude will return a list of up to 50 followers.get_user_followingWho is user ID 123456789 following? Limit to 50 users.
Claude will return a list of up to 50 users.get_user_followers_you_knowGet common followers for user ID 123456789, limit to 50.
Claude will return a list of up to 50 common followers (simulated by filtering followers).get_user_subscriptionsGet the subscriptions for user ID 123456789, limit to 50.
Claude will return a list of up to 50 users (using following as a proxy for subscriptions).post_tweetPost a tweet saying "Hello from Claude Desktop! #MCP"
Claude will post the tweet and return the tweet details.delete_tweetDelete the tweet with ID 123456789012345678.
Claude will delete the tweet and confirm the action.get_tweet_detailsGet details for tweet ID 123456789012345678.
Claude will return the tweet's details, including ID, text, creation date, and author ID.create_poll_tweetCreate a poll tweet with the question "What's your favorite color?" and options "Red", "Blue", "Green" for 60 minutes.
Claude will create the poll tweet and return the tweet details.vote_on_pollVote "Blue" on the poll in tweet ID 123456789012345678.
Claude will return a mock response (since Twitter API v2 doesn't support poll voting).favorite_tweetLike the tweet with ID 123456789012345678.
Claude will favorite the tweet and confirm the action.unfavorite_tweetUnlike the tweet with ID 123456789012345678.
Claude will unfavorite the tweet and confirm the action.bookmark_tweetBookmark the tweet with ID 123456789012345678.
Claude will bookmark the tweet and confirm the action.delete_bookmarkRemove the bookmark for tweet ID 123456789012345678.
Claude will remove the bookmark and confirm the action.delete_all_bookmarksTWITTER_OAUTH2_USER_ACCESS_TOKEN.Delete all my Twitter bookmarks.
Claude will confirm with the user first, then delete all bookmarks and report the count.get_bookmarkscursor parameter for pagination. Requires TWITTER_OAUTH2_USER_ACCESS_TOKEN.Show my Twitter bookmarks, limit to 25.
Claude will return up to 25 bookmarked tweets, including ID, text, creation date, and author ID.get_timelineShow my Twitter For You timeline, limit to 20 tweets.
Claude will return up to 20 tweets from your For You timeline.get_latest_timelineShow my Twitter Following timeline, limit to 20 tweets.
Claude will return up to 20 tweets from your Following timeline.search_twitterSearch Twitter for recent tweets about AI, limit to 10.
Claude will return up to 10 recent tweets about AI.get_trendsWhat are the current trending topics on Twitter? Limit to 10.
Claude will return up to 10 trending topics.get_highlights_tweetsGet highlighted tweets from user ID 123456789, limit to 20.
Claude will return up to 20 tweets from the user's timeline (simulated as highlights).get_user_mentionsGet tweets mentioning user ID 123456789, limit to 20.
Claude will return up to 20 tweets mentioning the user.Server Not Starting:
.env file has all required Twitter API credentials (if installed from source).claude_desktop_config.json or your shell.x-twitter-mcp-server.uv or your Python executable is correctly installed and accessible.Claude Not Detecting the Server:
claude_desktop_config.json is correct.command and args point to the correct executable and script.Rate Limit Errors:
Bookmark tools return 403:
get_bookmarks and delete_all_bookmarks require TWITTER_OAUTH2_USER_ACCESS_TOKEN. App-only bearer tokens and OAuth 1.0a are rejected by the bookmarks endpoint.Syntax Warnings:
SyntaxWarning messages from Tweepy, they are due to docstring issues in Tweepy with Python 3.13. The server includes a warning suppression to handle this.Contributions are welcome! Please open an issue or submit a pull request on the GitHub repository.
This project is licensed under the MIT License. See the LICENSE file for details.
Claim this server with your GitHub account to request manual ownership verification.
Link to the catalog listing for X (Twitter) MCP server for AI tools from your README. This badge does not certify ownership, compatibility or security.
[](https://awesome-mcp.com/servers/x-twitter-mcp-server)Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.
来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。
尚无已审核的包 / 镜像标识,暂不展示下载统计。
Alternative and complementary servers in the same category

An AI receptionist platform with an MCP server for accessing business calls, contacts and appointments from AI assistants.
Pidgeon provides an MCP server and an email inbox API that gives AI agents their own addresses for sending, awaiting, and replying to email.

A Telegram CLI with background sync that can run an optional MCP server for a personal account using MTProto, not the bot API.