Consult Grok through xAI's metered API with exact model selection and no fallback
registry version 0.3.0
npm
npx -y @ask-llm/grok-mcpnpm
npx -y @ask-llm/grok-mcp@0.3.0
Pick your client — the config below is generated for this server (local stdio). Copy respects the “Pin version” switch above.
claude_desktop_config.json
{
"mcpServers": {
"ask-grok": {
"command": "npx",
"args": [
"-y",
"@ask-llm/grok-mcp"
],
"env": {
"XAI_API_KEY": "<YOUR_XAI_API_KEY>"
}
}
}
}{
"mcpServers": {
"ask-grok": {
"command": "npx",
"args": [
"-y",
"@ask-llm/grok-mcp@0.3.0"
],
"env": {
"XAI_API_KEY": "<YOUR_XAI_API_KEY>"
}
}
}
}Format verified against the official Claude Desktop docs ↗.
terminal
claude mcp add --env XAI_API_KEY=<YOUR_XAI_API_KEY> ask-grok -- npx -y @ask-llm/grok-mcp
claude mcp add --env XAI_API_KEY=<YOUR_XAI_API_KEY> ask-grok -- npx -y @ask-llm/grok-mcp@0.3.0
Format verified against the official Claude Code docs ↗.
.cursor/mcp.json
{
"mcpServers": {
"ask-grok": {
"command": "npx",
"args": [
"-y",
"@ask-llm/grok-mcp"
],
"env": {
"XAI_API_KEY": "<YOUR_XAI_API_KEY>"
}
}
}
}{
"mcpServers": {
"ask-grok": {
"command": "npx",
"args": [
"-y",
"@ask-llm/grok-mcp@0.3.0"
],
"env": {
"XAI_API_KEY": "<YOUR_XAI_API_KEY>"
}
}
}
}Format verified against the official Cursor docs ↗.
.vscode/mcp.json
{
"servers": {
"ask-grok": {
"command": "npx",
"args": [
"-y",
"@ask-llm/grok-mcp"
],
"env": {
"XAI_API_KEY": "<YOUR_XAI_API_KEY>"
}
}
}
}{
"servers": {
"ask-grok": {
"command": "npx",
"args": [
"-y",
"@ask-llm/grok-mcp@0.3.0"
],
"env": {
"XAI_API_KEY": "<YOUR_XAI_API_KEY>"
}
}
}
}Format verified against the official VS Code docs ↗.
mcp_config.json
{
"mcpServers": {
"ask-grok": {
"command": "npx",
"args": [
"-y",
"@ask-llm/grok-mcp"
],
"env": {
"XAI_API_KEY": "<YOUR_XAI_API_KEY>"
}
}
}
}{
"mcpServers": {
"ask-grok": {
"command": "npx",
"args": [
"-y",
"@ask-llm/grok-mcp@0.3.0"
],
"env": {
"XAI_API_KEY": "<YOUR_XAI_API_KEY>"
}
}
}
}Format verified against the official Windsurf docs ↗.
Defined in the server's official registry manifest. Required secrets are shown as <YOUR_…> placeholders in the configs above.
XAI_API_KEY required secret — xAI API key used only for requests to https://api.x.aiASK_GROK_HARNESS — Explicit harness: xai-api (default) or grok-cli; no automatic failoverASK_GROK_MODEL — Exact selected-harness model override (API default grok-4.7; CLI default grok-4.7; no fallback)ASK_GROK_REASONING_EFFORT — Reasoning effort: low, medium, high, or xhigh (default: high)ASK_GROK_MAX_OUTPUT_TOKENS — xAI API output-token ceiling to bound accidental spend (default: 16384)ASK_GROK_TIMEOUT_MS — Timeout for xAI API requests in milliseconds (default: 600000)GMCPT_LOG_LEVEL — Log verbosity: debug, info, warn, error (default: warn)⭐ 18 stars · 最近更新于 29 天前 · MIT license
These star and push figures are for the shared repository — 6 listings on this site point at the same repository.
Ask LLM Second opinions for coding agents. Get a second opinion on your code or plan, inside your coding assistant, using the model subscriptions you already have. For individual developers and small teams who already use a coding assistant and pay for another model subscription: ask a different ven…
Summary from the project README — github.com/Lykhoyda/ask-llm
Distributed as npm, listed under Developer Tools. Review our MCP security guide before granting access to real data.
Ask LLM Second opinions for coding agents. Get a second opinion on your code or plan, inside your coding assistant, using the model subscriptions you already have. For individual developers and small teams who already use a coding assistant and pay for another model subscription: ask a different ven
Run the install command shown above, then paste the config for your client (Claude Desktop, Claude Code, Cursor, VS Code or Windsurf) into its MCP settings and restart the client.
The MCP server itself is free to install. The source is public on https://github.com/Lykhoyda/ask-llm. Any third-party service it calls may require its own API key and account.
Any MCP-compatible client can use it, including Claude Desktop, Claude Code, Cursor, VS Code, Windsurf and custom agents.
Publish this server? Link back with a badge on your README or site — copy either snippet.
Markdown
[](https://mcpnav.net/server/ask-grok/)
HTML
<a href="https://mcpnav.net/server/ask-grok/"><img src="https://mcpnav.net/badge/ask-grok.svg" alt="Listed on MCPNav" height="20"></a>