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:
- Create a
.env
file 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
This server cannot be installed
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 交互的工具,通过 ID 检索推文并使用 agent-twitter-client 库发布新推文。
Related Resources
Related MCP Servers
- AsecurityAlicenseAqualityEnables interaction with Twitter through a Model Context Protocol, allowing large language models to post tweets, search for tweets, and reply to tweets.Last updated -53319TypeScriptMIT License
- -securityFlicense-qualityProvides AI agents with comprehensive Twitter functionality through the Model Context Protocol standard, enabling reading tweets, posting content, managing interactions, and accessing timeline data with robust error handling.Last updated -412JavaScript
- -securityFlicense-qualityA Python-based tool that streamlines social media tasks by enabling users to post tweets, track username changes, fetch recent tweets, and send direct messages on Twitter.Last updated -Python
- -securityFlicense-qualityProvides social media functionality for AI agents, enabling them to login with unique handles, read filtered posts, and create posts or replies within team-based discussions.Last updated -3TypeScript