Rust rewrite of the grok-with-tavily MCP server using the official modelcontextprotocol/rust-sdk.
- Transport:
stdio: implemented and intended as the default for Claude Code, Codex, and Gemini CLIstreamable HTTPat/mcp: implemented- legacy SSE compatibility paths
/sseand/messages: implemented for older MCP SSE clients
- Tools:
- implemented:
web_search,get_sources,web_fetch,web_map,get_config_info,switch_model,toggle_builtin_tools, allplan_*tools
- implemented:
- Migration:
~/.config/grok-search/config.jsonis preservedGUDA_*is still accepted as a deprecated runtime fallback, but is no longer documented
cargo check: passedcargo test: passedcargo install --path . --root /tmp/grok-search-install: passed
GitHub Releases are generated by cargo-dist. npm, crates.io, and Docker publishing are handled by separate workflows.
cargo install --path .Planned release install:
cargo install grok-searchPublished package:
npx -y @un4gt/grok-searchThe npm package now uses platform-specific packages that embed native binaries, instead of downloading release artifacts at install time.
Required:
GROK_API_URLGROK_API_KEY
Optional:
GROK_MODELTAVILY_ENABLEDTAVILY_API_URLTAVILY_API_KEYFIRECRAWL_API_URLFIRECRAWL_API_KEYGROK_DEBUGGROK_LOG_LEVELGROK_LOG_DIRGROK_RETRY_MAX_ATTEMPTSGROK_RETRY_MULTIPLIERGROK_RETRY_MAX_WAIT
grok-searchgrok-search http --bind 127.0.0.1:8000The MCP endpoint is http://127.0.0.1:8000/mcp.
Health probe:
curl http://127.0.0.1:8000/healthUnix-like systems:
{
"type": "stdio",
"command": "npx",
"args": ["-y", "@un4gt/grok-search"],
"env": {
"GROK_API_URL": "https://your-api-endpoint.com/v1",
"GROK_API_KEY": "your-grok-api-key"
}
}Native Windows:
{
"type": "stdio",
"command": "cmd",
"args": ["/c", "npx", "-y", "@un4gt/grok-search"],
"env": {
"GROK_API_URL": "https://your-api-endpoint.com/v1",
"GROK_API_KEY": "your-grok-api-key"
}
}Use npx on Unix-like systems or a direct binary path on Windows in ~/.codex/config.toml.
Add the server under mcpServers in ~/.gemini/settings.json, again preferring npx on Unix-like systems and the built binary on Windows.
Build:
docker build -t grok-search:local .Run as a remote MCP server over streamable HTTP:
docker run --rm -p 8000:8000 \
-e GROK_API_URL=https://your-api-endpoint.com/v1 \
-e GROK_API_KEY=your-grok-api-key \
grok-search:localThen connect clients to:
http://127.0.0.1:8000/mcp
Compose:
docker compose up --buildFor local same-machine agent integration, Docker can also be used with stdio, but that requires docker run -i and is less ergonomic than running the native binary directly.
cargo check
cargo test