Grok CLI MCP Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| GROK_API_KEY | Yes | Your Grok API key from X.AI console (required by the server) | |
| GROK_CLI_PATH | No | Path to Grok CLI binary (optional, defaults to /opt/homebrew/bin/grok) | /opt/homebrew/bin/grok |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Server capabilities have not been inspected yet.
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| grok_queryB | Send a single prompt to Grok via CLI headless mode. Returns the assistant's text. Use raw_output=true to get raw CLI output and parsed messages. |
| grok_chatB | Send a list of role/content messages to Grok by flattening into a single prompt. Useful for multi-turn context when the CLI only supports a single '-p' prompt. |
| grok_codeB | Ask Grok for code or code-related guidance. You can provide a language hint and context (e.g., file snippets or requirements). Returns assistant text by default. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 3 tools
The tools have distinct primary purposes: grok_chat handles multi-turn conversations by flattening messages, grok_code focuses on code-related queries with language hints, and grok_query is for single-prompt interactions with raw output options. However, grok_chat and grok_query both involve sending prompts to Grok, which could cause minor confusion about when to use each for simple queries.
All tool names follow a consistent 'grok_' prefix pattern with descriptive suffixes (chat, code, query), using snake_case uniformly. This makes the tools easily identifiable and predictable within the server's domain.
With 3 tools, the count is reasonable for a CLI server focused on interacting with Grok, covering chat, code, and general query use cases. It is slightly lean but not insufficient, as each tool addresses a specific aspect of the Grok interface.
The tools cover core functionalities for querying Grok (chat, code, general queries), but there are notable gaps such as missing operations for managing sessions, handling file uploads, or configuring settings, which might limit advanced workflows in a CLI context.