Skip to main content
Glama

Twitter MCP Server

by takiAA

Twitter MCP 服务器

MCP(模型上下文协议)服务器,提供使用 agent-twitter-client 库与 Twitter 交互的工具。

特征

  • getTweet :通过 ID 检索推文
  • sendTweet :向 Twitter 发布一条新推文

先决条件

  • Node.js(v14 或更高版本)
  • npm 或 yarn
  • Twitter 帐户凭证

安装

  1. 克隆此存储库
  2. 安装依赖项:
npm install # or yarn install
  1. 使用您的 Twitter 凭据在根目录中创建一个.env文件:
TWITTER_USERNAME=your_twitter_username TWITTER_PASSWORD=your_twitter_password TWITTER_EMAIL=your_email@example.com (optional) TWITTER_2FA_SECRET=your_2fa_secret (optional) # Optional API credentials (used as fallback) TWITTER_API_KEY=your_api_key TWITTER_API_SECRET_KEY=your_api_secret_key TWITTER_ACCESS_TOKEN=your_access_token TWITTER_ACCESS_TOKEN_SECRET=your_access_token_secret

用法

运行服务器

您可以使用 FastMCP CLI 工具运行服务器:

# For development and testing in the terminal npx fastmcp dev # For visual inspection with the MCP Inspector npx fastmcp inspect

使用工具

获取推文

通过 ID 检索推文。

参数:

  • tweetId (string): 要检索的推文的 ID

例子:

getTweet({"tweetId": "1734609533274853865"})
发送推文

在 Twitter 上发布一条新推文。

参数:

  • text (字符串):要发送的推文的文本内容

例子:

sendTweet({"text": "Hello World from MCP!"})

发展

该服务器使用以下方式构建:

要构建 TypeScript 代码:

npx tsc

执照

麻省理工学院

-
security - not tested
F
license - not found
-
quality - not tested

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 库发布新推文。

  1. 特征
    1. 先决条件
      1. 安装
        1. 用法
          1. 运行服务器
          2. 使用工具
        2. 发展
          1. 执照

            Related MCP Servers

            • A
              security
              A
              license
              A
              quality
              Server for X (Twitter) integration that provides tools for reading your timeline and engaging with tweets. Designed for use with Claude desktop.
              Last updated -
              3
              8
              9
              JavaScript
              MIT License
            • -
              security
              A
              license
              -
              quality
              Enables interaction with Twitter through a Model Context Protocol, allowing large language models to post tweets, search for tweets, and reply to tweets.
              Last updated -
              25
              212
              15
              TypeScript
              MIT License
              • Apple
            • -
              security
              F
              license
              -
              quality
              Provides 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 -
              4
              1
              JavaScript
              • Apple
            • -
              security
              A
              license
              -
              quality
              Allows Claude and other MCP-compatible AI models to access TweetBinder by Audiense analytics data, enabling analysis of hashtags, users, and conversations on Twitter/X with engagement metrics, sentiment analysis, and report generation.
              Last updated -
              1
              TypeScript
              Apache 2.0
              • Apple

            View all related MCP servers

            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/takiAA/twitter-scraper-mcp'

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