← Back to directory
G

Grok Search MCP

Community
Integrate Grok's powerful real-time search capabilities into Claude via MCP
GitHub source repository ↗
★ 1.8k Stars Category · Other Very popular Source revision afcdbcc68822
48FMRS · D
Reliability
8/20
Security and permissions
8/20
Maintenance
10/20
Documentation
12/20
Setup experience
10/20

This project provides a dual-engine search (Grok + Tavily) with rich features and easy installation, suitable for Claude Code users. Strengths include intelligent search and automatic fallback mechanisms, but it relies on external APIs and requires key configuration.

Read the FMRS scoring method →

Grok Search MCP is an MCP server built on FastMCP with a dual-engine architecture: Grok handles AI-driven smart search, while Tavily handles high-fidelity web scraping and site mapping. Together, they provide comprehensive real-time web access for LLM clients like Claude Code and Cherry Studio.

Tools

web_search
Execute AI-powered web search via Grok API, with automatic time-context injection for time-sensitive queries.
get_sources
Retrieve all sources for a given session_id from a previous web_search call.
web_fetch
Fetch full web page content via Tavily Extract API, returning Markdown format, with automatic fallback to Firecrawl on failure.
web_map
Map website structure via Tavily Map API, discovering URLs and generating a sitemap.
get_config_info
Display configuration status, test Grok API connectivity, and return response time and available models.
switch_model
Switch the Grok model, persisting configuration to ~/.config/grok-search/config.json.
toggle_builtin_tools
One-click disable or enable Claude Code's built-in WebSearch and WebFetch tools.
search_planning
Provide a structured search planning scaffold for generating executable search plans before complex searches.

Setup

  1. Install Python 3.10+ and uv. 2. Use the claude mcp add-json command to add the MCP server, configuring environment variables (GROK_API_URL and GROK_API_KEY are required, Tavily is optional). 3. Verify installation: run claude mcp list to check connection status.
claude_desktop_config.json
{
  "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"
  }
}

Fit and risk

Best for

  • Claude Code users who need real-time search capabilities
  • Developers looking to reduce LLM hallucinations and get up-to-date information
  • Researchers needing web scraping and site mapping features

Not for

  • Users without a Grok API key (required)
  • Users who only need simple web scraping without configuring extra services
  • Privacy-sensitive users who do not want external APIs involved

Required permissions

  • Requires Grok API key and optionally Tavily API key
  • Requires network access to call external APIs
  • Can modify project-level .claude/settings.json file (for disabling built-in tools)

Risks and side effects

  • Depends on third-party services (Grok, Tavily), may incur API costs
  • Grok search may return inaccurate information; manual verification needed
  • Auto-disabling built-in tools may affect other functionality

Troubleshooting

  1. 1. Ensure GROK_API_URL and GROK_API_KEY are correctly set and the API is OpenAI-compatible.
  2. 2. If encountering SSL errors, add --native-tls to uvx arguments.
  3. 3. Use the get_config_info tool to check configuration status and test connectivity.
  4. 4. Check logs (default directory: logs) for error details.

Use cases

Get real-time web information in Claude Code, such as latest news or documentation updates.
Enable LLMs to proactively call search tools to fetch official docs, reducing hallucinations.
Fetch specific web page content and convert it to Markdown for model consumption.
Map website structure to help models understand site layout.

Supported clients

Claude DesktopFull support
Cherry StudioFull support