agent-twitter-client-mcp logo

agent-twitter-client-mcp

by ryanmac

A Model Context Protocol (MCP) server that integrates with Twitter using the `agent-twitter-client` package, allowing AI models to interact with Twitter without direct API access. It supports various authentication methods and tweet/user operations.

View on GitHub

Last updated: N/A

What is agent-twitter-client-mcp?

The agent-twitter-client-mcp is a Model Context Protocol (MCP) server that acts as an intermediary between AI models and the Twitter API. It allows AI agents to interact with Twitter without needing direct API credentials, providing a secure and controlled interface.

How to use agent-twitter-client-mcp?

To use the server, install it globally or locally via npm. Configure authentication using environment variables for cookies, username/password, or Twitter API keys. Run the server, and then use the available tools through the testing interface or integrate it with AI models like Claude. Refer to the documentation for detailed guides and examples.

Key features of agent-twitter-client-mcp

  • Authentication Options (Cookie, Username/Password, API)

  • Tweet Operations (Fetch, Search, Send, Like, Retweet, Quote)

  • User Operations (Get Profile, Follow, Get Followers/Following)

  • Grok Integration (Chat, Web Search, Real-time Data)

Use cases of agent-twitter-client-mcp

  • Automating Twitter interactions for AI agents

  • Integrating Twitter data into AI models

  • Creating AI-powered Twitter bots

  • Analyzing Twitter trends and sentiment using AI

FAQ from agent-twitter-client-mcp

What authentication methods are supported?

The server supports cookie-based authentication (recommended), username/password authentication, and Twitter API v2 credentials.

How do I configure the server to use cookies?

Set the AUTH_METHOD environment variable to 'cookies' and provide the TWITTER_COOKIES environment variable with a JSON array of cookies (auth_token, ct0, twid).

What is Grok integration?

Grok integration allows AI models to chat with Grok via Twitter's interface, access web search results, and leverage Twitter's real-time data.

What are the prerequisites for development?

You need Node.js 18+ and npm installed. Clone the repository, install dependencies with npm install, create a .env file, build the project with npm run build, and start the server with npm start.

How do I troubleshoot authentication issues?

Ensure your cookies are valid and properly formatted. If using username/password authentication, check for 2FA requirements or account lockouts. For API authentication, verify API key permissions and rate limits.

agent-twitter-client-mcp - MCP Server | MCP Directory