X (Twitter) MCP server for your agent

To give Claude, Cursor, ChatGPT or another MCP client X (Twitter) data, add Apify's hosted MCP server with the Actors ticked below as tools (6 by default); the URL is in every config. Sign in with your Apify account or pass an API token; each call runs the Actor and returns X (Twitter) records to the agent.

One click, signs in with Apify on first use:

Any other client, one command (writes the config for 25+ agents, including Windsurf, Zed, Cline and Goose):

npx add-mcp "https://mcp.apify.com/?tools=fetch-actor-details,nimbryxo-studio/x-twitter-keyword-and-hashtag-tweet-search,nimbryxo-studio/x-twitter-profile-and-post-engagement-extractor,vexaloom-labs/x-keyword-search-with-mention-and-reply-operators,vexaloom-labs/x-post-reply-and-profile-lookup-by-link-or-id,nimbryxo-studio/x-trends-lookup-by-country-city-and-woeid,dataspryva/twitter-x-media-downloader" --name apify

Catalogue Actors
12
In this bundle
6
Official API
Public
Data checked
2026-11-12

Config for your client

Claude Code configterminal or .mcp.json

claude mcp add --transport http apify "https://mcp.apify.com/?tools=fetch-actor-details,nimbryxo-studio/x-twitter-keyword-and-hashtag-tweet-search,nimbryxo-studio/x-twitter-profile-and-post-engagement-extractor,vexaloom-labs/x-keyword-search-with-mention-and-reply-operators,vexaloom-labs/x-post-reply-and-profile-lookup-by-link-or-id,nimbryxo-studio/x-trends-lookup-by-country-city-and-woeid,dataspryva/twitter-x-media-downloader"

  1. Run the command in your project folder. Add --scope user to make it available in every project.
  2. Start Claude Code, type /mcp, pick the server and sign in to Apify in the browser window.
  3. No browser sign-in? Add --header "Authorization: Bearer YOUR_APIFY_TOKEN" to the command instead.

Sign-in: OAuth sign-in on first use, or a token header.

Validated, not executed: 7 of 7 checks pass
  • Uses Apify's hosted MCP endpoint over HTTPS
  • The tools parameter lists exactly the chosen Actors as owner/name
  • JSON configs parse and use the client's top-level key and the same URL
  • Codex TOML has a [mcp_servers.<name>] table with url and bearer_token_env_var
  • CLI commands quote the same URL and use the streamable HTTP transport
  • One-click install links decode back to the same URL and carry no token
  • Only placeholders, no real token

Official API or an Actor?

X (Twitter) has a public official API

X API v2 uses prepaid pay-per-usage credits. Published standard read rates include $0.005 per Post resource and $0.010 per User resource. Pay-per-use launched on February 6, 2026; legacy Basic and Pro plans migrated to pay-per-use.

Charged per resource returned: $0.005 per Post, $0.010 per User. Owned Reads on qualifying own-account endpoints are $0.001 per resource. A 3 million Post-read monthly cap applies to self-serve pay-per-use.

Spending limits are configurable. Enterprise access is required above the monthly cap.

X API v2 documentation

X content and API use are governed by the X Developer Agreement. Do not bypass logins or access controls; not legal advice.

Which Actor for which job

  • Twitter (X) Media Downloader fits downloading media from public post links or usernames without an X login or cookies; its output includes mediaType and mediaUrl.
  • X Broadcast Viewer History & Replay Link Scraper fits collecting broadcast metadata, viewer timelines, public chat and replay information; its output includes state and viewersTotal.
  • Twitter (X) Screenshot Generator fits capturing public posts and profiles as saved images; its output includes targetUrl and captureMode.
  • X Article Announcement Post Metadata Collector fits collecting article previews and announcement-post context from an article or post link; its output includes bodyAvailable and sourceTweetUrl.
  • X Community Activity & Member Finder fits examining public community rules, posts and available member context; its output includes communityName and memberCount.
  • X Keyword Search with Mention & Reply Operators fits finding posts with mention or reply constraints and retaining conversation context; its output includes searchTerm and replyCount.
  • X Post, Reply & Profile Lookup by Link or ID fits resolving known post links, identifiers or handles; its output includes text and viewCount. Add it to the MCP tool list before requesting a lookup.
  • X Trends Lookup by Country, City & WOEID fits comparing ranked trends across supported locations; its output includes location and trend. Add it to the MCP tool list before requesting trends.

Where it stops

These tools cover public X content and do not establish access to protected posts or private messages. Article-announcement metadata does not guarantee article body text, and an empty keyword search writes a run summary to the key-value store rather than a status row. Your own Apify API token is required for token-based configurations; it does not authorize an X account through OAuth. Recipe for Agents has not authenticated with Apify or X for you. Direct use of the official X API requires separate access and prepaid usage credits.

Every X (Twitter) Actor in the catalogue

