- Explore MCP Servers
- MCP-AI-Agent
Mcp Ai Agent
What is Mcp Ai Agent
MCP-AI-Agent is a project that integrates Google’s Gemini AI model with Twitter using the Model Context Protocol (MCP) for seamless interactions, allowing users to engage with AI through a command-line interface and post tweets via Twitter API.
Use cases
Use cases include automating tweet posting based on user inputs, generating content for social media, and providing AI-driven responses to user queries on Twitter.
How to use
To use MCP-AI-Agent, clone the repository, set up the server and client by installing dependencies and configuring API keys in the .env file. Start the server and client to interact with the AI and post tweets.
Key features
Key features include integration with Google Gemini AI, real-time user interaction through a command-line interface, REST API for tool exposure, and the ability to post tweets using Twitter API credentials.
Where to use
MCP-AI-Agent can be used in various fields such as social media management, AI-driven content creation, customer engagement, and automated tweeting.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Overview
What is Mcp Ai Agent
MCP-AI-Agent is a project that integrates Google’s Gemini AI model with Twitter using the Model Context Protocol (MCP) for seamless interactions, allowing users to engage with AI through a command-line interface and post tweets via Twitter API.
Use cases
Use cases include automating tweet posting based on user inputs, generating content for social media, and providing AI-driven responses to user queries on Twitter.
How to use
To use MCP-AI-Agent, clone the repository, set up the server and client by installing dependencies and configuring API keys in the .env file. Start the server and client to interact with the AI and post tweets.
Key features
Key features include integration with Google Gemini AI, real-time user interaction through a command-line interface, REST API for tool exposure, and the ability to post tweets using Twitter API credentials.
Where to use
MCP-AI-Agent can be used in various fields such as social media management, AI-driven content creation, customer engagement, and automated tweeting.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Content
🚀 Twitter-AI-AGENT: MCP-Enabled Twitter Bot
📡 About MCP Server
Model Context Protocol (MCP) enables AI models to interact with external tools and services through a standardized interface. It allows seamless integration between AI and functionalities—making it easier to build AI-powered applications.
🤖 About the Project
This project demonstrates the integration of Google’s Gemini AI model with Twitter (X) using the MCP protocol.
It provides a command-line interface where users interact with AI, which can post tweets via Twitter API credentials.
⚙️ How It Works
- The MCP server exposes tools (e.g.,
createPost,addTwoNumbers) via a REST API. - The client connects to the MCP server using Server-Sent Events (SSE).
- User inputs are processed by Gemini AI.
- The AI chooses to call available tools based on context.
- Results are displayed back to the user in real time.
🛠️ Using the Project
📥 Clone the Repository
git clone https://github.com/kumarprakhar14/MCP-AI-Agent.git
cd MCP-AI-Agent
🖥️ Server Setup
cd server
npm install
# Create .env file with Twitter API credentials
npx nodemon ./index.js
💻 Client Setup
cd client
npm install
# Add GEMINI_API_KEY to .env file
npx nodemon ./index.js
📦 Dependencies
Node.jsExpresstwitter-api-v2@modelcontextprotocol/sdk@google/genaizoddotenv
🔐 Getting API Keys
🧠 Gemini API Key
- Visit Google AI Studio
- Sign in with your Google account
- Click “Get API Key”
- Copy it and add to your
.envfile:
GEMINI_API_KEY=your_gemini_api_key
🐦 Twitter (X) API Keys
- Go to Twitter Developer Portal
- Create a new project and app
- Enable Read and Write permissions
- Generate the following and add them to your
.envfile:
TWITTER_API_KEY TWITTER_API_SECRET TWITTER_ACCESS_TOKEN TWITTER_ACCESS_TOKEN_SECRET
🧪 Environment Variables
Your .env file should look like this:
GEMINI_API_KEY=your_gemini_api_key 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
⚠️ Disclaimer
Twitter (X) enforces strict policies regarding automated posting.
Excessive or irresponsible automation may lead to account suspension or permanent ban.
This tool is intended for educational purposes only.
Always comply with Twitter’s automation rules and best practices.
Dev Tools Supporting MCP
The following are the main code editors that support the Model Context Protocol. Click the link to visit the official website for more information.










