---
agent:
  instructions: "Use this search API to find relevant content across this site with keywords or natural-language queries, instead of crawling individual pages. Results are returned in Markdown."
  endpoint: "https://elaichi.ai/.well-known/search?q={query}"
  method: "GET"
  documentation: "https://developers.cloudflare.com/ai-search/how-to/search-for-agents/"
---

# xAI MCP connector

The xAI connector brings xAI's models, chat completions, embeddings, files and document search into Claude, ChatGPT and other AI clients, so your team can work with xAI by asking in plain language.

Source: https://elaichi.ai/connectors/xai/

## Facts

| | |
| --- | --- |
| Application | xAI |
| Category | Artificial Intelligence |
| AI tools | 62 |
| Authentication | Connects with an API key |
| Bring your own OAuth app | No |
| MCP endpoint | https://api.elaichi.ai/mcp |
| Works with | Claude, ChatGPT, Perplexity, Grok, Cursor, Microsoft Copilot, any MCP client, and the Elaichi Agent |
| Tools advertised by name | No. Connected tools are never listed one by one, however few there are. The endpoint advertises `search_tools` and `execute_tool` instead |

## What you can ask once xAI is connected

- List the xAI language models we can use today.
- Draft a reply to this customer refund email.
- Search our policy documents for the travel expense rules.

## Connect xAI in Elaichi

This happens once for the organization, before any client is involved.

1. Open Connections, choose Add connection, and pick xAI.
2. Optionally set Share with, then press Connect.
3. Paste a xAI API key. One person generates a token in xAI and pastes it once. Everyone else works through Share with, and never sees it.

Credentials are vaulted and nobody, including the AI, reads them back. The connection becomes a toolbox immediately, so you can curate which xAI tools are exposed, rename them, or freeze arguments before anyone points a client at it.

## xAI MCP connector for Claude

Endpoint: https://api.elaichi.ai/mcp

1. Open Customize, then Connectors.
2. Press Add.
3. Name it, paste the MCP server URL, then Continue.
4. Sign in and approve.

On Team and Enterprise, an Owner adds it once. Everyone else turns it on for themselves.

## xAI MCP connector for Claude Code

Endpoint: https://api.elaichi.ai/mcp

1. Copy the `claude mcp add` command and run it in a terminal.
2. Start Claude Code and run `/mcp`.
3. Pick elaichi, then sign in and approve in the browser.

```bash
claude mcp add --transport http elaichi --scope user https://api.elaichi.ai/mcp
```

Use `--scope project` instead to share it with the repository through `.mcp.json`.

## xAI MCP connector for ChatGPT

Endpoint: https://api.elaichi.ai/mcp

1. Open Plugins, then press the + button.
2. Name it and paste the endpoint into Server URL.
3. Leave Authentication on OAuth, then tick the risk acknowledgement.
4. Press Create, then sign in and approve.

Works on the web. The plugin directory lives at chatgpt.com/plugins.

## xAI MCP connector for Perplexity

Endpoint: https://api.elaichi.ai/mcp

1. In the left sidebar, click Plugins, then Add custom, then Add MCP connector, then Remote.
2. Name it Elaichi.
3. Paste the endpoint as the MCP server URL.
4. Open Advanced. Pick OAuth, so you can sign in, and Streamable HTTP, which is how Elaichi talks. Leave the client ID and secret empty.
5. Tick the box about custom connectors, then click Add.
6. Click the Elaichi card. Sign in to Elaichi and approve.

Needs a paid Perplexity plan. In an organization, an admin may first need to allow custom connectors.

[Setup guide for Perplexity](/blog/connect-elaichi-to-perplexity/)

## xAI MCP connector for Grok

Endpoint: https://api.elaichi.ai/mcp

On grok.com:

1. Go to grok.com/connectors and click New Connector.
2. Choose Custom.
3. Paste the endpoint as the MCP server URL.
4. Sign in to Elaichi and approve.

In Grok Bot:

