About X AI Agent
X AI Agent is an MCP server published by Shamika-1410 in the Developer Tools category: mCP server: X AI Agent. It has been installed 0 times through Conduid.
The repository has 7 stars and 0 forks, with the last commit a year ago. Six months or more without a commit doesn't mean the server is broken, but check the open issues (0) before depending on it in production.
Install
npx x-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 X AI Agent
Powered by Claude · Grounded in docs
Security checks
- ·README presentNot checked yet.
- ·License declaredNot checked yet.
- ·Tests presentNot checked yet.
- ·Dependencies pinnedNot checked yet.
- ·No dynamic code executionNot checked yet.
- !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.
README
AI Agent for X ( ex-Twitter )
A server application that integrates with Google's Generative AI and provides MCP (Model Context Protocol) functionality. Built with Node.js and Express.
Features
- 🤖 Integration with Google's Generative AI
- ⚡ Fast and efficient message handling
- 🔒 Environment variable configuration for API keys
- 🔄 MCP (Model Context Protocol) server implementation
- 🛠️ Custom tools for number addition and Twitter post creation
Prerequisites
- Node.js (v14 or higher)
- npm or yarn
- Google AI API key
Project Structure
├── server/ # Node.js backend server
│ ├── index.js # Express server setup
│ ├── mcp.tool.js # MCP tool implementations
│ ├── .env # Server environment variables
│ └── package.json # Backend dependencies
│
├── client/ # Node.js client application
│ ├── index.js # Client application entry point
│ ├── .env # Client environment variables
│ └── package.json # Client dependencies
│
├── node_modules/ # Project dependencies
├── package.json # Root package.json
└── package-lock.json # Dependency lock file
Setup Instructions
- Clone the repository:
git clone <repository-url>
cd <project-directory>
- Install dependencies:
npm install
- Create
.envfiles:
In the server directory (server/.env):
GEMINI_API_KEY=your_gemini_api_key_here
In the client directory (client/.env):
TWITTER_API_KEY=your_twitter_api_key_here
TWITTER_API_SECRET=your_twitter_api_secret_here
TWITTER_ACCESS_TOKEN=your_twitter_access_token_here
TWITTER_ACCESS_TOKEN_SECRET=your_twitter_access_token_secret_here
- Start the server:
cd server
node index.js
- In a new terminal, start the client:
cd client
node index.js
The server will be running at http://localhost:3001
Environment Variables
Server Environment Variables
Create a .env file in the server directory with:
GEMINI_API_KEY: Your Gemini API key
Client Environment Variables
Create a .env file in the client directory with:
TWITTER_API_KEY: Your Twitter API keyTWITTER_API_SECRET: Your Twitter API secret keyTWITTER_ACCESS_TOKEN: Your Twitter access tokenTWITTER_ACCESS_TOKEN_SECRET: Your Twitter access token secret
To get these Twitter API credentials:
- Go to the Twitter Developer Portal
- Create a new project and app
- Navigate to your app's settings
- Generate your API keys and tokens
- Make sure to enable the necessary permissions for your app
Technologies Used
- Backend:
- Node.js
- Express
- dotenv for environment variables
- @google/generative-ai for AI integration
- @modelcontextprotocol/sdk for MCP implementation
- Zod for schema validation
API Endpoints
GET /sse: Establishes an SSE connection for real-time communicationPOST /messages: Handles incoming messages with session management
Contributing
- Fork the repository
- 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
Acknowledgments
- Google Generative AI for providing the AI capabilities
- Model Context Protocol team for the MCP implementation
README mirrored from the source repository 4 months ago. The original is authoritative.