Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@X Search MCPsearch for AI news from @OpenAI and @GoogleAI in the last week"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
x-search-mcp
Minimal MCP server for xAI X search using the Responses API and structured outputs.
Features
Single MCP tool:
x_searchUses xAI Responses API with
x_searchtool callingStructured output parsing + citation normalization
Requirements
Node.js >= 18
XAI_API_KEYenvironment variable
MCP client config
Add the following config to your MCP client:
Local development
Smoke test (optional)
Note: this test requires network access and may fail in restricted environments.
MCP Tool
x_search
Searches X with optional filters.
Input
Output
Environment Variables
XAI_API_KEY(required)XAI_MODEL(default:grok-4-1-fast)XAI_BASE_URL(default:https://api.x.ai/v1)XAI_TIMEOUT(default:30000)
Notes
allowed_x_handlesandexcluded_x_handlesare mutually exclusive.Date filters must be
YYYY-MM-DDandfrom_datemust be <=to_date.Tool responses are returned as MCP
structuredContent(with a text fallback for display).Citations are normalized from xAI response annotations when available.