1. Open Connect apps and click Add a custom connector.
2. Name it Elaichi.
3. Set the type to Remote HTTPS.
4. Paste the endpoint as the Server URL.
5. Leave Client ID empty.
6. Click Add plugin. Then click Authorize, sign in to Elaichi and approve.

On Grok Business and Enterprise, a team admin adds the connector in console.x.ai first.

[Setup guide for Grok](/blog/connect-elaichi-to-grok/)

## xAI MCP connector for Cursor

Endpoint: https://api.elaichi.ai/mcp

1. Open `~/.cursor/mcp.json`.
2. Add the endpoint under `mcpServers`.
3. Reload Cursor, then sign in and approve.

Set up per machine, so repeat it on each computer you work from.

## xAI MCP connector for Microsoft Copilot

Endpoint: https://api.elaichi.ai/mcp

1. In Copilot Studio, open your agent, then Tools, Add a tool, New tool and Model Context Protocol.
2. Paste the endpoint into Server URL, choose OAuth 2.0, then Dynamic discovery, and press Create.
3. Create a new connection, sign in and approve, then press Add to agent.
4. Under Channels, open Teams and Microsoft Copilot and make the agent available in Microsoft Copilot.

Microsoft Copilot was called Microsoft 365 Copilot. Keep the tool on end-user credentials, so each person signs in as themselves.

## Connect xAI to any MCP client

Endpoint: https://api.elaichi.ai/mcp

1. Add the endpoint as a remote MCP server.
2. Sign in and approve.

The Elaichi Agent already has these tools, with nothing to set up.

## What the consent screen decides

Every scope the client asks for starts ticked except "Delete things", which you tick yourself. Calling a xAI tool needs "Use your connected apps". Over MCP there is no trusted place to confirm a write in the moment, so the consent screen is the standing approval rather than a formality. Think hard before granting Use your connected apps, which can also delete in connected apps and cannot be undone.

## What teams do with xAI through Elaichi

### Pick the right xAI model for a job

Engineering. Ask which xAI language, embedding and image generation models are available and get the details on each one. Compare options before anyone writes a line of code.

### Try a prompt against an xAI model

Product. Run a draft prompt through an xAI model and read the reply side by side with the original. Go back to an earlier response by asking for it again later.

### Draft a customer reply with xAI

Support. Paste in a customer email and have an xAI model draft a first reply. Edit it and send it from your usual help desk.

### Turn text into embeddings for search

Data. Create embeddings from product descriptions, tickets or notes so they can power search and matching. Check which embedding models are available first.

### Manage files and public links in xAI

Operations. Upload, download and tidy up the files your team keeps in xAI. Create a public link when someone outside needs a file, and revoke it when they are done.

### Search your documents for an answer

Research. Ask a question across the document collections stored in xAI and get the relevant passages back. Useful for finding a policy line or a past finding quickly.

## Elaichi vs Zapier MCP vs Composio for xAI

All three can connect xAI to an AI assistant, and all three have admin controls. They differ in where access lives and how you pay.

| What to check | Elaichi | Zapier MCP | Composio |
| --- | --- | --- | --- |
| Where the AI connects | One address for the whole organization. Endpoint: https://api.elaichi.ai/mcp | A server per member, created at sign-in. | An MCP endpoint per team, or an SDK. |
| Control over xAI tools | Allow or restrict single xAI tools, per role or user. | App and action restrictions on the account. | Role permissions, down to the action. |
| Record of calls | One audit entry per xAI call. | A History tab of tool calls. | A log of every tool call. |
| Single sign-on | SAML or OIDC, plus SCIM, on Gold. | SAML on Enterprise. | SAML and OIDC on Enterprise. |
| Price | Free for one person; $15 per user per month on Gold. | 2 tasks per successful call. | Billed per tool call. |

