To install the Grok Search MCP server, you must have Python 3.10+, uv installed, and Claude Code.
First, if you have an older version installed, remove it using:
claude mcp remove grok-search
Then, add the MCP server using the claude mcp add-json command. You must replace the placeholder environment variables with your actual credentials. The Grok API must be in an OpenAI-compatible format. Tavily configuration is optional; if omitted, web_fetch and web_map tools will be unavailable.
If you encounter SSL/certificate verification errors in enterprise or proxy environments, add the --native-tls flag to the args array in the JSON configuration.
claude mcp add-json grok-search --scope user '{
"type": "stdio",
"command": "uvx",
"args": [
"--from",
"git+https://github.com/GuDaStudio/GrokSearch@grok-with-tavily",
"grok-search"
],
"env": {
"GROK_API_URL": "https://your-api-endpoint.com/v1",
"GROK_API_KEY": "your-grok-api-key",
"TAVILY_API_KEY": "tvly-your-tavily-key",
"TAVILY_API_URL": "https://api.tavily.com"
}
}'