Skip to content

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/mcp
the first call
do {  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.

  1. 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
  2. 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
  3. 03

    Make the first call. Check before a write.

    Ask in plain words; Claude picks the action. Before anything changes, check validates 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 endpointsapi.x.ai
Built from
xAI Grok API's documentation, read 23 October 2026docs.x.aidocs.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
  1. Files

    5

    2 read · 1 write · 2 destructive

    List files · Get file metadata · Delete a file · Create a public URL for a file

  2. Responses

    5

    2 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

  3. Batches

    4

    2 read · 1 write · 1 destructive

    List batches · Create a batch · Get a batch · Cancel a batch

  4. Videos

    4

    1 read · 3 write · 0 destructive

    Edit a video · Extend a video · Generate a video · Get a video generation result

  5. Images

    3

    1 read · 2 write · 0 destructive

    Edit images · Generate images · Get a deferred image generation result

  6. Skills

    3

    2 read · 0 write · 1 destructive

    List skills · Get a skill · Delete a skill

  7. Batch requests

    2

    1 read · 1 write · 0 destructive

    Add requests to a batch · List the requests in a batch

  8. Chat completions

    2

    1 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.

ActionWhat it doesEffectSame name in
xai.files.listList filesList files.readcontent.file.list77 connectors
xai.batches.listList batchesList batches.readautomation.background_job.list34 connectors
xai.batches.createCreate a batchCreate a batch.writeautomation.background_job.create29 connectors
xai.files.getGet file metadataGet file metadata.readcontent.file.get74 connectors
xai.files.deleteDelete a fileDelete a file.destructivecontent.file.delete68 connectors
xai.me.getGet the authenticated identityGet the authenticated identity.readidentity.current_user.get307 connectors
xai.messages.createCreate a message (Anthropic-compatible)Create a message (Anthropic-compatible).writeanalytics.inference.create17 connectors
xai.responses.createCreate a model responseCreate a model response.writeanalytics.inference.create17 connectors
xai.api_key.getGet the current API keyGet the current API key.readidentity.api_key.get66 connectors
xai.models.getGet a modelGet a model.readinfra.ml_model.get13 connectors
xai.images.editEdit imagesEdit images.writethis connector
xai.images.generateGenerate imagesGenerate images.writethis 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.

  1. Readread

    Which xAI Grok API files changed this week, and who changed them?

    callsxai.files.list

  2. Writewrite

    Create a batch in xAI Grok API. Show me exactly what you will send before you save it.

    callsxai.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 filexai.files.delete
  • Cancel a batchxai.batches.cancel
  • Delete a stored responsexai.responses.delete
  • Revoke a file's public URLxai.files.revoke_public_url
  • Delete a skillxai.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.

doxai.files.deleteconfirm_policy: human

Delete a file?

intent: the user asked me to delete a file

run suspended · waiting for a named person · key xai-agent cannot confirm itself
In the console, or from an emailed signed link.
a key for this connector
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]" }  ]}
Illustrative. Scoped to xAI Grok API only, capped at 2,000 upstream calls, every write confirmed, and the destructive ones approved by a named person.

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

See pricing

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 filewrite
  • xai.files.deleteDelete a filedestructive
  • xai.files.getGet file metadataread
  • xai.files.listList filesread
  • xai.files.revoke_public_urlRevoke a file's public URLdestructive
Responses5
  • xai.responses.compactCompact a conversation into a shorter contextwrite
  • xai.responses.createCreate a model responsewrite
  • xai.responses.deleteDelete a stored responsedestructive
  • xai.responses.getGet a stored responseread
  • xai.responses.list_input_itemsList a response's input itemsread
Batches4
  • xai.batches.cancelCancel a batchdestructive
  • xai.batches.createCreate a batchwrite
  • xai.batches.getGet a batchread
  • xai.batches.listList batchesread
Videos4
  • xai.videos.editEdit a videowrite
  • xai.videos.extendExtend a videowrite
  • xai.videos.generateGenerate a videowrite
  • xai.videos.getGet a video generation resultread
Images3
  • xai.images.editEdit imageswrite
  • xai.images.generateGenerate imageswrite
  • xai.images.get_deferredGet a deferred image generation resultread
Skills3
  • xai.skills.deleteDelete a skilldestructive
  • xai.skills.getGet a skillread
  • xai.skills.listList skillsread
Batch requests2
  • xai.batch_requests.addAdd requests to a batchwrite
  • xai.batch_requests.listList the requests in a batchread
Chat completions2
  • xai.chat_completions.createCreate a chat completionwrite
  • xai.chat_completions.get_deferredGet a deferred chat completionread
Embedding models2
  • xai.embedding_models.getGet an embedding modelread
  • xai.embedding_models.listList embedding modelsread
Image generation models2
  • xai.image_generation_models.getGet an image generation modelread
  • xai.image_generation_models.listList image generation modelsread
Language models2
  • xai.language_models.getGet a language modelread
  • xai.language_models.listList language models with pricingread
Models2
  • xai.models.getGet a modelread
  • xai.models.listList modelsread
Video generation models2
  • xai.video_generation_models.getGet a video generation modelread
  • xai.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.