About Twitter AI Agent
Twitter AI Agent is an MCP server in the Documentation category: π€ Engage with an interactive Twitter AI agent to post tweets, retrieve recent updates, and schedule tasks effortlessly.
The repository has 5 stars and 0 forks.
Install
git clone https://github.com/adarshpheonix2810/Twitter-Ai-AgentThis server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.
Ask AI
Ask AI about Twitter AI Agent
Powered by Claude · Grounded in docs
Security checks
- βREADME presentThe repository ships documentation.
5 checks have not been run yet.
README
Twitter Ai Agent with Gemini Integration π€
An intelligent Twitter (X) agent powered by Google's Gemini AI that allows you to post tweets using natural language commands. This project demonstrates the integration of AI with social media APIs to create powerful automation tools.
β¨ Features
- Natural Language Processing: Post tweets using everyday language
- AI-Powered: Leverages Google's Gemini 2.0 Flash model
- Real-time Interaction: Command-line interface for seamless interaction
- Secure: Environment-based configuration for sensitive credentials
- Extensible: Built with a modular architecture for easy expansion
π οΈ Tech Stack
- Backend: Node.js, Express
- AI: Google Gemini 2.0 Flash
- APIs: Twitter API v2
- Protocol: Model Context Protocol (MCP)
- Authentication: OAuth 1.0a
π¦ Prerequisites
- Node.js (v16+)
- npm or yarn
- Twitter Developer Account
- Google Cloud Project with Gemini API enabled
Installation
-
Clone the repository
git clone https://github.com/adarshpheonix2810/Twitter-Ai-Agent.git cd Twitter-Ai-Agent -
Install dependencies
# Install server dependencies cd server npm install # Install client dependencies cd ../client npm install -
Set up environment variables
Create a
.envfile in bothclientandserverdirectories:client/.env
GEMINI_API_KEY=your_gemini_api_key_hereserver/.env
TWITTER_API_KEY=your_twitter_api_key TWITTER_API_SECRET=your_twitter_api_secret TWITTER_ACCESS_TOKEN=your_twitter_access_token TWITTER_ACCESS_TOKEN_SECRET=your_twitter_access_token_secret
πββοΈ Running the Application
-
Start the server
cd server node index.js -
In a new terminal, start the client
cd client node index.js -
Start interacting! Type your message in the command line, for example:
Post a tweet saying "Hello from my new AI Twitter agent! #AI #TwitterBot"
π οΈ Project Structure
twitter-ai-agent/
βββ client/ # Client application
β βββ index.js # Main client file
β βββ package.json # Client dependencies
β βββ .env # Client environment variables
βββ server/ # Server application
β βββ index.js # Main server file
β βββ twittertool.js # Twitter API integration
β βββ package.json # Server dependencies
β βββ .env # Server environment variables
βββ .gitignore # Git ignore file
βββ README.md # This file
π Security Considerations
- Never commit your
.envfiles - Keep your API keys secure
- Use environment variables for all sensitive information
- Consider implementing user authentication for production use
π€ Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
π License
Distributed under the MIT License. See LICENSE for more information.
π§ Contact
Your Name - Adarsh Singh
Project Link: https://github.com/adarshpheonix2810/twitter-ai-agent
π Acknowledgments
π Show your support
Give a βοΈ if this project helped you!
README copy captured when this server was indexed; it may lag the repository. The original is authoritative.