原型 · 预览版:收录官方注册中心里的全部服务器,每 30 分钟同步一次。评价和账户功能将在后续阶段推出。
PopNx MCP为使用 AI 的人准备的 MCP 服务器 · 用大白话讲清楚

TwittrAPI

作者:twittrapi版本 1.2.0i★ –i电脑或云端
注册名称io.github.twittrapi/twittrapi-mcp

安装

概览

作者提供的说明(英文原文)

Read public Twitter/X data: tweets, profiles, followers, search. No X developer account.

PopNx MCP 的三大支柱

这三项永远不会合并成一个分数:意见、测量和人气是不同的东西。

它能帮你做什么

我们还没有为它写通俗的介绍。下面是我们从注册中心读取到的事实。

  • 连接方式: 电脑或云端
  • 传输方式: stdio, Streamable HTTP
  • 分类: 营销与社交媒体
  • 你需要填写:TWITTRAPI_API_KEY, RAPIDAPI_KEY, TWITTRAPI_X_COOKIE, TWITTRAPI_X_PROXY, TWITTRAPI_X_CHAT_PASSCODE

安装

选择你使用的 AI 应用,然后复制设置。

安装之前

  • 基础检查:1 项中通过 1 项
  • 在作者的服务器上运行:你向它提出的内容会经过他们的服务器。
  • 需要你自己填写: TWITTRAPI_API_KEY, RAPIDAPI_KEY, RAPIDAPI_HOST, TWITTRAPI_BASE_URL, TWITTRAPI_RESPONSE_FORMAT, TWITTRAPI_X_COOKIE, TWITTRAPI_X_PROXY, TWITTRAPI_X_CHAT_PASSCODE

标为机密的值是你账户的钥匙。千万不要分享给别人,也不要粘贴到聊天里。

你需要

  • 在云端运行无需安装任何东西,通过互联网连接
  • npm已安装 Node.js(用于 npx 命令)

你用的是哪个应用?

在上方选择你的应用。我们会记住它,下次按钮会显示“安装到 …”。

适用于网页版、桌面版和手机版 Claude:

  1. 打开 Settings → Connectors
  2. 点击 Add custom connector
  3. 粘贴下面的地址,然后点击 Add
  4. 如果要求登录,请登录作者的服务
SettingsConnectors1+ Add2https://…3
https://mcp.twittrapi.com/mcp

或者在你的电脑上运行

打开 Claude Desktop → Settings → Developer → Edit Config,把下面的内容粘贴到 claude_desktop_config.json

{
  "mcpServers": {
    "twittrapi": {
      "command": "npx",
      "args": [
        "-y",
        "twittrapi-mcp"
      ],
      "env": {
        "TWITTRAPI_API_KEY": "your-value",
        "RAPIDAPI_KEY": "your-value",
        "RAPIDAPI_HOST": "your-value",
        "TWITTRAPI_BASE_URL": "your-value",
        "TWITTRAPI_RESPONSE_FORMAT": "your-value",
        "TWITTRAPI_X_COOKIE": "your-value",
        "TWITTRAPI_X_PROXY": "your-value",
        "TWITTRAPI_X_CHAT_PASSCODE": "your-value"
      }
    }
  }
}

在终端中运行这条命令

claude mcp add --transport http twittrapi https://mcp.twittrapi.com/mcp

或者在你的电脑上运行

claude mcp add twittrapi --env TWITTRAPI_API_KEY=your-value --env RAPIDAPI_KEY=your-value --env RAPIDAPI_HOST=your-value --env TWITTRAPI_BASE_URL=your-value --env TWITTRAPI_RESPONSE_FORMAT=your-value --env TWITTRAPI_X_COOKIE=your-value --env TWITTRAPI_X_PROXY=your-value --env TWITTRAPI_X_CHAT_PASSCODE=your-value -- npx -y twittrapi-mcp

运行前请先填写空着的值。

在 Cursor 中打开

或者自己复制设置

粘贴到项目中的 .cursor/mcp.json,或 ~/.cursor/mcp.json

{
  "mcpServers": {
    "twittrapi": {
      "url": "https://mcp.twittrapi.com/mcp"
    }
  }
}

或者在你的电脑上运行

在 Cursor 中打开

或者自己复制设置

