MCP server
Ask Grok
Consult Grok through xAI's metered API with exact model selection and no fallback
Runs locallyStatus and history
- Pricing
- Open source
- Runs
- Locally
- Version
- 0.3.0
- Listing updated
- 5 days ago
About Ask Grok
Ask Grok is an open-source MCP server. It runs locally on your machine and is started by your AI client.
Install
Run in a terminal
claude mcp add ask-grok --env XAI_API_KEY='<XAI_API_KEY>' -- npx -y @ask-llm/grok-mcpAdd to claude_desktop_config.json
{
"mcpServers": {
"ask-grok": {
"command": "npx",
"args": [
"-y",
"@ask-llm/grok-mcp"
],
"env": {
"XAI_API_KEY": "<XAI_API_KEY>"
}
}
}
}Add to ~/.cursor/mcp.json
{
"mcpServers": {
"ask-grok": {
"command": "npx",
"args": [
"-y",
"@ask-llm/grok-mcp"
],
"env": {
"XAI_API_KEY": "<XAI_API_KEY>"
}
}
}
}Add to .vscode/mcp.json
{
"servers": {
"ask-grok": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@ask-llm/grok-mcp"
],
"env": {
"XAI_API_KEY": "<XAI_API_KEY>"
}
}
}
}Add to ~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"ask-grok": {
"command": "npx",
"args": [
"-y",
"@ask-llm/grok-mcp"
],
"env": {
"XAI_API_KEY": "<XAI_API_KEY>"
}
}
}
}Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"ask-grok": {
"command": "npx",
"args": [
"-y",
"@ask-llm/grok-mcp"
],
"env": {
"XAI_API_KEY": "<XAI_API_KEY>"
}
}
}
}Using several servers? Build one config file with the MCP config generator.
Configuration
XAI_API_KEYxAI API key used only for requests to https://api.x.aiRequiredASK_GROK_HARNESSExplicit harness: xai-api (default) or grok-cli; no automatic failoverASK_GROK_MODELExact selected-harness model override (API default grok-4.7; CLI default grok-4.7; no fallback)ASK_GROK_REASONING_EFFORTReasoning effort: low, medium, high, or xhigh (default: high)ASK_GROK_MAX_OUTPUT_TOKENSxAI API output-token ceiling to bound accidental spend (default: 16384)ASK_GROK_TIMEOUT_MSTimeout for xAI API requests in milliseconds (default: 600000)GMCPT_LOG_LEVELLog verbosity: debug, info, warn, error (default: warn)
Pricing
Open source
Ask Grok FAQ
Is Ask Grok free?
Yes. Ask Grok is open source, so you can use and self-host it for free.
How do I add Ask Grok to Claude Code?
Run this command in your terminal: claude mcp add ask-grok --env XAI_API_KEY='<XAI_API_KEY>' -- npx -y @ask-llm/grok-mcp
Where this comes from
- Description: from the official MCP Registry entry.
- Install steps: from the official MCP Registry entry.