Uses .ENV files to manage Twitter credentials and API keys securely
Enables server functionality on the Node.js runtime environment
Integrates with npm packages, specifically the agent-twitter-client library for Twitter interactions
Supports TypeScript for development and requires building TypeScript code before execution
Provides support for using Yarn as an alternative package manager for installing dependencies
Twitter MCP Server
An MCP (Model Context Protocol) server that provides tools for interacting with Twitter using the agent-twitter-client library.
Features
getTweet: Retrieve a tweet by its ID
sendTweet: Post a new tweet to Twitter
Related MCP server: Twitter MCP Server
Prerequisites
Node.js (v14 or higher)
npm or yarn
Twitter account credentials
Installation
Clone this repository
Install dependencies:
Create a
.envfile in the root directory with your Twitter credentials:
Usage
Running the Server
You can run the server using the FastMCP CLI tools:
Using the Tools
getTweet
Retrieves a tweet by its ID.
Parameters:
tweetId(string): The ID of the tweet to retrieve
Example:
sendTweet
Posts a new tweet to Twitter.
Parameters:
text(string): The text content of the tweet to send
Example:
Development
This server is built using:
FastMCP - A TypeScript framework for building MCP servers
agent-twitter-client - A Twitter client library
To build the TypeScript code:
License
MIT