Skip to content
X (Twitter)

X (Twitter)MCP Server

by X
Released

Summary

X's own hosted MCP server: full-archive post search, user and timeline lookup, trends, bookmarks and article drafting, under your account's permissions.

Features

  • Hosted by X — no self-hosted bridge to maintain
  • Full-archive search across posts, users and news
  • Post lookup with engagement metrics; user profiles and timelines
  • Location-based news and trends
  • Bookmark management and article drafting
  • OAuth 2.0 PKCE for user context, or app-only bearer for read-only
  • Separate no-auth docs server with search_x and get_page_x

Installation

Set up this MCP server in your favorite AI agent — copy a ready-made configuration below.

Any MCP-compatible agent

Most agents (Claude, Cursor, Windsurf, VS Code, and more) read a standard mcpServers configuration.

  1. Open your agent's MCP configuration file.
  2. Merge the snippet below into it, filling in the environment variables with your own values.
  3. Restart the agent — the "X (Twitter)" tools will be available.
{
  "mcpServers": {
    "x-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@xdevplatform/xurl",
        "mcp",
        "https://api.x.com/mcp"
      ],
      "env": {
        "CLIENT_ID": "YOUR_X_APP_CLIENT_ID",
        "CLIENT_SECRET": "YOUR_X_APP_CLIENT_SECRET"
      }
    }
  }
}

Description

X runs its own hosted MCP server at https://api.x.com/mcp, so an agent can reach the X API without you standing up a bridge, minting long-lived tokens by hand, or maintaining a community wrapper that breaks on the next API change. X hosts it and handles the authentication.

What it exposes

The server covers the X API surface an assistant actually wants: fetching posts and their engagement metrics, full-archive search across posts, users and news, user profile and timeline lookup, location-based news and trends, bookmark listing and organisation, and drafting and publishing articles.

Two ways to authenticate, and they are not equivalent

With full user context — OAuth 2.0 PKCE through the xurl bridge, which performs the login and refreshes tokens automatically — the agent acts under your own account's permissions. With a static app-only bearer token connecting straight over HTTP there is no token refresh and no user context, which in practice means read-only. Pick deliberately: the difference decides whether an agent can act on your account or only observe.

Transport is streamable HTTP against MCP protocol revision 2025-06-18. Set your client's startup timeout to at least 300 seconds, because the first run has to complete an interactive OAuth login.

A second, simpler server

X also hosts a documentation server at https://docs.x.com/mcp that needs no authentication at all. It exposes two tools — search_x to query the guides and API reference, and get_page_x to pull a full page by path — which is the quickest way to stop an agent guessing at X API parameters.

Both servers are free to use; the usual X API access tiers still govern what the underlying endpoints will return.

Related MCP Servers

MCP: Hugging Face

by Hugging Face

Featured

Official Hugging Face MCP server: search models, datasets, Spaces and papers on the Hub, read repository files, and call Gradio apps as agent tools.

Featured

Apify's official MCP server — turn thousands of ready-made scrapers into tools your assistant can call.

MCP: Browserbase

by Browserbase

Featured

Browserbase's official MCP server — cloud browser automation with Stagehand's natural-language actions.

1 views
Browse all MCP servers →