Skip to content

Run Both Servers Together Fresh

You can connect both MCP servers simultaneously. This gives your AI assistant the ability to both look up documentation and call the API - the most capable setup.

The combined configuration

json
{
  "mcpServers": {
    "xmcp": {
      "url": "http://127.0.0.1:8000/mcp"
    },
    "x-docs": {
      "url": "https://docs.x.com/mcp"
    }
  }
}
  • xmcp - your local server with 200+ X API tools (requires it to be running)
  • x-docs - the hosted documentation search server (no setup beyond the URL)

How a request flows

sequenceDiagram
    participant U as You
    participant A as AI Assistant
    participant D as Docs MCP
    participant X as XMCP
    participant API as X API
    U->>A: "Find the right way to search posts, then run it"
    A->>D: search_x("recent search query syntax")
    D-->>A: Docs on query operators + params
    A->>D: get_page_x(search introduction)
    D-->>A: Full page content
    A->>X: searchPostsRecent(query="from:xdevelopers")
    X->>API: GET /2/tweets/search/recent
    API-->>X: Matching posts
    X-->>A: Results
    A-->>U: Summary grounded in the docs

The assistant uses the Docs MCP to learn the correct parameters, then uses XMCP to execute the call with confidence.

Why this beats either alone

SetupStrengthGap
XMCP onlyCan act on XMay guess parameters or miss endpoint nuances
Docs MCP onlyKnows how the API worksCannot perform any action
BothReads the docs, then acts correctlyNone for typical agent tasks

Prerequisites

See also