粘贴到项目中的 .cursor/mcp.json,或 ~/.cursor/mcp.json

{
  "mcpServers": {
    "twittrapi": {
      "command": "npx",
      "args": [
        "-y",
        "twittrapi-mcp"
      ],
      "env": {
        "TWITTRAPI_API_KEY": "your-value",
        "RAPIDAPI_KEY": "your-value",
        "RAPIDAPI_HOST": "your-value",
        "TWITTRAPI_BASE_URL": "your-value",
        "TWITTRAPI_RESPONSE_FORMAT": "your-value",
        "TWITTRAPI_X_COOKIE": "your-value",
        "TWITTRAPI_X_PROXY": "your-value",
        "TWITTRAPI_X_CHAT_PASSCODE": "your-value"
      }
    }
  }
}

浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。

在 VS Code 中打开

或者自己复制设置

粘贴到项目中的 .vscode/mcp.json

{
  "servers": {
    "twittrapi": {
      "type": "http",
      "url": "https://mcp.twittrapi.com/mcp"
    }
  }
}

或者在你的电脑上运行

在 VS Code 中打开

或者自己复制设置

粘贴到项目中的 .vscode/mcp.json

{
  "servers": {
    "twittrapi": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "twittrapi-mcp"
      ],
      "env": {
        "TWITTRAPI_API_KEY": "your-value",
        "RAPIDAPI_KEY": "your-value",
        "RAPIDAPI_HOST": "your-value",
        "TWITTRAPI_BASE_URL": "your-value",
        "TWITTRAPI_RESPONSE_FORMAT": "your-value",
        "TWITTRAPI_X_COOKIE": "your-value",
        "TWITTRAPI_X_PROXY": "your-value",
        "TWITTRAPI_X_CHAT_PASSCODE": "your-value"
      }
    }
  }
}

浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。

ChatGPT 只能连接互联网上的服务器:

  1. 打开网页版 ChatGPT → Settings → Connectors (Apps)
  2. 点击 Create 或 Add(部分套餐需要先在 Advanced 中开启 Developer mode)
  3. 粘贴下面的地址,起个名字,然后保存
  4. 如果要求登录,请登录作者的服务
SettingsConnectors1+ Create2https://…3
https://mcp.twittrapi.com/mcp

菜单名称可能因套餐和版本不同而略有差异。

你的选择通过 Cookie 保存在这台设备上,无需账户。

