Twitter MCP Server for Claude Desktop
Overview
Twitter MCP Server is a Model Context Protocol (MCP) server that allows Claude Desktop to interact with Twitter, enabling users to post tweets, analyze content, and create structured tweets based on prompts.
To use the Twitter MCP Server, clone the repository, install dependencies, set up your Twitter API credentials in a .env file, and configure it within Claude Desktop settings.
- Access to Twitter profile, recent tweets, and trending topics. - Tools for posting, deleting, and analyzing tweets. - Prompts for creating concise tweets, Twitter threads, and engagement-focused content.
- Posting updates and engaging with followers on Twitter.
- Analyzing tweet content for engagement potential.
- Generating structured Twitter threads for detailed discussions.
Add to your AI client
Use these steps to connect Twitter MCP Server for Claude Desktop in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.
Cursor
Add this to your .cursor/mcp.json file in your project root, then restart Cursor.
.cursor/mcp.json
{
"mcpServers": {
"twitter-mcp-server-souravkumarbarman": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-twitter-mcp-server-souravkumarbarman"
]
}
}
}Claude Desktop
Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.
~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
{
"mcpServers": {
"twitter-mcp-server-souravkumarbarman": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-twitter-mcp-server-souravkumarbarman"
]
}
}
}Claude Code
Add this to your project's .mcp.json file. Claude Code will detect it automatically.
.mcp.json (project root)
{
"mcpServers": {
"twitter-mcp-server-souravkumarbarman": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-twitter-mcp-server-souravkumarbarman"
]
}
}
}VS Code (Copilot)
Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.
.vscode/mcp.json
{
"servers": {
"twitter-mcp-server-souravkumarbarman": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-twitter-mcp-server-souravkumarbarman"
]
}
}
}Windsurf
Add this to your Windsurf MCP config file, then restart Windsurf.
~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"twitter-mcp-server-souravkumarbarman": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-twitter-mcp-server-souravkumarbarman"
]
}
}
}Cline
Open Cline settings, navigate to MCP Servers, and add this server configuration.
Cline MCP Settings (via UI)
{
"mcpServers": {
"twitter-mcp-server-souravkumarbarman": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-twitter-mcp-server-souravkumarbarman"
]
}
}
}FAQ
What are the prerequisites for using the server?
You need Node.js (v16 or higher), Claude Desktop, and a Twitter Developer Account with API keys.
How do I troubleshoot API errors?
Verify your API credentials and permissions if you encounter errors.
Is the server secure?
Yes, it runs with user account permissions and requires confirmation before posting or deleting tweets.7:["$","div",null,{"className":"container mx-auto flex flex-col gap-4","children":["$L26","$L27",["$","$L28",null,{"currentProject":{"id":3174,"uuid":"3fd93ca7-a6cf-409e-9188-8741a2d2b3ea","name":"twitter-mcp-server","title":"Twitter MCP Server for Claude Desktop","description":"","avatar_url":"https://avatars.githubusercontent.com/u/127683168?v=4","created_at":"2025-03-18T03:12:12.741Z","updated_at":"2025-03-18T15:26:56.369Z","status":"created","author_name":"SouravKumarBarman","author_avatar_url":"https://avatars.githubusercontent.com/u/127683168?v=4","tags":"[]","category":"developer-tools","is_featured":false,"sort":1,"url":"https://github.com/SouravKumarBarman/twitter-mcp-server","target":"_self","content":"$29","summary":"$2a","img_url":null,"type":null,"metadata":"{\"star\":\"0\",\"license\":\"\",\"language\":\"JavaScript\",\"is_official\":false,\"latest_commit_time\":\"2025-03-17 14:31:26\"}","user_uuid":null,"tools":null,"sse_url":null,"sse_provider":null,"sse_params":null,"is_official":false,"server_command":null,"server_params":null,"server_config":null,"allow_call":false,"is_innovation":false,"is_dxt":false,"dxt_manifest":null,"dxt_file_url":null,"is_audit":false},"randomProjects":[],"currentServerKey":"$undefined"}]]}]