Skip to main content
Glama
rafaljanicki

X (Twitter) MCP server

by rafaljanicki

bookmark_tweet

Save tweets to your bookmarks for easy access. Organize them in folders to streamline your X (Twitter) experience.

Instructions

Adds the tweet to bookmarks

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
folder_idNo
tweet_idYes

Implementation Reference

  • Registration of the "bookmark_tweet" tool using the @server.tool decorator from FastMCP.
    @server.tool(name="bookmark_tweet", description="Adds the tweet to bookmarks")
  • The main handler function for the "bookmark_tweet" tool. It performs rate limit check, initializes Twitter clients, calls the bookmark API, and returns success status.
    async def bookmark_tweet(tweet_id: str, folder_id: Optional[str] = None) -> Dict: """Bookmarks a tweet. Args: tweet_id (str): The ID of the tweet to bookmark. folder_id (Optional[str]): The ID of the bookmark folder to add the tweet to. (Currently not supported by Tweepy v2 client, will be ignored). """ if not check_rate_limit("tweet_actions"): raise Exception("Tweet action rate limit exceeded") client, _ = initialize_twitter_clients() result = client.bookmark(tweet_id=tweet_id) return {"tweet_id": tweet_id, "bookmarked": result.data["bookmarked"]}

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/rafaljanicki/x-twitter-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server