Skip to content

Grok (xAI API) · AI app (MCP)

Grok, with Fliok’s tools

Building on Grok? In your requests to xAI’s API, add Fliok as a remote MCP tool with its address and a scoped API key, and Grok can use Fliok’s tools.

Pro and upScoped API keyRevoke any time

Illustration: a developer’s desk from above, with a laptop, a cup of coffee and a notebook with a system diagram

This is for developers using xAI’s API. The Grok app is not covered.

What you can ask

Ask Grok, in plain words

Examples, with sample data. The app does only what its tools allow and you approved.

  • “Show today’s unanswered chats”

    Lists the WhatsApp chats waiting for a reply, and who each one is assigned to.

  • “Send the order-update template to this customer”

    Sends an approved template from your own number, through the same checks as the inbox.

  • “Create a lead from this email”

    Adds the lead with a name, number and source. A number you already have is never added twice.

  • “Which of our templates are approved?”

    Reads your templates and Meta’s approval status, so your code uses a template that will send.

Setup

Connect Grok in 3 steps

  1. 1Make an API key in Fliok for Grok — Read only is the safe start.
  2. 2Pass Fliok as a remote MCP tool in your xAI API request (the Responses API at https://api.x.ai/v1/responses, or mcp(...) in the xai-sdk). Grok calls Fliok's tools from xAI's servers.
  3. 3Put the key in authorization exactly as shown; Fliok accepts it with or without the word Bearer.
How it signs inFliok API key

A workspace admin creates a Fliok API key with only the scopes the app needs; the app sends it with every call.

https://fliok.com/api/mcp
json
{
  "model": "YOUR_GROK_MODEL",
  "input": [
    {
      "role": "user",
      "content": "Which WhatsApp chats in Fliok are waiting for a reply?"
    }
  ],
  "tools": [
    {
      "type": "mcp",
      "server_url": "https://fliok.com/api/mcp",
      "server_label": "fliok",
      "authorization": "wa_YOUR_FLIOK_KEY"
    }
  ]
}
Grok (xAI API) in the MCP guide
PlanPro and above
How it connects
Remote MCP tool in xAI’s API + a Fliok API key
Compare plans

Good to know

  • It works through xAI’s API, for developers building on Grok, not in the Grok app.
  • A workspace admin creates the API key and picks its scopes; the app can do only what they allow.
  • Keep the key out of shared code and chats: anyone holding it can act in Fliok within its scopes.
  • No money moves through it: it cannot buy a plan, top up the wallet or change how you pay.
  • Messages it sends are ordinary WhatsApp messages: free-form text only inside the 24-hour window, a template outside it, and Meta’s charges as usual.
  • Everything the AI app does goes through the same permissions, plan limits, staff restrictions and audit trail as Fliok’s API.
  • What the AI app reads through Fliok is handled under that app’s own terms.

Got questions?

Questions about Grok

Anything else, ask us.

Build on Grok with Fliok

Start on the Free plan. Using Fliok from Grok needs Pro or higher.

Free forever plan · Keep your WhatsApp app