Query xAI's Grok models directly from the command line.
Queries xAI's Grok models with configurable options and displays responses with usage metrics.
/plugin marketplace add mortenbrudvik/ClaudeGrokMcp/plugin install mortenbrudvik-grok-mcp@mortenbrudvik/ClaudeGrokMcpQuery xAI's Grok models directly from the command line.
/grok <query>
/grok --model <model> <query>
/grok --help
| Argument | Description |
|---|---|
<query> | The question or prompt to send to Grok |
| Flag | Short | Description |
|---|---|---|
--model | -m | Model to use (default: auto). Options: auto, fast, smartest, code, reasoning, cheap |
--temperature | -t | Sampling temperature 0-2 (default: 0.7) |
--help | -h | Show help message |
/grok What are the best practices for error handling in Go?
/grok --model fast Explain what a mutex is
/grok --model code Review this function for bugs: function add(a, b) { return a - b; }
/grok --model reasoning Think through the trade-offs of microservices vs monolith
/grok --temperature 0.2 What is the time complexity of quicksort?
| Alias | Description | Best For |
|---|---|---|
auto | Intelligent default (grok-4) | General queries |
fast | Speed optimized (grok-4-fast) | Quick responses |
smartest | Best quality (grok-4) | Complex analysis |
code | Code optimized (grok-code-fast-1) | Programming tasks |
reasoning | Extended thinking (grok-4.1-fast) | Multi-step reasoning |
cheap | Most cost-effective (grok-4-fast) | Budget-conscious |
The response includes:
grok_query tool - Programmatic access with full parametersgrok_models tool - List available models and pricingWhen the user runs /grok, execute the following:
Parse the command arguments:
--model or -m flag value (default: "auto")--temperature or -t flag value (default: 0.7)If --help or -h is provided, show the usage information above
If no query is provided, ask the user what they'd like to ask Grok
Call the grok_query tool with:
query: The user's questionmodel: The specified model (or "auto")temperature: The specified temperature (or 0.7)Present Grok's response, including the metadata (model, tokens, cost)
If the query relates to code or technical topics the user is working on, offer to compare with Claude's perspective