X (Twitter) MCP server
@rafaljanicki
关于 X (Twitter) MCP server
X/Twitter MCP server
基本信息
配置
使用下面的配置,将此服务器添加到你的 MCP 客户端。
{
"mcpServers": {
"x-twitter-server": {
"type": "stdio",
"command": "x-twitter-mcp-server",
"args": [],
"env": {
"TWITTER_API_KEY": "<TWITTER_API_KEY>",
"TWITTER_API_SECRET": "<TWITTER_API_SECRET>",
"TWITTER_ACCESS_TOKEN": "<TWITTER_ACCESS_TOKEN>",
"TWITTER_ACCESS_TOKEN_SECRET": "<TWITTER_ACCESS_TOKEN_SECRET>",
"TWITTER_BEARER_TOKEN": "<TWITTER_BEARER_TOKEN>"
}
}
}
}工具
未检测到工具
工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。
概览
What is X (Twitter) MCP server?
A Model Context Protocol (MCP) server for interacting with Twitter (X) via AI tools. It allows users to fetch tweets, post tweets, search Twitter, manage followers, and perform other actions through natural language commands in AI clients like Claude Desktop. The server uses Twitter API v2 with proper authentication (API keys and tokens) to minimize the risk of account suspensions.
How to use X (Twitter) MCP server?
Install via Smithery (recommended for Claude Desktop), from PyPI (pip install x-twitter-mcp), or from source. Set required Twitter API credentials as environment variables (TWITTER_API_KEY, TWITTER_API_SECRET, TWITTER_ACCESS_TOKEN, TWITTER_ACCESS_TOKEN_SECRET, TWITTER_BEARER_TOKEN). Run the server either as a Streamable HTTP service (Docker or local ASGI) or as a STDIO CLI script (x-twitter-mcp-server). For Claude Desktop, configure the server in claude_desktop_config.json with the appropriate command and environment variables.
Key features of X (Twitter) MCP server
- Fetch user profiles, followers, and following lists
- Post, delete, and favorite tweets
- Search Twitter for tweets and trends
- Manage bookmarks and timelines
- Built-in rate limit handling for the Twitter API
- Uses Twitter API v2 with proper authentication
- Complete implementation of Twitter API v2 endpoints
Use cases of X (Twitter) MCP server
- Fetch a user's Twitter profile via natural language prompts
- Post tweets directly from an AI assistant like Claude Desktop
- Search Twitter for recent tweets on a topic
- Retrieve current trending topics on Twitter
- Manage bookmarks (get bookmarks, delete all bookmarks) with an OAuth 2.0 user token
FAQ from X (Twitter) MCP server
What are the prerequisites for using this server?
Python 3.10 or higher, a Twitter Developer Account with API credentials (API Key, API Secret, Access Token, Access Token Secret, Bearer Token), and optionally Claude Desktop and Node.js for MCP integration.
How do I obtain Twitter API credentials?
You need to create a developer account and obtain API keys and tokens from the Twitter Developer Portal. For bookmark tools, you also need an OAuth 2.0 user access token obtained via the PKCE authorization flow using Tweepy.
What transport methods are available for the server?
The recommended transport is Streamable HTTP (JSON-RPC over HTTP) with endpoints at /mcp (POST) and /sse (GET). The server also provides a legacy STDIO CLI script for desktop clients.
How do I configure the server with Claude Desktop?
Edit claude_desktop_config.json (located in %APPDATA%\Claude on Windows or ~/Library/Application Support/Claude on macOS) to include the x-twitter-mcp server with the appropriate command and environment variables. Restart Claude Desktop to load the configuration.
What is required for bookmark-related tools?
Bookmark tools (get_bookmarks, delete_all_bookmarks) require an OAuth 2.0 user access token. Set it as the TWITTER_OAUTH2_USER_ACCESS_TOKEN environment variable after completing the PKCE authorization flow with Tweepy.
其他 分类下的更多 MCP 服务器
Reactive Resume
amruthpillaiA one-of-a-kind resume builder that keeps your privacy in mind. Completely secure, customizable, portable, open-source and free forever. Try it out today!
MaxKB
1Panel-dev🔥 MaxKB is an open-source platform for building enterprise-grade agents. 强大易用的开源企业级智能体平台。
Unity MCP ✨
justinpbarnettUnity MCP acts as a bridge between AI assistants and your Unity Editor. Give your LLM tools to manage assets, control scenes, edit scripts, and automate tasks within Unity.
Website
FunnyWolfAdversary simulation and Red teaming platform with AI

Peekaboo MCP – lightning-fast macOS screenshots for AI agents
steipetePeekaboo is a macOS CLI & optional MCP server that enables AI agents to capture screenshots of applications, or the entire system, with optional visual question answering through local or remote AI models.
评论