Skip to main content

Enhanced Search with Grok AI

A robust MCP server providing web search, news search, and Twitter/X search through xAI’s Grok API with comprehensive analysis capabilities including timelines, direct quotes, and multiple perspectives.

Quick Start

Get up and running with Grok Search MCP Server in minutes

1

Get your xAI API key

Visit the xAI Developer Portal to create an account and generate your API key.
# Your API key will start with "xai-"
export XAI_API_KEY="xai-your-api-key-here"
2

Install the MCP server

Clone and install the server globally using npm:
git clone https://github.com/stat-guy/grok-search-mcp.git
cd grok-search-mcp
npm install -g .
3

Configure Claude Desktop

Add the server to your Claude Desktop configuration file:macOS: ~/Library/Application Support/Claude/claude_desktop_config.jsonWindows: %APPDATA%/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "grok-search": {
      "command": "npx",
      "args": ["grok-search-mcp"],
      "env": {
        "XAI_API_KEY": "your-api-key-here"
      }
    }
  }
}
4

Restart Claude Desktop

Completely quit and restart Claude Desktop. The Grok Search tools will now be available for use.
Use the health_check tool to verify your setup is working correctly.

Explore by Topic

Dive into specific features and capabilities

Analysis Modes

Learn about basic and comprehensive analysis modes for different use cases

Search Types

Explore web, news, and Twitter/X search capabilities

Configuration

Configure environment variables, timeouts, and retry settings

Error Handling

Understand retry logic, error responses, and troubleshooting

Key Features

Everything you need for powerful AI-driven search

Multiple Search Types

Search across web content, news articles, and Twitter/X posts with a unified API

Comprehensive Analysis

Get timelines, direct quotes, multiple perspectives, and detailed context

Date Range Filtering

Filter search results by specific date ranges for time-sensitive queries

Automatic Retry Logic

Exponential backoff retry for transient failures ensures reliable operation

Intelligent Caching

Cache comprehensive analyses for 30 minutes to reduce API costs

Health Monitoring

Built-in health checks and performance metrics for monitoring server status

API Tools

Five powerful tools for comprehensive search capabilities

grok_search

Universal search with configurable types and analysis modes

grok_web_search

Search general web content with comprehensive analysis

grok_news_search

Search news with timeline analysis and context

grok_twitter

Search Twitter/X posts with sentiment analysis

health_check

Monitor server health and API connectivity

Ready to get started?

Install the Grok Search MCP Server and start leveraging powerful AI-driven search capabilities in your Claude Desktop workflows.

Install Now

Build docs developers (and LLMs) love