Appearance
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 docsThe assistant uses the Docs MCP to learn the correct parameters, then uses XMCP to execute the call with confidence.
Why this beats either alone
| Setup | Strength | Gap |
|---|---|---|
| XMCP only | Can act on X | May guess parameters or miss endpoint nuances |
| Docs MCP only | Knows how the API works | Cannot perform any action |
| Both | Reads the docs, then acts correctly | None for typical agent tasks |
Prerequisites
- XMCP installed and running - see Install XMCP
- Docs MCP added - see Connect the Docs MCP
- An allow-list configured if you want to constrain actions - see Tool Allow-Listing