ActorReturnsFieldsStore priceLast update
Twitter (X) Media Downloader Download videos, photos, GIFs, audio and poster images from public Twitter/X posts - no login, no cookies. Works with post links or… Fields include tweetId, tweetUrl, mediaType. 34 $0.99 per 1,000 results 2026-10-29
X Broadcast Viewer History & Replay Link Scraper One row per X broadcast, viewer-timeline point, public chat message, or status row, with metadata, viewer statistics, HLS replay… Fields include title, state, viewersNow. 8 $0.99 per 1,000 results 2026-10-25
Twitter (X) Screenshot Generator Screenshot capture records for public X posts and profiles, with image dimensions, format, and download link, plus the saved image files. Fields include targetUrl, profileUrl, captureMode. 59 $0.99 per 1,000 results 2026-11-09
X Article Announcement Post Metadata Collector Turn an X (Twitter) Article's announcement post or article link into structured metadata: title, preview text, cover image, publish date… Fields include title, articleId, bodyAvailable. 6 $0.99 per 1,000 results 2026-10-18
X Community Activity & Member Finder Community profile, rules, top/media posts with engagement metrics, and optional creator, moderator, facepile and active-member rows from a… Fields include communityName, name, text. 21 $0.99 per 1,000 results 2026-11-02
X Keyword Search with Mention & Reply Operators X posts with full text, author profile, engagement counters, media, quoted post and reply context. Empty runs write a RUN_SUMMARY to the… Fields include text, createdAt, language. 21 $0.99 per 1,000 results 2026-11-05
X Post, Reply & Profile Lookup by Link or ID X posts, replies, and profile rows resolved from the links, IDs, or handles you supplied. Fields include text, createdAt, likeCount. 9 $0.99 per 1,000 results 2026-10-19
X Trends Lookup by Country, City & WOEID Ranked X trends per location, with trend type, search links, cross-location overlap and catalog metadata, plus location-list rows and… Fields include location, trend, trendType. 10 $0.99 per 1,000 results 2026-11-02
X Video Subtitle & Caption Transcript Converter Per-video transcript records with timestamped segments, full transcript text, timestamped text, RAG chunks, SRT/VTT subtitle output and… Fields include tweetUrl, tweetId, videoIndex. 29 $0.99 per 1,000 results 2026-11-09
X/Twitter Keyword & Hashtag Tweet Search Tweets found for your keywords — text, author, engagement metrics, media and the search term that found each row. Fields include text, createdAt, language. 18 $0.99 per 1,000 results 2026-11-09
Twitter (X) Space Scraper Space metadata, participant rows, transcripts and downloadable replay audio collected from public X Spaces. Fields include title, state, listenersLive. 8 $0.99 per 1,000 results 2026-11-07
X (Twitter) Profile & Post Engagement Extractor One profile row per account, one post row per collected post (cursor-paged up to maxPostsPerProfile), and status rows for protected… Fields include message, username, name. 29 $0.99 per 1,000 results 2026-10-29

Store links: twitter-x-media-downloader, x-broadcast-viewer-history-and-replay-link-scraper, twitter-x-screenshot-generator, x-article-announcement-post-metadata-collector, x-community-activity-and-member-finder, x-keyword-search-with-mention-and-reply-operators, x-post-reply-and-profile-lookup-by-link-or-id, x-trends-lookup-by-country-city-and-woeid, x-video-subtitle-and-caption-transcript-converter, x-twitter-keyword-and-hashtag-tweet-search, twitter-x-space-scraper, x-twitter-profile-and-post-engagement-extractor

X (Twitter) recipes for n8n

Troubleshooting

Why does the client say Unauthorized or invalid token?

Every Apify Actor tool needs a signed-in Apify account. Reconnect the server so the OAuth sign-in runs again, or switch to the token variant: an Authorization: Bearer header with an API token from Apify Console, Settings, API and integrations. For a local server the token must be in the server's own env block, not only in your shell.

Source: Apify MCP server README

Why did my agent's tool list change after an update?

Without a tools parameter Apify's server loads its default tool set, which changes between releases. The URLs on this site pin the tools with ?tools=, so the agent always gets the same Actor tool plus fetch-actor-details. Apify's README gives the same advice for production.

Source: Apify MCP server README

What happens when the agent sends input the Actor rejects?

The server answers with the Actor's input schema, so the agent can fix the arguments and call again. The fetch-actor-details tool in every scoped URL lets it read that schema before the first call.

Source: Apify MCP server README

Claude Code shows Needs authentication. Why?

The server is added but not signed in. Type /mcp in an interactive session and authenticate, or run claude mcp login with the server name. Headless runs with claude -p cannot complete OAuth, so sign in once interactively or use the --header token variant.

Source: Claude Code MCP documentation

Claude Code warns that a tool result is too large. What can I change?

Claude Code warns above 10,000 tokens of tool output and caps it at 25,000 by default (MAX_MCP_OUTPUT_TOKENS raises it). Ask the agent for fewer results per call, for example a lower result limit for the Actor.

Source: Claude Code MCP documentation

Cursor does not show the server's tools. What should I check?

Open the Output panel and pick MCP Logs to see the connection error. A deeplink install that does nothing usually means an older Cursor build; update it or paste the JSON into mcp.json by hand.

Source: Cursor MCP documentation

Questions

How do I bring public X posts into Claude?

Install the X MCP configuration in Claude and authenticate access to Apify. Choose X Keyword Search with Mention & Reply Operators for discovery, or add X Post, Reply & Profile Lookup by Link or ID for known links and handles.

Is my Apify token also an X login?

An Apify API token authorizes Apify requests rather than an X OAuth session. Recipe for Agents has not authenticated either account on your behalf.

Can Claude save images and videos from X?

Twitter (X) Media Downloader retrieves available media from public posts using post links or usernames. Twitter (X) Screenshot Generator serves a different job by saving captures of public posts and profiles.

Can I get the full text of an X Article?

X Article Announcement Post Metadata Collector covers article previews and the associated announcement post.