@saqoosha/xai-search-mcp
v0.1.0
Published
Minimal MCP server for xAI Grok web search and content fetching
Readme
@saqoosha/xai-search-mcp
Minimal MCP server for web search and content fetching via xAI's Grok API.
Tools
| Tool | Description |
|---|---|
| web_search | Search the web, returns JSON array of {title, url, description} |
| web_fetch | Fetch URL content, returns structured Markdown |
Setup
1. Get an xAI API key
Sign up at x.ai and create an API key.
2. Add to Claude Code
Add to your ~/.claude.json:
{
"mcpServers": {
"xai-search": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@saqoosha/xai-search-mcp"],
"env": {
"XAI_API_KEY": "your-api-key-here"
}
}
}
}3. Optional environment variables
| Variable | Default | Description |
|---|---|---|
| XAI_API_KEY | (required) | Your xAI API key |
| XAI_MODEL | grok-4-fast | Grok model to use (must be grok-4 family for web search) |
| XAI_API_URL | https://api.x.ai/v1 | xAI API endpoint |
License
MIT