Sources: Zapier MCP [docs](https://docs.zapier.com/mcp/get-started/quickstart), [security](https://docs.zapier.com/mcp/manage/security), [usage](https://docs.zapier.com/mcp/features/usage); Composio [docs](https://docs.composio.dev/docs/composio-connect), [gateway](https://composio.dev/mcp-gateway), [enterprise](https://composio.dev/enterprise), [pricing](https://composio.dev/pricing). Checked September 2026.

Longer take: [Zapier MCP alternative](/blog/zapier-mcp-alternative/) and [whether you need an MCP gateway on your own](/blog/when-you-dont-need-an-mcp-gateway/).

## Frequently asked questions

### How do I connect xAI to Claude?

Connect xAI in Elaichi by pasting an xAI API key from your xAI account, then add https://api.elaichi.ai/mcp in Claude under Customize, then Connectors, then Add. There is no OAuth application to register and no client ID or secret to generate. Once Claude signs in to Elaichi, your xAI models, files and completions are ready to use.

### Does xAI work with ChatGPT, Perplexity, Grok and Cursor as well as Claude?

Yes. The xAI connector uses the same endpoint, https://api.elaichi.ai/mcp, in Claude, ChatGPT, Perplexity, Grok, Cursor, Microsoft Copilot, any other MCP client and the Elaichi Agent. You connect xAI once in Elaichi and every client can use it.

### What can an AI agent actually do with my xAI account?

With xAI connected, an agent can list the xAI models available to you, send a prompt to a model and return the reply, create embeddings, and search your document collections. It can also upload, download and delete files in xAI and create or revoke public links to them. Short, concrete asks like "list our xAI files" tend to work better than long sentences.

### Does connecting xAI give the AI access to everything in the account?

No. Access to xAI follows the person who signed in and the API key their connection uses, so an agent can only do what that key allows. Elaichi can narrow that further with restrictions, but it never widens access beyond what the xAI key already permits.

### Can my team share one xAI connection?

Yes. One person connects xAI with an API key and shares the connection with a team, so nobody else ever sees or handles the key. Each person still signs in to Elaichi as themselves, so the audit log names who made every xAI call.

### Can I stop an agent from deleting files or creating public links in xAI?

Yes. In Elaichi you can restrict individual xAI actions, such as deleting a file or creating a public link, on a role or on one person. A restricted xAI tool still appears in Elaichi's tool search, flagged as restricted, but no client can run it, whatever the prompt says.

### What happens to an xAI connection when someone leaves?

Offboarding a person in Elaichi ends their access to xAI at once. If they used a shared xAI connection, it keeps working for everyone else on the team. Disconnecting xAI once in Elaichi removes it from every client at the same time.

### Does the xAI MCP connector work with Gemini, Codex, Claude Code or other MCP clients?

Yes. xAI is reached over the same MCP endpoint every client uses, so anything that speaks MCP can call it — Gemini, Codex, Claude Code, Windsurf, Cline, Zed and OpenCode among them — alongside Claude, ChatGPT, Perplexity, Grok, Cursor, Microsoft Copilot, and the Elaichi Agent. The tools on offer and the access behind them are identical whichever client asks. Only the setup screen differs.

### Is Elaichi an alternative to Zapier MCP for xAI?

Yes. Both let Claude, ChatGPT or Cursor use xAI. Zapier MCP fits a team that already automates in Zapier, since each person signs in and acts as themselves in that account. Elaichi fits when IT wants one address for the whole company, per-tool rules by role, and a record of every xAI call.

### How is Elaichi different from Composio for xAI?

Composio gives AI agents tools and sign-in handling across 1,000+ apps, for developers building agents or people using an assistant, billed per tool call. Elaichi gives a company's own people governed access to xAI: one address, restrictions per role or user, and $15 per user per month. Both have role permissions and a log of every call.

## All 62 xAI tools

Every tool below is callable through https://api.elaichi.ai/mcp once xAI is connected, subject to the toolbox it is in and the restrictions on the caller.

- **XAI API keys me** (Action). Get information about the API key in xAI, including its name, permissions and who created or modified it. Returns: acls, api_key_blocked, api_key_disabled, api_key_id, create_time, modified_by, modify_time, name, redacted_api_key, team_blocked, team_id, user_id.
- **Create a xAI chat completion** (Create). Create a chat completion in xAI from text or image prompts — the endpoint for chat and image understanding models. Returns: choices, citations, created, id, model, object, output_files, service_tier, system_fingerprint, usage. Streaming (SSE) is not available through this call; the whole reply is returned. Spends the team's prepaid xAI credits (per-model pricing).
- **Create a xAI completion** (Create). Create a text completion response for a given prompt in xAI. Returns: choices, created, id, model, object, system_fingerprint, usage. Requires prompt and model. Legacy endpoint: not supported by reasoning models; replaced by /v1/chat/completions. Streaming (SSE) is not available through this call; the whole reply is returned. Spends the team's prepaid xAI credits (per-model pricing).
- **XAI documents query** (Search). Search indexed documents for content related to a query within the given collections. Returns matching chunks with file_id, chunk_id, chunk_content, score, and collection_ids. Spends the team's prepaid xAI credits (per-model pricing). Required: query, source.
- **List all xAI embedding models** (List). List all embedding models available to the authenticating API key, with full information including modalities, fingerprint, and aliases. Returns: aliases, created, fingerprint, id, input_modalities, object, output_modalities, owned_by, prompt_image_token_price, prompt_text_token_price, version. This call is in xAI's OpenAPI spec but has no page of its own in the docs reference.
- **Get single xAI embedding model by ID** (Get). Get full information about a single embedding model. Returns: aliases, created, fingerprint, id, input_modalities, object, output_modalities, owned_by, prompt_image_token_price, prompt_text_token_price, version. This call is in xAI's OpenAPI spec but has no page of its own in the docs reference. Required: id.
- **Create a xAI embedding** (Create). Create an embedding vector representation for the input text with an xAI embedding model. Returns: embedding, index, object. Requires input and model. Spends the team's prepaid xAI credits (per-model pricing). This call is in xAI's OpenAPI spec but has no page of its own in the docs reference.
- **List all xAI files** (List). List xAI files owned by the authenticated team. Returns each file's id, filename, bytes, created_at, expires_at, and purpose. Results are paginated automatically.
- **Create a xAI file** (Create). Upload a file to xAI's storage; the file can then be referenced by its id wherever a file_id is accepted, such as chat attachments. Returns: bytes, created_at, expires_at, filename, id, object, public_url, public_url_expires_at, purpose. Required: file. Max file size 50 MB. Required: file.
- **Get single xAI file by ID** (Get). Get a single xAI file's metadata by id. Returns: bytes, created_at, expires_at, filename, id, object, public_url, public_url_expires_at, purpose. Required: id.
- **Delete a xAI file by ID** (Delete). Delete an xAI file by id; afterwards the file no longer appears in list results and its id can no longer be referenced in chat attachments. Returns: deleted, id, object. Required: id.
- **XAI files download** (Download). Download the raw contents of an xAI file by id. Returns the file's binary payload streamed as application/octet-stream bytes; the payload shape depends on the file's content type. Fails when the file is not found, deleted, or expired. Returns the file's raw bytes (application/octet-stream), or text with format=text. Required: file_id.
- **Create a xAI file public URL** (Create). Create an unauthenticated public URL for an existing xAI file; the underlying file is unaffected. Returns: expires_at, public_url. Required: file_id. Optionally pass expires_after (seconds, 3600-2592000) to cap the URL's lifetime. Required: file_id.
- **XAI file public URLS revoke** (Revoke). Revoke the active public URL for a file in xAI; the file itself remains available through the authenticated content endpoint, and revoking a file with no active public URL succeeds idempotently with revoked set to false. Returns: id, public_url, revoked. Required: file_id.
- **List all xAI image generation models** (List). List all image generation models available to the authenticating API key, with more detail than the general models list (modalities, fingerprint, aliases, pricing). Returns: aliases, created, fingerprint, id, image_price, input_modalities, max_prompt_length, object, output_modalities, owned_by, pricing, version.
- **Get single xAI image generation model by ID** (Get). Get full information about a single xAI image generation model. Returns: aliases, created, fingerprint, id, image_price, input_modalities, max_prompt_length, object, output_modalities, owned_by, pricing, version. Required: id.
- **Get single xAI image by ID** (Get). Get the result of a deferred image generation request in xAI. Poll with the request_id returned by a previous image request as the id: a 202 response means the generation is still pending, and a finished request returns the image record with its url. A failed generation is reported in the response body rather than as an HTTP error. Answers 202 while the image job is still pending. Required: id.
- **List all xAI language models** (List). List all xAI chat and image understanding models with full information, including modalities, fingerprint, and aliases. Returns: aliases, cached_prompt_text_token_price, cached_prompt_text_token_price_long_context, capabilities, created, fingerprint, id, input_modalities, output_modalities, prompt_text_token_price, and 9 more.
- **Get single xAI language model by ID** (Get). Get full information about a single xAI chat or image understanding model by id. Returns: aliases, cached_prompt_text_token_price, cached_prompt_text_token_price_long_context, capabilities, completion_text_token_price, created, fingerprint, id, input_modalities, output_modalities, prompt_text_token_price, and 8 more. Required: id.
- **Create a xAI message** (Create). Create a messages response in xAI, compatible with the Anthropic API. Returns: content, id, model, role, stop_reason, stop_sequence, type, usage. Streaming (SSE) is not available through this call; the whole reply is returned. Spends the team's prepaid xAI credits (per-model pricing).
- **List all xAI models** (List). List all xAI models available to the authenticating API key, including model names, creation times, and pricing. Returns: aliases, cached_prompt_text_token_price, cached_prompt_text_token_price_long_context, capabilities, completion_text_token_price, completion_text_token_price_long_context, context_length, created, id, owned_by, and 7 more.
- **Get single xAI model by ID** (Get). Get information about a specific xAI model by id, including its pricing. Returns: aliases, cached_prompt_text_token_price, cached_prompt_text_token_price_long_context, capabilities, completion_text_token_price, completion_text_token_price_long_context, context_length, created, id, image_price, object, owned_by, and 5 more. Required: id.
- **Create a xAI response** (Create). Create a new xAI response from text or image prompts. Returns the generated response object including id, model, output, status, and usage. Required: input. Stored responses are kept for 30 days, then permanently deleted. Streaming (SSE) is not available through this call; the whole reply is returned. Spends the team's prepaid xAI credits (per-model pricing). Required: input.
- **Get single xAI response by ID** (Get). Get a previously generated xAI response by id. Returns the stored response object including id, model, output, status, and usage. Required: id.
- **Delete a xAI response by ID** (Delete). Delete a previously generated xAI response by id. Returns: deleted, id, object. Required: id.
- **XAI responses compact** (Action). Compact a full Responses API input window into a shorter canonical window via xAI. Returns: created_at, id, model, object, output, usage. Required: model, input. Use the returned window verbatim as the input of the next Responses request, appending only the new user turn. Spends the team's prepaid xAI credits (per-model pricing). Required: input, model.
- **List all xAI response input items** (List). List the input items that were part of the conversation context for a previously generated xAI response. Returns paginated items with fields like id, type, role, content, and status. Required: response_id. Max 100 per page; results are paged automatically. This call is in xAI's OpenAPI spec but has no page of its own in the docs reference. Required: response_id.
- **List all xAI video generation models** (List). List all xAI video generation models available to the authenticating API key. Returns each model's id, fingerprint, created timestamp, version, input/output modalities, owned_by, and aliases.
- **Get single xAI video generation model by ID** (Get). Get full information about an xAI video generation model by id. Returns: aliases, created, fingerprint, id, input_modalities, object, output_modalities, owned_by, version. Required: id.
- **Get single xAI video by ID** (Get). Get the result of a deferred xAI video generation request by id. Returns: error, model, progress, status, usage, video. Poll until the job completes; a still-running job reports in-progress status. Answers 202 while the video job is still pending. Required: id.
- **List all xAI batches** (List). List xAI batches for the current team. Returns each batch with batch_id, name, create_time, expire_time, create_api_key_id, and state.
- **Create a xAI batch** (Create). Create a new xAI batch for processing requests. Returns the created batch with batch_id, name, create_time, expire_time, and state. Required: name.
- **Get single xAI batch by ID** (Get). Get information about a specific xAI batch by id. Returns: batch_id, cancel_by_xai_message, cancel_time, create_api_key_id, create_time, expire_time, name, state. Required: id.
- **XAI batches cancel** (Cancel). Cancel processing of all requests in an xAI batch. Returns the batch object with batch_id, name, create_time, expire_time, cancel_time, create_api_key_id, and request counts in state. Required: batch_id.
- **Create a xAI realtime client secret** (Create). Create an ephemeral client secret for authenticating browser-side Realtime API connections in xAI. Returns: value, expires_at. The Realtime voice session itself runs over a WebSocket, which this integration does not cover.
- **List all xAI phone numbers** (List). List xAI phone numbers for the authenticated team. Returns: phone_number_id, team_id, phone_number, name, agent_id, webhook_id, origin, sip_host, inbound_trunk_id, sip_auth, created_at, updated_at, agent_name. Optionally filter by agent_id. Max 100 per page; results are paged automatically.
- **Create a xAI phone number** (Create). Create an xAI phone number for API-controlled SIP calls. Returns the created phone_number (phone_number_id, name, origin, sip_host, created_at) plus the webhook (webhook_id, one-time dispatch_signing_secret). Required: origin, name. agent_id and webhook are mutually exclusive. Required: origin, name.
- **Delete a xAI phone number by ID** (Delete). Remove a Direct SIP or Twilio-imported phone number in xAI by id. Returns an empty response on success. Required: id.
- **List all xAI tts voices** (List). List all available TTS voices in xAI. Returns: voice_id, name, language.
- **Get single xAI tts voice by ID** (Get). Get details for a specific TTS voice in xAI by id. Returns: voice_id, name, language. eve). Required: id.
- **List all xAI custom voices** (List). List custom voices owned by your team in xAI. Returns each voice's voice_id, name, description, gender, accent, age, language, tone, and created_at. Max 1000 per page; results are paged automatically.
- **Create a xAI custom voice** (Create). Create a custom voice in xAI from a reference audio clip. Returns the created voice's voice_id, name, gender, accent, language, tone, and created_at. Requires file (up to 120 seconds; WAV, MP3, FLAC, OGG, Opus, M4A, AAC, MKV, MP4 supported). Required: file.
- **Get single xAI custom voice by ID** (Get). Get a single custom voice by id in xAI. Returns the voice's voice_id, name, description, gender, accent, age, language, tone, and created_at. Required: id.
- **Update a xAI custom voice by ID** (Update). Update a custom voice's metadata (name, description, gender, accent, age, language, use_case, tone) in xAI. Returns the updated voice with voice_id, name, tone, and created_at. Required: id.
- **Delete a xAI custom voice by ID** (Delete). Delete a custom voice by id in xAI. Returns a confirmation object with deleted set to true on success. Required: id.
- **XAI custom voices download** (Download). Download the reference audio for a custom voice by id. Returns the reference audio file itself, delivered as binary audio data. Returns the reference audio file's bytes. Required: voice_id.
- **List all xAI batch requests** (List). List metadata for all requests in an xAI batch. Returns: batch_request_id, create_time, endpoint, finish_time, model, state. Required: batch_id.
- **Create a xAI batch request** (Create). Add multiple chat completion requests to an existing xAI batch. Returns the recorded requests with batch_request_id, endpoint, model, state, and create_time. Spends the team's prepaid xAI credits (per-model pricing). Required: batch_id, batch_requests.
- **List all xAI batch results** (List). List the processing results for an xAI batch. Returns each result's batch_request_id and batch_result, including the underlying completion's id, model, choices, and usage. Required: batch_id.
- **Get single xAI deferred completion by ID** (Get). Get the result of a previously-started deferred chat completion in xAI. Returns: choices, citations, created, id, model, object, output_files, service_tier, system_fingerprint, usage. Responds 202 while the request is still processing. Answers 202 with no body while the request is still processing. Required: id.
- ...and 12 more tools. Call `tools/list` via the MCP endpoint, or see the full catalog via the API, for the complete set.
