@un4gt/grok-search
v0.1.0
Published
Rust Grok MCP server with stdio, streamable HTTP, and legacy SSE compatibility transports
Readme
grok-search
Rust rewrite of the grok-with-tavily MCP server using the official modelcontextprotocol/rust-sdk.
Status
- 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
Verified Locally
cargo check: passedcargo test: passedcargo install --path . --root /tmp/grok-search-install: passed
The npm package name and cargo-dist metadata are in place, but the package has not been published to npm or crates.io yet.
Install
Cargo
cargo install --path .Planned release install:
cargo install grok-searchNPX
Current local wrapper:
node npm/run.jsPlanned published package name:
npx -y @un4gt/grok-searchConfiguration
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
Run
STDIO
grok-searchHTTP
grok-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/healthAgent Setup
Claude Code
Unix-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"
}
}Codex
Use npx on Unix-like systems or a direct binary path on Windows in ~/.codex/config.toml.
Gemini CLI
Add the server under mcpServers in ~/.gemini/settings.json, again preferring npx on Unix-like systems and the built binary on Windows.
Docker
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/mcpCompose:
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.
Verify
cargo check
cargo test