agent-twitter-client-mcp
A Model Context Protocol (MCP) server that integrates with X using the
Overview
agent-twitter-client-mcp is a Model Context Protocol (MCP) server that allows AI models to interact with Twitter without direct API access, using the agent-twitter-client package.
To use the agent-twitter-client-mcp, install it via npm, set up your Twitter credentials in a .env file, and run the MCP server. You can also run demo scripts to explore its features.
- Authentication Options: Cookie-based, username/password, or Twitter API v2 credentials. - Tweet Operations: Fetch, send, search tweets, create polls, and interact with tweets. - User Operations: Get user profiles, follow users, and manage followers. - Grok Integration: Chat with Grok via Twitter, access real-time data, and continue conversations.
- Automating Twitter interactions for AI models.
- Fetching and analyzing tweets for sentiment analysis.
- Creating polls and engaging with users on Twitter.
Add to your AI client
Use these steps to connect agent-twitter-client-mcp 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": {
"agent-twitter-client-mcp-ryanmac": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-agent-twitter-client-mcp-ryanmac"
]
}
}
}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": {
"agent-twitter-client-mcp-ryanmac": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-agent-twitter-client-mcp-ryanmac"
]
}
}
}Claude Code
Add this to your project's .mcp.json file. Claude Code will detect it automatically.
.mcp.json (project root)
{
"mcpServers": {
"agent-twitter-client-mcp-ryanmac": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-agent-twitter-client-mcp-ryanmac"
]
}
}
}VS Code (Copilot)
Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.
.vscode/mcp.json
{
"servers": {
"agent-twitter-client-mcp-ryanmac": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-agent-twitter-client-mcp-ryanmac"
]
}
}
}Windsurf
Add this to your Windsurf MCP config file, then restart Windsurf.
~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"agent-twitter-client-mcp-ryanmac": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-agent-twitter-client-mcp-ryanmac"
]
}
}
}Cline
Open Cline settings, navigate to MCP Servers, and add this server configuration.
Cline MCP Settings (via UI)
{
"mcpServers": {
"agent-twitter-client-mcp-ryanmac": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-agent-twitter-client-mcp-ryanmac"
]
}
}
}FAQ
Can I use this with any Twitter account?
Yes, as long as you have the correct authentication credentials.
Is there a demo available?
Yes, the package includes demo scripts to showcase its features.
What are the authentication methods?
You can use cookie authentication, username/password, or Twitter API credentials.