Skip to content

Connect the Docs MCP Fresh

The Docs MCP is a hosted MCP server for the X API documentation. Unlike XMCP, there is nothing to install or authenticate - you just add its URL to your client and your assistant can search and read the docs on the fly.

The connection

https://docs.x.com/mcp

This is a hosted endpoint. No local server, no credentials.

Available tools

ToolDescription
search_xSearch across the X documentation for relevant information, code examples, API references, and guides
get_page_xRetrieve the full content of a specific documentation page by its path

Configuration

Add the Docs MCP server to your MCP client configuration:

json
{
  "mcpServers": {
    "x-docs": {
      "url": "https://docs.x.com/mcp"
    }
  }
}

When to use it

The Docs MCP shines when you are building with the X API and want your assistant to look things up without leaving your editor:

  • "how do I paginate the recent search endpoint?"
  • "what fields can I request on a user object?"
  • "show me the auth options for creating a post"
flowchart LR
    A[You ask a docs question] --> B[Agent calls search_x]
    B --> C[Relevant pages found]
    C --> D[Agent calls get_page_x]
    D --> E[Full page content]
    E --> F[Grounded answer with citations]

Docs MCP vs XMCP

Docs MCPXMCP
PurposeRead and search documentationCall live X API endpoints
HostingHosted at docs.x.com/mcpLocal at 127.0.0.1:8000/mcp
AuthNoneOAuth 1.0a + Bearer token
Toolssearch_x, get_page_x200+ generated from OpenAPI
Setup effortAdd one URLClone, install, configure, consent

Use them together for the full experience - see Run Both Servers Together.

Verification checklist

  • [ ] x-docs server added to client config
  • [ ] Client lists search_x and get_page_x
  • [ ] A docs question returns grounded results

See also