siddreddy07/mcp-server-twitter-post
If you are the rightful owner of mcp-server-twitter-post 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.
The MCP Twitter Post System is a robust tool designed to facilitate real-time tweeting using Node.js, Server-Sent Events (SSE), and the Twitter API.
π¦β¨ MCP Twitter Post System
Welcome to the MCP Twitter Post System β your go-to tool for launching tweets into the Twitterverse with real-time flair! π Powered by Node.js, Server-Sent Events (SSE), and the Twitter API, this project is neatly split into client/
and server/
folders for a smooth, organized workflow. Get ready to tweet like a rockstar! π
π Project Structure
Here's the blueprint of the MCP Twitter Post System:
Path | Description |
---|---|
client/ | π The MCP Client, your tweet-launching control hub |
client/index.js | π Fires off real-time tweet commands to the server |
server/ | π οΈ The MCP Server, the genius behind the scenes |
server/index.js | π₯οΈ Runs the HTTP server and SSE wizardry |
server/mcptools.js | π¦ Crafts tweets with Twitter API magic |
.env | π Safely stores your Twitter API keys |
README.md | π You're soaking in this epic guide right now! |
π Features That Make Tweeting a Blast
- β‘ Real-Time Tweet Action: Send tweets straight from your command line in a flash!
- π‘ Seamless SSE Connection: Client and server vibe together with Server-Sent Events.
- π¦ Twitter API Power: Post tweets securely using the Twitter API.
- π§© Clean Separation: Client and server logic are organized like a pro.
- π Safe Secrets: API keys stay secure in a
.env
file.
π Spotlight: The MCP Server
The MCP Server is the heart and soul of this project! π οΈπ₯ Housed in the server/
folder, itβs the powerhouse that listens for your tweet commands, orchestrates real-time communication via SSE, and seamlessly integrates with the Twitter API to make your tweets soar. Running on index.js
and powered by mcptools.js
, the MCP Server ensures every tweet is crafted with precision and posted securely. Itβs like having a tweet-slinging superhero at your command! π¦ΈββοΈ
π οΈ Setup: Letβs Launch Your Tweet Machine!
1. Clone the Repo
Dive into the Twitterverse by grabbing the code:
git clone https://github.com/siddreddy07/mcp-server-twitter-post.git
cd mcp-twitter-post
2. Install Dependencies (If Needed)
Hop into both client/
and server/
folders and run:
npm install
No
package.json
? Skip this step and keep the tweet party rolling! π
3. Configure Your Twitter API Keys
Create a .env
file in the server/
folder and add your Twitter API credentials:
API_KEY=your_twitter_app_key
API_SECRET_KEY=your_twitter_app_secret
ACCESS_TOKEN=your_twitter_access_token
ACCESS_SECRET_TOKEN=your_twitter_access_secret
β¨ Pro Tip: Snag these keys from the Twitter Developer Portal!
π Running the Project
Start the MCP Server
Launch the MCP Server to handle your tweet requests:
cd server
npx nodemon index.js
Fire Up the MCP Client
Kick off the client to send tweets in real-time:
cd client
node index.js
Watch your CLI sparkle as your tweets take flight! π¦β¨
π§ How It All Works
- Client (
client/index.js
): Your command center sends tweet data via HTTP or SSE. Type, hit enter, and BOOM β itβs off to the server! π - Server (
server/index.js
): The MCP Server catches client commands and directs the tweet-posting action. - Tools (
server/mcptools.js
): Works the Twitter API magic to craft and post tweets with style. - Security: API keys stay locked in the
.env
vault, safe from prying eyes. π
βοΈ Tech Stack That Rocks
- Node.js: The engine driving this tweet-tastic journey.
- Express (or native HTTP): Powers the MCP Server with slick efficiency.
- Server-Sent Events (SSE): Keeps client-server communication lightning-fast.
- Twitter API: Via
twitter-api-v2
(or your favorite Twitter package). - Dotenv: Keeps your API keys cozy and secure. π
π Quick Tips for Tweet Domination
- π‘οΈ Ensure your Twitter Developer account is active and your app is approved.
- π₯ Use
nodemon
for hot-reloading to keep the MCP Server development smooth. - π‘ Check the CLI for real-time tweet feedback.
- π Explore the Twitter API Docs for advanced tweaks.
π Bugs or Brilliant Ideas?
Weβre all about making this project shine! π Open an issue, submit a pull request, or tweet us your thoughts (manually for now π) to join the fun.
Happy Tweeting! π