Skip to content

Overview Fresh

This site is a self-contained reference for connecting AI tools to the X Developer Platform using the Model Context Protocol (MCP) and the platform's agent-ready documentation formats.

There are two distinct problems an AI agent faces when working with X, and the platform ships a tool for each:

  1. Calling the API - creating posts, searching, looking up users. Solved by XMCP.
  2. Understanding the API - reading endpoint docs, auth guides, and code examples. Solved by the Docs MCP, llms.txt, skill.md, and the .md suffix.

The two MCP servers

ServerWhat it doesURL
XMCPCall X API endpoints (create posts, search, look up users, etc.)http://127.0.0.1:8000/mcp (local)
Docs MCPSearch and read X API documentationhttps://docs.x.com/mcp (hosted)

XMCP loads the X API OpenAPI specification at startup and converts every operation into an MCP tool. The Docs MCP exposes two tools, search_x and get_page_x, against the documentation itself.

How the pieces fit together

flowchart TD
    Agent[AI Agent / MCP Client
Cursor, Windsurf, Claude, custom] --> XMCP[XMCP
local server] Agent --> Docs[Docs MCP
hosted server] XMCP -->|OAuth 1.0a / Bearer| API[(X API v2)] XMCP -->|loads at startup| Spec[OpenAPI spec
api.x.com/2/openapi.json] Docs -->|search_x / get_page_x| DocsContent[(X Documentation)] Agent -.->|ingest as context| LLMS[llms.txt / llms-full.txt
skill.md / AGENTS.md]

The agent documentation toolchain

Beyond MCP, the platform exposes several machine-readable formats so any LLM tool can consume the docs reliably:

ResourceWhat it containsBest for
llms.txtCurated root index plus links to section indexesQuick overview and agent entry point
llms-full.txtThe entire documentation set as one Markdown fileMaximum context for deep reasoning
.md suffixClean Markdown for any page (append .md to the URL)One-off page retrieval
skill.mdA capability summary - actions, inputs, constraintsReliable, action-oriented agent use
AGENTS.mdExplicit usage instructions for AI agentsTelling an agent how to navigate the docs
OpenAPI specThe machine-readable API contractCode generation and tooling (also what XMCP loads)

What you can build

Once an agent is wired to XMCP, it can interact with X in natural language: "search for recent posts about AI", "look up @XDevelopers", or "create a post". Add the Docs MCP and it can also answer "how do I paginate the search endpoint?" by reading the docs live.

Where to go next

Self-contained reference

Every page here is locally hosted Markdown. Technical URLs (API endpoints, repository paths, config values) are preserved as literal command and configuration text, but there are no outbound documentation links to chase.