Appearance
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:
- Calling the API - creating posts, searching, looking up users. Solved by XMCP.
- Understanding the API - reading endpoint docs, auth guides, and code examples. Solved by the Docs MCP,
llms.txt,skill.md, and the.mdsuffix.
The two MCP servers
| Server | What it does | URL |
|---|---|---|
| XMCP | Call X API endpoints (create posts, search, look up users, etc.) | http://127.0.0.1:8000/mcp (local) |
| Docs MCP | Search and read X API documentation | https://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:
| Resource | What it contains | Best for |
|---|---|---|
llms.txt | Curated root index plus links to section indexes | Quick overview and agent entry point |
llms-full.txt | The entire documentation set as one Markdown file | Maximum context for deep reasoning |
.md suffix | Clean Markdown for any page (append .md to the URL) | One-off page retrieval |
skill.md | A capability summary - actions, inputs, constraints | Reliable, action-oriented agent use |
AGENTS.md | Explicit usage instructions for AI agents | Telling an agent how to navigate the docs |
| OpenAPI spec | The machine-readable API contract | Code 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
- New to the platform? Start with Get Developer Access.
- Ready to run XMCP? Go to Install XMCP.
- Just want docs search in your editor? See Connect the Docs MCP.
- Want the full picture of what XMCP exposes? See the Tool Catalog.
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.