Grok MCP
Call Grok's dialogue and video generation capabilities in the AI Agent through MCP.
Artificial intelligence model developed by xAI company
This is only a basic call example. See the full docs for more parameters and advanced usage.
View DocsAccess xAI's Grok model series through the OpenAI-compatible format. Supports Grok 4 flagship reasoning and Grok 3 ultra-long context—billed by Token.
Full access to the entire xAI Grok model series, covering reasoning, conversation, and visual understanding.
Grok 4 is xAI's most powerful reasoning model, delivering exceptional performance in mathematics, programming, and complex analytical tasks, with support for deep-thinking reasoning chains.
Grok 3 provides an ultra-long context window of up to 1M, enabling one-time processing of large inputs such as entire financial reports, lengthy documents, and judicial case files.
Fully compatible with the /v1/chat/completions interface. Call Grok with the OpenAI SDK without modifying your code.
Use the OpenAI SDK you already know and seamlessly switch to Grok models by simply changing the base_url.
from openai import OpenAI
client = OpenAI(
base_url="https://api.acedata.cloud/v1",
api_key="YOUR_API_KEY"
)
response = client.chat.completions.create(
model="grok-4",
messages=[
{"role": "user", "content": "解释量子计算的基本原理"}
]
)
print(response.choices[0].message.content)
From registration to completing your first Grok conversation, it only takes a few minutes.
Register and generate an API key from the console.
Choose a model such as Grok 4 or Grok 3 based on your needs.
Send requests through the OpenAI-compatible /v1/chat/completions.
Covering a wide range of use cases, from everyday conversations to professional research.
Grok 4 excels in programming benchmarks, efficiently generating and debugging code.
Handle complex data analysis tasks and generate insight reports and visualization recommendations.
Build customer service systems with Grok 3 to quickly respond to customer questions.
Text-based creative work such as article writing, translation, summarization, and advertising copy.
Complex reasoning, literature analysis, mathematical proofs, and scientific exploration.
From ultra-fast reasoning to flagship reasoning, choose the model that suits you best
A new-generation flagship reasoning model that supports long context, visual understanding, and tool calling.
A mature high-performance model suitable for general reasoning, programming, and content tasks.
Pay by Token usage, with no subscription fees or hidden charges.
Bulk packages offer additional discounts
Billed based on actual Token usage, with separate pricing for input and output
Dedicated solutions for high-volume teams
Common questions about using the Grok API
Grok 4 is xAI's flagship reasoning model, delivering the best performance on complex tasks. Grok 3 is the previous-generation flagship, with an ultra-long context window of up to 1M, making it suitable for long-document analysis and more cost-effective. The choice depends on whether you prioritize reasoning capability or context length and cost.
Ace Data Cloud provides a unified OpenAI-compatible interface, with no need to register an xAI account or configure a separate API key. Use the same API Key to access models from Grok, Claude, GPT, Gemini, and more.
Yes. The Grok API is fully compatible with OpenAI's /v1/chat/completions format; simply change the base_url and model parameters. OpenAI SDKs for Python, Node.js, Go, and other languages are supported.
Yes. Set stream: true to receive token-by-token SSE streaming output, suitable for real-time conversations and frontend display scenarios.
Ace Data Cloud offers a variety of large language model APIs
Access the full xAI Grok model lineup through an OpenAI-compatible interface and empower your AI applications.
Grok Chat Completion API, compatible with the official API format.
Grok video generation API — create a Grok Imagine video from a text prompt and an input image.
Grok task query API — retrieve the result of a Grok video generation task by its ID.
We offer various credit packages. The more you purchase, the higher the discount you receive.
up to46% OFFCall Grok's dialogue and video generation capabilities in the AI Agent through MCP.
Configuration Method
Connect the current service in Claude Code:
mcpServers service entry below into .mcp.json in the project root directory, retaining the existing configuration.ACEDATACLOUD_API_TOKEN in the terminal: use export ACEDATACLOUD_API_TOKEN='YOUR_API_TOKEN' on macOS/Linux, and $env:ACEDATACLOUD_API_TOKEN = 'YOUR_API_TOKEN' in Windows PowerShell; replace YOUR_API_TOKEN with your AceDataCloud API Token.claude in the same terminal where this variable has been set; new terminals or desktop-launched clients must also be able to read this variable./mcp to confirm that the service is connected and the tools have been loaded; when using the project configuration for the first time, check and approve the service as prompted.export ACEDATACLOUD_API_TOKEN='YOUR_API_TOKEN'
claude mcp add --scope user --transport http 'grok-mcp' 'https://grok.mcp.acedata.cloud/mcp' --header 'Authorization: Bearer ${ACEDATACLOUD_API_TOKEN}'
Provide model selection, parameter rules, and calling considerations for Grok dialogue and video capabilities for AI Agents.
Install the current Skill to Claude Code. Project-level configurations are shared across the repository, while user-level configurations apply to all projects on this machine.
npx skills add acedatacloud/skills --skill 'ai-chat' -a 'claude-code' --yes