x-search
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-searchsearch X for recent posts about the new Grok release"
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
A thin stdio MCP wrapper around xAI's server-side x_search tool.
The server reads its upstream configuration from environment variables and forwards each search call to an OpenAI/xAI Responses-compatible endpoint. It is designed to work with both the official xAI endpoint and middleware such as CLIProxyAPI that implements the same Responses + x_search protocol.
MCP interface
Server name:
x-searchTransport: stdio
Tool:
search
Tool arguments:
Field | Required | Default | Notes |
| yes | — | Search request for Grok |
| no | omitted | Max 20; mutually exclusive with |
| no | omitted | Max 20; mutually exclusive with |
| no | omitted | Inclusive |
| no | omitted | Inclusive |
| no |
| Passed to native |
| no |
| Passed to native |
The handle-filter state is one of three choices: no filter (default), an allow-list, or an exclude-list. Supplying both lists is rejected.
Related MCP server: X Search MCP Server
Environment
The MCP client provides exactly three upstream settings to the spawned process:
XAI_BASE_URL— for examplehttps://api.x.ai/v1or an OpenAI/xAI-compatible middleware base URL ending in/v1XAI_MODEL— for examplegrok-4.6XAI_API_KEY— bearer credential accepted by the configured upstream
The implementation only uses the Responses API. It sends one native x_search tool and forces tool use with tool_choice: "required".
Install / run
For clients that support stdio MCP servers, run directly from GitHub:
npx -y github:sandlong/x-search-mcpand provide the three variables in that MCP server's env configuration. For example:
{
"command": "npx",
"args": ["-y", "github:sandlong/x-search-mcp"],
"env": {
"XAI_BASE_URL": "https://api.x.ai/v1",
"XAI_MODEL": "grok-4.6",
"XAI_API_KEY": "..."
}
}Development
npm install
npm run typecheck
npm test
npm run buildBehavior
No Chat Completions compatibility layer.
No result rewriting or citation cleanup; xAI/middleware output text is returned as received.
Non-2xx upstream response bodies are returned to the MCP client verbatim.
No HTTP server, database, or persistent state.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceLive X (Twitter) and web search for any coding agent through your existing Grok subscription. Exposes a grok_search MCP tool, so no X API key or X developer account is needed.3125Apache 2.0
- AlicenseNot gradedqualityDmaintenanceEnables searching X (Twitter) posts, discussions, trends, and web content via Grok API using natural language.231MIT
- AlicenseAqualityBmaintenanceMCP server for live X/Twitter and web search, driven by your locally logged-in Grok CLI and leveraging your X Premium or SuperGrok subscription quota.31MIT
- AlicenseCqualityCmaintenanceEnables Claude or any MCP client to call Grok (xAI) for answers via a simple, phone-first tool.1Apache 2.0
Related MCP Connectors
Agentic search over your Dewey document collections from any MCP-compatible client.
Serper MCP — wraps the Serper Google Search API (serper.dev)
x402-gated web search gateway. Tools: search, search_enriched.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/sandlong/x-search-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server