What the X MCP server provides

REST and MCP share the same API key, credit balance, request history, and billing.

  • search_x searches public posts, accounts, and trends.
  • get_x_user reads a public profile.
  • get_x_user_timeline fetches posts, replies, or media.
  • get_x_post reads details, threads, and retweeters.
  • get_x_user_network pages through followers and following.

Add TwitterXAPI to your MCP client

Add one remote HTTP server. Replace the placeholder with your customer key and keep the configuration private.

mcp.json
{
  "mcpServers": {
    "twitterxapi": {
      "type": "http",
      "url": "https://twitterxapi.com/api/mcp",
      "headers": { "Authorization": "Bearer tx_live_..." }
    }
  }
}

Ask the agent for public X data

Ask for the task. A capable MCP client selects the right tool and supplies its arguments.

Example prompts
Find the latest public posts from @marclou and summarize the product updates.

Read this X thread and return each claim with its post ID.

Get every follower page for @marclou and save the usernames.

Use cursors in agent workflows

Collection tools return one X page per call. Tell the agent how far to continue, or let it stop when has_more becomes false. Set a cost boundary for open ended research.

Tool text uses compact Contentful JSON. Structured results keep stable IDs and cursors for follow up calls. Raw X responses and queued exports remain on REST.

COMMON QUESTIONS

Frequently asked questions

What is MCP for Twitter or X?+

MCP lets an AI client call named tools for public X data.

Which AI agents can connect?+

Any MCP client that supports remote HTTP servers and custom Authorization headers.

Does MCP need a separate account?+

No. REST and MCP use the same customer key, balance, and request history.

TRY THE API

Make the first request today.

One key covers REST and MCP. Add credit when you need it.

Get an API key