需要你填写的值

  • TWITTRAPI_API_KEY 机密 env
    Your TwittrAPI key. Set this or RAPIDAPI_KEY.
  • RAPIDAPI_KEY 机密 env
    RapidAPI key for the Twitter AIO API. Used when TWITTRAPI_API_KEY is not set.
  • RAPIDAPI_HOST env
    Host of your TwittrAPI listing on RapidAPI. Change it if you subscribed to another listing.
  • TWITTRAPI_BASE_URL env
    Override the API base URL.
  • TWITTRAPI_RESPONSE_FORMAT env
    Format of tool results: simple (compact JSON, far fewer tokens) or raw (X's full GraphQL JSON). Tools also take a format argument.
  • TWITTRAPI_X_COOKIE 机密 env
    Cookie of your own logged-in x.com session (auth_token, ct0, twid). With TWITTRAPI_X_PROXY set, adds the account tools (post, like, follow, DMs, lists, drafts).
  • TWITTRAPI_X_PROXY 机密 env
    Your proxy for the account tools, http://user:pass@host:port.
  • TWITTRAPI_X_CHAT_PASSCODE 机密 env
    Your X Chat passcode. Adds send_dm and message text in the DM inbox.

这些设置是根据作者在注册中心的条目生成的。如果 README 的写法不同,请以 README 为准。

它能做什么

我们还没有读取这个服务器的工具列表;我们会轮流检查各个端点。

基础检查i

我们检查的是任何人都能看到的信息;我们没有阅读代码。不适用的检查项不计入总数。 · 检查于 2026年11月7日

  • ✓ 通过

    作者与仓库一致

    注册名称已通过 GitHub 账户 twittrapi 验证,该账户拥有此仓库

  • … 尚未检查

    仍在维护

    我们还没有从 GitHub 读取这个仓库

  • … 尚未检查

    有许可证

    我们还没有从 GitHub 读取这个仓库

  • … 尚未检查

    端点有响应

    尚未检查;我们会轮流检查各个端点

  • … 尚未检查

    使用 OAuth 登录

    尚未检查;我们会轮流检查各个端点

  • … 尚未检查

    工具描述中没有隐藏指令

    尚未检查;我们会在检查端点时读取工具列表

与“营销与社交媒体”中的其他服务器比较i

  • 星标数多于此分类中其他 2980 个服务器的 0%
  • 发布到注册中心的时间比此分类中其他 2980 个服务器的 63% 更新
  • 基础检查结果等于或优于此分类中其他 2980 个服务器的 100%

与注册中心里这个分类中所有活跃的服务器比较。只有当发布者拥有该仓库时,星标数才计入。

常见问题

TwittrAPI 安全吗?

它在 1 项适用的基础检查中通过了 1 项。我们没有阅读代码。在添加密钥或令牌之前,请先看看这个服务器要求哪些权限,并使用只具备所需权限的密钥。

它需要哪些密钥或代码?

你需要填写:TWITTRAPI_API_KEY, RAPIDAPI_KEY, TWITTRAPI_X_COOKIE, TWITTRAPI_X_PROXY, TWITTRAPI_X_CHAT_PASSCODE

它在我的电脑上运行还是在云端?

两种方式都可以:安装在你的电脑上,或者连接云端版本。

它还在维护吗?

GitHub 仓库最后更新于–,最新版本(1.2.0)于19天前进入注册中心。

哪些应用可以使用它?

支持 MCP 的应用,例如 Claude Desktop、Claude Code、Cursor 和 VS Code。它通过 URL 连接,所以接受远程 MCP 服务器的应用也可以使用,例如开启开发者模式的 ChatGPT。

有什么可以替代它?

同一分类中有:MCP YouTube Transcript, Google Analytics MCP, BibiGPT YouTube Video Summarizer

替代选择

同一分类中其他作者的服务器,按星标数排序。

如何看卡片:★ GitHub 星标i三大支柱:评价 · 检查 · 使用情况i更新 = 最新版本发布到注册中心的时间i

MCP YouTube Transcript

作者:jkawamoto

An MCP server retrieving transcripts of YouTube videos

在你的电脑上运行★ 495MIT10天前更新
安装

Google Analytics MCP

作者:surendranb

GA4 MCP server for AI agents: schema discovery, server-side aggregation, analysis-ready defaults.

在你的电脑上运行★ 244MIT10天前更新
安装

AI video summarizer: summarize and transcribe YouTube, Bilibili, TikTok and podcast videos.

在云端运行★ 137MIT10天前更新
安装

作者的 README

打开 README

按原文从作者的仓库复制。PopNx MCP 没有审查或背书其内容。HTML、图片和脚本已被移除。链接会离开本站。

twittrapi-mcp – Twitter/X MCP server for Claude, Cursor and other AI agents

An MCP server for TwittrAPI, a REST API for public Twitter/X data: tweets, profiles, followers, search, lists and communities. It lets Claude, Cursor and other MCP clients read that data, from $0.065 per 1,000 calls and with no X developer account.

Get an API key: twittrapi.com/start · Pricing · Docs · Status · also available on RapidAPI

SDKs and integrations: Python · Node.js · Go · n8n · Make · Apify · LangChain · LlamaIndex · Agent skill · Examples

Not affiliated with X Corp.

Hosted server (no install)

Apps that support remote MCP servers can connect by URL instead (available with the hosted release; see twittrapi.com/docs/hosted-mcp):

https://mcp.twittrapi.com/mcp
ClientSetup
Claude.ai / Claude DesktopSettings > Connectors > Add custom connector, paste the URL, Connect, log in to TwittrAPI and allow access (OAuth)
ChatGPTSettings > Apps & Connectors > Advanced settings > Developer mode, then Create with the URL and OAuth
Claude Codeclaude mcp add --transport http twittrapi https://mcp.twittrapi.com/mcp (OAuth), or add --header "Authorization: Bearer $TWITTRAPI_API_KEY"
Cursor{"mcpServers": {"twittrapi": {"url": "https://mcp.twittrapi.com/mcp", "headers": {"X-API-KEY": "${env:TWITTRAPI_API_KEY}"}}}} in mcp.json
VS Code{"servers": {"twittrapi": {"type": "http", "url": "https://mcp.twittrapi.com/mcp"}}} in .vscode/mcp.json (OAuth)

With OAuth the app never sees your API key; calls are billed to your balance like any other call. Connected apps are listed (and can be disconnected) in the dashboard under Connected apps.

What you need

  • Node.js 20 or newer
  • A TwittrAPI key, or a RapidAPI key subscribed to the Twitter AIO API

Every tool call is one billed API call on your account.

Install

Claude Code
claude mcp add twittrapi --env TWITTRAPI_API_KEY=your-key -- npx -y twittrapi-mcp
Claude Desktop

Open Settings > Developer > Edit Config and add this to claude_desktop_config.json:

{

"mcpServers": { "twittrapi": { "command": "npx", "args": ["-y", "twittrapi-mcp"], "env": { "TWITTRAPI_API_KEY": "your-key" } } } }

Restart Claude Desktop afterwards.

Cursor

Add this to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (one project):

{

"mcpServers": { "twittrapi": { "command": "npx", "args": ["-y", "twittrapi-mcp"], "env": { "TWITTRAPI_API_KEY": "your-key" } } } }

Other clients

Any client that can start a stdio server works. The command is npx -y twittrapi-mcp.

Environment variables

VariableRequiredDescription
TWITTRAPI_API_KEYone of the two keysYour TwittrAPI key. Sent as the X-API-KEY header.
RAPIDAPI_KEYone of the two keysRapidAPI key. Used only when TWITTRAPI_API_KEY is not set.
RAPIDAPI_HOSTnoHost of your RapidAPI listing. Default twitter-aio.p.rapidapi.com.
TWITTRAPI_BASE_URLnoAPI base URL for the direct API. Default https://api.twittrapi.com.
TWITTRAPI_RESPONSE_FORMATnosimple (default) or raw. See Response format.
TWITTRAPI_X_COOKIEnoCookie of your own logged-in x.com session. Turns on the account tools together with TWITTRAPI_X_PROXY.
TWITTRAPI_X_PROXYnoYour proxy for the account tools, http://user:pass@host:port.
TWITTRAPI_X_CHAT_PASSCODEnoYour X Chat passcode. Adds send_dm, accept_dm_request, decline_dm_request and message text in list_dm_conversations.

If neither key is set, the server still starts and lists its tools, but every call returns an error explaining how to set a key.

Using RapidAPI instead

If you bought access through RapidAPI, set RAPIDAPI_KEY instead of TWITTRAPI_API_KEY:

"env": { "RAPIDAPI_KEY": "your-rapidapi-key" }

Requests then go to https://twitter-aio.p.rapidapi.com with the x-rapidapi-key and x-rapidapi-host headers. The tools and their output are the same.

Subscribed to another TwittrAPI listing on RapidAPI? Set its host: "RAPIDAPI_HOST": "twttr.p.rapidapi.com".

Tools

These tools read public data and are always available. The account tools are added when you configure your X session.

ToolWhat it does
get_user_by_usernameProfile by handle, including the numeric user ID
get_user_by_idProfile by numeric user ID
username_to_idResolve a handle to its user ID
users_by_idsProfiles for up to 500 user IDs at once
get_user_tweetsA user's tweets
get_user_tweets_and_repliesA user's tweets and replies
get_user_mediaA user's tweets with photos or videos
get_followersA user's followers
get_followingAccounts a user follows
get_verified_followersA user's verified followers
get_user_affiliatesAccounts affiliated with an organization
get_friendships_batchWhether one account follows up to 50 others, and back
get_user_about_batch"About this account" for up to 20 handles
search_tweetsSearch with X operators; Top, Latest, People, Photos or Videos
get_tweetA tweet and its reply thread
tweets_by_idsUp to 100 tweets by ID at once
get_tweet_retweetsUsers who retweeted a tweet
get_tweet_quotesTweets quoting a tweet
get_tweet_repliesOnly the replies to a tweet
get_tweet_threadThe author's own thread around a tweet
get_list_detailsList name, owner and counts
get_list_tweetsTweets from a list's members
get_list_membersMembers of a list
get_communityCommunity details
get_community_aboutA community's About page: rules, moderators, members
get_community_tweetsTweets in a community
search_communitiesFind communities by keyword
get_trendsTrending topics for a location (WOEID)
get_trend_locationsLocations that have trends, with their WOEIDs
get_spaceAn X Space: title, state, host and participants

The user timeline tools (get_user_tweets, get_followers and so on) accept either userId or username. The batch tools are billed one call per handle; tweets_by_ids is one call however many IDs.

Account tools

With TWITTRAPI_X_COOKIE and TWITTRAPI_X_PROXY set, the server also lists tools that act on your own X account:

ToolWhat it does
create_tweetPost a tweet; optional quote (quoteUrl), poll (pollChoices) and reply limit
reply_to_tweetReply to a tweet
delete_tweetDelete one of your tweets
like_tweet, unlike_tweetLike or unlike a tweet
retweet, unretweetRetweet or undo a retweet
bookmark_tweet, unbookmark_tweetAdd or remove a bookmark
follow_user, unfollow_userFollow or unfollow (by userId or username)
list_dm_conversationsYour DM inbox
send_dmSend a direct message (needs TWITTRAPI_X_CHAT_PASSCODE)
list_dm_requestsPending message requests; does not accept them or mark them as seen
accept_dm_requestAccept a one-to-one request and send the first reply (needs TWITTRAPI_X_CHAT_PASSCODE)
decline_dm_requestDelete a request from your inbox; the sender is not told (needs TWITTRAPI_X_CHAT_PASSCODE)
create_listCreate a list
add_list_member, remove_list_memberAdd or remove a list member
create_draft, list_draftsSave a draft, list your drafts
list_bookmark_folders, list_bookmark_folder_tweetsYour bookmark folders and the tweets in one (X Premium)
search_bookmarksSearch your bookmarks
list_community_membershipsCommunities you are a member of
list_articles, get_articleYour X Articles, drafts or published, and one article (X Premium)
create_article, update_articleSave a new article as a draft, change one (X Premium)
publish_article, unpublish_article, delete_articlePublish, unpublish or delete an article (X Premium)

How to get the cookie and set up a proxy: twittrapi.com/docs/x-session. The cookie needs auth_token and ct0; direct messages also need twid.

"env": {

"TWITTRAPI_API_KEY": "your-key", "TWITTRAPI_X_COOKIE": "auth_token=...; ct0=...; twid=u%3D...", "TWITTRAPI_X_PROXY": "http://user:pass@host:port" }

  • The cookie and proxy stay in the server's configuration. They are not tool arguments, so the model never sees them, and they are never logged or returned in a result.
  • Write tools are marked readOnlyHint: false (deletions and undo actions also destructiveHint: true), so clients ask before running them.
  • Each call is one billed API call, like the read tools.
  • Account tools are only available over stdio. HTTP mode and the hosted server do not offer them.
Response format

Tool results use the API's simple format by default: flat camelCase JSON with a fixed schema ({"data": [...], "nextCursor": ..., "hasNextPage": ...} for lists, {"data": {...}} for single objects). Tweets carry id, url, text, createdAt, author, counts, media, quoted, retweetOf and a few more fields; users carry username, name, description, counts and so on. That is about 60 % fewer tokens than X's raw GraphQL JSON.

To get the raw JSON instead (for cards, polls, edit history, community notes and other fields the simple format leaves out):

  • per call: the tools take an optional format argument, "simple" or "raw";
  • for the whole server: set TWITTRAPI_RESPONSE_FORMAT=raw (the format argument still wins).

A few endpoints have no simple format: get_space, get_community_about, the batch tools and the newer account tools (bookmark folders and search, communities, articles). These tools have no format argument and always return raw JSON.

Output size and pagination

Raw responses can be several hundred KB. Every tool takes an optional max_chars argument (default 50,000, range 1,000 to 1,000,000). Longer output is cut and ends with a [TRUNCATED ...] marker.

Paginated tools print the cursor above the JSON, so truncation never removes it:

next_cursor: DAABCgABGZ...

Pass next_cursor as cursor to get the next page.

{"data":{...}}

On the last page the header read

只显示了开头部分;其余内容请在仓库中阅读

问 PopNx