Install
$ agentstack add mcp-adarshpheonix2810-twitter-ai-agent β scanned Β· β verified β works with Claude Code, Cursor, and more.
Security review
β PassedNo issues found. Passed automated security review. Β· v0.1.0 How review works β
- β Prompt-injection patterns
- β Secret / credential exfiltration
- β Dangerous shell & filesystem operations
- β Untrusted network calls
- β Known-malicious package signatures
What it can access
- β Network access No
- β Filesystem access No
- β Shell / process execution No
- β Environment & secrets Used
- β Dynamic code execution No
From automated source analysis of v0.1.0. βUsedβ means the capability is present in the source β more access means more to trust, not that itβs unsafe.
About
Twitter Ai Agent with Gemini Integration π€
[](https://opensource.org/licenses/MIT)
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
``bash git clone https://github.com/adarshpheonix2810/Twitter-Ai-Agent.git cd Twitter-Ai-Agent ``
- Install dependencies
```bash # Install server dependencies cd server npm install
# Install client dependencies cd ../client npm install ```
- Set up environment variables
Create a .env file in both client and server directories:
client/.env `` GEMINI_API_KEY=your_gemini_api_key_here ``
server/.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
``bash cd server node index.js ``
- In a new terminal, start the client
``bash 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!
Made with β€οΈ by Adarsh Singh
Source & license
This open-source MCP server is cataloged on AgentStack and links to its original source β we do not rehost the code.
- Author: adarshpheonix2810
- Source: adarshpheonix2810/Twitter-Ai-Agent
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet β be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.