Devansh1974/MCP_AI_Server_Agent
If you are the rightful owner of MCP_AI_Server_Agent and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
MCP TweetBot is a lightweight, Gemini-powered chatbot integrated with Model Context Protocol (MCP) for command-line interaction, allowing users to post tweets and fetch motivational quotes.
MCP TweetBot
A lightweight, Gemini-powered chatbot integrated with Model Context Protocol (MCP) that allows you to call custom tools like tweeting on X (formerly Twitter) via command-line interaction.
This project showcases how AI + Tools can work together using Google Gemini + MCP SDK. Plug in your API keys, run the client, and start chatting, posting tweets, or getting motivational quotes directly through your terminal.
โจ Features
- ๐ค AI chat powered by Gemini
- ๐ง Supports multiple MCP tools
addTwoNumbers
: Adds two numberscreatePost
: Posts a tweet on X (Twitter)getMotivation
: Fetches a real-time motivational quote from ZenQuotes API
- ๐ก Real-time communication using Server-Sent Events (SSE)
- ๐ฌ CLI-based chatbot with tool execution
๐ ๏ธ Setup Instructions
1. Clone the repo
git clone https://github.com/yourusername/mcp-tweetbot.git
cd mcp-tweetbot
2. Install dependencies
npm install
3. Create a .env
file in the root
For Client Side -
GEMINI_API_KEY='Your API Key'
For Server Side -
TWITTER_API_KEY='Your API key'
TWITTER_API_SECRET='Your API Secret'
TWITTER_ACCESS_TOKEN='Your Token'
TWITTER_ACCESS_TOKEN_SECRET='Your Token Secret'
โ ๏ธ For security reasons, always use your own API keys when forking this project.
๐ฆ Required Dependencies
npm install express zod dotenv readline @google/genai @modelcontextprotocol/sdk twitter-api-v2 axios
4. Run the MCP server
node server/index.js
5. Run the MCP client
node client/index.js
๐งช Example Usage
You: What is 12 + 34?
AI: calling tool addTwoNumbers
AI: Tool Result: The sum of 12 and 34 is 46
You: Post "Hello world from my bot!" on Twitter
AI: calling tool createPost
AI: Tool Result: Tweeted: Hello world from my bot!
You: I'm feeling low, motivate me
AI: calling tool getMotivation
AI: Tool Result: "Push yourself, because no one else is going to do it for you." โ Anonymous
๐ Project Structure
mcp-tweetbot/
โโโ client/
โ โโโ index.js # CLI interface with Gemini + MCP
โโโ server/
โ โโโ index.js # Tool registration + MCP server setup
โ โโโ mcp.tool.js # Tool logic (e.g. createPost, getMotivation)
โโโ .env # API keys
โโโ README.md
๐ Requirements
- Node.js v18+
- Twitter Developer account (with Read & Write access)
- Gemini API key from Google AI Studio
- Internet connection (for fetching motivational quotes)
๐งโ๐ป Author
Made with โค๏ธ by Devansh Singh
- ๐ง Email:
- ๐ผ LinkedIn: linkedin.com/in/devanshsingh2006
๐ License
This project is open-source and free to use under the .