Twitter MCP Server
by takiAA
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
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
Prerequisites
- Node.js (v14 or higher)
- npm or yarn
- Twitter account credentials
Installation
- Clone this repository
- Install dependencies:
Copy
- Create a
.env
file in the root directory with your Twitter credentials:
Copy
Usage
Running the Server
You can run the server using the FastMCP CLI tools:
Copy
Using the Tools
getTweet
Retrieves a tweet by its ID.
Parameters:
tweetId
(string): The ID of the tweet to retrieve
Example:
Copy
sendTweet
Posts a new tweet to Twitter.
Parameters:
text
(string): The text content of the tweet to send
Example:
Copy
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:
Copy
License
MIT
This server cannot be installed
Provides tools for interacting with Twitter to retrieve tweets by ID and post new tweets using the agent-twitter-client library.