Connectors · AI
xAI Grok API MCP server for AI agents.
actionlake is an MCP gateway: one remote MCP server that connects Claude and other MCP clients to xAI Grok API and the rest of your systems. It gives your agent 47 xAI Grok API actions (26 reads, 16 writes and 5 that wait for a confirmation) and holds the xAI Grok API credential itself, so the agent never does. It paces xAI Grok API's limits and records every call.
100,000 free calls a month. No card, no email, no password: press Start a free sandbox on the next screen and keep the key it shows you.
claude mcp add --transport http actionlake https://connect.actionlake.com/mcpdo { action: "xai.files.list", intent: "check which xAI Grok API account is connected"}# List files · read · 1 upstream call- 47actionsin one signed file
- 26readlook, never change
- 16writecreate and update
- 5wait for a yesdestructive, confirmed first
Set up
Connect xAI Grok API in three steps.
- 01
Add actionlake to Claude.
Run the command once in Claude Code; its consent page can create a free sandbox: 100,000 calls a month, no card. In the Claude app, add a custom connector with the URL below and paste your key on the consent page. Creating a new sandbox from the Claude app is not yet tested by us.
https://connect.actionlake.com/mcp - 02
Connect xAI Grok API.
Bearer token. No consent screen: your agent can connect it for you, but the key then passes through your chat. To keep it out of the model's context, paste it in the console instead. actionlake stores what you paste write-only, sealed under your tenant's key.
api_keyxAI API key (console.x.ai > API Keys, starts with `xai-`)
account { op: "connections.requirements", service: "xai" } # free: exactly what to paste, and what is found for you - 03
Make the first call. Check before a write.
Ask in plain words; Claude picks the action. Before anything changes,
checkvalidates the call and prices it, for free.do { action: "xai.files.list" }# list files · read · 1 upstream callcheck { action: "xai.batches.create", input: { … } }# free: inputs, permissions, cost and confirmations, nothing sent
xAI Grok API at a glance
- Sign-in
- Bearer token. No consent screen: your agent can connect it for you, but the key then passes through your chat. To keep it out of the model's context, paste it in the console instead.
- You provide
api_key- Limits we pace to
- 480 calls a minute, per connection
- API covered
- XAI REST API 1.0.0 (OpenAPI 3.1.0) plus the documented Batches endpoints
api.x.ai - Service file
- Version 1.0.0, signed (Ed25519)
- Cached reads
- 23 of 26 reads, for up to 5 minutes; a write clears what it affects
- Shared entities
- 1, so ask can line xAI Grok API up with your other systems
- Data
- Processed and stored in Sydney, Australia. No US region yet
Capabilities
What an AI agent can do in xAI Grok API.
47 actions in 22 areas. Every one carries its effect, so a key can allow the reads and hold the rest.
- 26readlook, never change
- 16writecreate and update
- 5destructivewait for a confirmation
Files
52 read · 1 write · 2 destructive
List files · Get file metadata · Delete a file · Create a public URL for a file
Responses
52 read · 2 write · 1 destructive
Create a model response · Compact a conversation into a shorter context · List a response's input items · Get a stored response
Batches
42 read · 1 write · 1 destructive
List batches · Create a batch · Get a batch · Cancel a batch
Videos
41 read · 3 write · 0 destructive
Edit a video · Extend a video · Generate a video · Get a video generation result
Images
31 read · 2 write · 0 destructive
Edit images · Generate images · Get a deferred image generation result
Skills
32 read · 0 write · 1 destructive
List skills · Get a skill · Delete a skill
Batch requests
21 read · 1 write · 0 destructive
Add requests to a batch · List the requests in a batch
Chat completions
21 read · 1 write · 0 destructive
Create a chat completion · Get a deferred chat completion
14 more areas · 19 actions
- Embedding models 2
- Image generation models 2
- Language models 2
- Models 2
- Video generation models 2
- API key 1
- Batch results 1
- Completions 1
- Documents 1
- Embeddings 1
- Legacy complete 1
- Me 1
- Messages 1
- Tokenize 1
Top actions
The xAI Grok API API, shaped for agents.
The ids your agent types, what each does, and the one name it shares with other systems. 11 of xAI Grok API's 11 action names are shared with at least one other connector, so an agent learns them once.
| Action | What it does | Effect | Same name in |
|---|---|---|---|
xai.files.listList files | List files. | read | content.file.list77 connectors |
xai.batches.listList batches | List batches. | read | automation.background_job.list34 connectors |
xai.batches.createCreate a batch | Create a batch. | write | automation.background_job.create29 connectors |
xai.files.getGet file metadata | Get file metadata. | read | content.file.get74 connectors |
xai.files.deleteDelete a file | Delete a file. | destructive | content.file.delete68 connectors |
xai.me.getGet the authenticated identity | Get the authenticated identity. | read | identity.current_user.get307 connectors |
xai.messages.createCreate a message (Anthropic-compatible) | Create a message (Anthropic-compatible). | write | analytics.inference.create17 connectors |
xai.responses.createCreate a model response | Create a model response. | write | analytics.inference.create17 connectors |
xai.api_key.getGet the current API key | Get the current API key. | read | identity.api_key.get66 connectors |
xai.models.getGet a model | Get a model. | read | infra.ml_model.get13 connectors |
xai.images.editEdit images | Edit images. | write | this connector |
xai.images.generateGenerate images | Generate images. | write | this connector |
Try it
Prompts to paste into Claude.
Each one names the xAI Grok API actions it will call, so you know what it reads and what it changes before you send it.
- Readread
Which xAI Grok API files changed this week, and who changed them?
calls
xai.files.list - Writewrite
Create a batch in xAI Grok API. Show me exactly what you will send before you save it.
calls
xai.batches.create
Governance for xAI Grok API
Destructive actions wait for a yes.
5 xAI Grok API actions are destructive. These are all of them:
- Delete a file
xai.files.delete - Cancel a batch
xai.batches.cancel - Delete a stored response
xai.responses.delete - Revoke a file's public URL
xai.files.revoke_public_url - Delete a skill
xai.skills.delete
A destructive action runs only with confirm: true. Under the human policy the agent cannot confirm for itself: the run stops until a named person approves, in the console or from a signed link in an email. The cap on a key is refused before the call is sent, never after.
Delete a file?
intent: the user asked me to delete a file
account { op: "keys.create", name: "xai-agent", allowed_actions: ["xai.*"], cap_calls: 2000, confirm_policy: "human_for_writes", approval_rules: [ { match: "xai.files.delete", approver: "[email protected]" }, { match: "xai.batches.cancel", approver: "[email protected]" }, { match: "xai.responses.delete", approver: "[email protected]" } ]}Cost
What xAI Grok API costs on actionlake.
Every xAI Grok API action is one upstream call, the only thing actionlake bills. Searching, check, cost, account and any call xAI Grok API refused with 401, 403, 429 or a 5xx are free. Paid plans start at US$49 a month for 250,000 calls, with overage from US$0.30 down to US$0.18 per 1,000.
- 1upstream call per actionall 47 xAI Grok API actions
- 47actions pageeach page of a long list is one call
- 23reads can be cacheda cache hit costs nothing
- 100,000calls a month, freepaid plans from US$49 a month for 250,000
Action index
Every xAI Grok API action.
47 actions by area: the id your agent calls, what it does, and its effect.
Files5
xai.files.create_public_urlCreate a public URL for a filewritexai.files.deleteDelete a filedestructivexai.files.getGet file metadatareadxai.files.listList filesreadxai.files.revoke_public_urlRevoke a file's public URLdestructive
Responses5
xai.responses.compactCompact a conversation into a shorter contextwritexai.responses.createCreate a model responsewritexai.responses.deleteDelete a stored responsedestructivexai.responses.getGet a stored responsereadxai.responses.list_input_itemsList a response's input itemsread
Batches4
xai.batches.cancelCancel a batchdestructivexai.batches.createCreate a batchwritexai.batches.getGet a batchreadxai.batches.listList batchesread
Videos4
xai.videos.editEdit a videowritexai.videos.extendExtend a videowritexai.videos.generateGenerate a videowritexai.videos.getGet a video generation resultread
Images3
xai.images.editEdit imageswritexai.images.generateGenerate imageswritexai.images.get_deferredGet a deferred image generation resultread
Skills3
xai.skills.deleteDelete a skilldestructivexai.skills.getGet a skillreadxai.skills.listList skillsread
Batch requests2
xai.batch_requests.addAdd requests to a batchwritexai.batch_requests.listList the requests in a batchread
Chat completions2
xai.chat_completions.createCreate a chat completionwritexai.chat_completions.get_deferredGet a deferred chat completionread
Embedding models2
xai.embedding_models.getGet an embedding modelreadxai.embedding_models.listList embedding modelsread
Image generation models2
xai.image_generation_models.getGet an image generation modelreadxai.image_generation_models.listList image generation modelsread
Language models2
xai.language_models.getGet a language modelreadxai.language_models.listList language models with pricingread
Models2
xai.models.getGet a modelreadxai.models.listList modelsread
Video generation models2
xai.video_generation_models.getGet a video generation modelreadxai.video_generation_models.listList video generation modelsread
API key1
xai.api_key.getGet the current API keyread
Batch results1
xai.batch_results.listList a batch's resultsread
Completions1
xai.completions.createCreate a text completion (OpenAI-compatible legacy)write
Documents1
xai.documents.searchSearch documents in collectionsread
Embeddings1
xai.embeddings.createCreate embeddingswrite
Legacy complete1
xai.legacy_complete.createCreate a text completion (Anthropic-compatible legacy)write
Me1
xai.me.getGet the authenticated identityread
Messages1
xai.messages.createCreate a message (Anthropic-compatible)write
Tokenize1
xai.tokenize.createTokenize textwrite
Questions
The xAI Grok API MCP server, answered.
Is there a xAI Grok API MCP server for Claude?
Yes. actionlake is an MCP gateway: a remote MCP server that gives Claude, or another MCP client, 47 xAI Grok API actions across files, responses, batches and videos, through the same eight tools it uses for every other connector. actionlake is independent; it is not made or endorsed by xAI Grok API.
What do I need to connect xAI Grok API?
XAI API key (console.x.ai > API Keys, starts with `xai-`). The free call account { op: "connections.requirements", service: "xai" } lists exactly what to paste.
Can an AI agent delete or change things in xAI Grok API?
Only if its key allows it, and only with an explicit confirmation. 5 xAI Grok API actions are destructive, including delete a file, cancel a batch and delete a stored response. Each runs only with confirm: true. Under the human confirm policy, or an approval rule on the key, the run waits until a named person approves it.
Will an AI agent use up my xAI Grok API API limit?
actionlake paces every call to the limits in the xAI Grok API service file: 480 calls a minute per connection. Repeated reads are answered from cache (23 xAI Grok API actions can be), which never reaches xAI Grok API.
What does a xAI Grok API action cost?
One upstream call, the only unit actionlake bills. A list that pages bills one call per page (47 xAI Grok API actions page). Cache hits, searches, dry runs and calls xAI Grok API refused with 401, 403, 429 or a 5xx are free. The Free plan includes 100,000 calls a month with no card. Paid plans start at US$49 a month for 250,000 calls, with overage from US$0.30 down to US$0.18 per 1,000.
Which xAI Grok API API does it cover?
The xAI REST API 1.0.0 (OpenAPI 3.1.0) plus the documented Batches endpoints at api.x.ai. It is built from xAI Grok API's documentation as read on 23 October 2026. 47 actions in 22 areas, each one in the signed service file (version 1.0.0).
Does actionlake keep my xAI Grok API data, and where?
actionlake processes and stores data in Sydney, Australia; there is no US region yet. Reads may be cached for up to 5 minutes, and a write clears the reads it affects. Each run's request and response is kept, sealed, for your plan's trace window: 1 day on Free, 3 days on Starter, 7 days on Pro, 14 days on Team, 30 days on Business and 30 days on Enterprise. Your xAI Grok API credential is sealed under your tenant's key, never logged and never returned. Your traffic is not used to train models.
Which AI clients can use it?
Claude Code, tested by us end to end, and the Claude app as a custom connector, tested by us with an existing key. Other MCP clients that support remote servers over Streamable HTTP (MCP revisions 2025-06-18 and 2025-11-25) and OAuth dynamic client registration, or a bearer header, should connect the same way; we have not tested them. Or plain REST, under the same action names.
Give your agent xAI Grok API today.
Start free - 100,000 calls/month, no card. No signup. Hard caps on every key. Cached answers are free.