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 |
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 | |
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/BasisSetVentures/grok-cli-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server