> ## Documentation Index
> Fetch the complete documentation index at: https://docs.migma.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect Migma to Grok Bot

> Connect Migma to Grok Bot, verify your brand, and create your first editable email draft before preparing an approved campaign.

Connect Migma to Grok Bot to create editable emails using your saved brand, review previews, prepare campaigns for opted-in subscribers, and read results. Start with one draft. Creating an email does not send it.

This guide covers the **Grok Bot desktop app**. You need a Migma account, access to your brand, and permission to add connections in Grok Bot.

## Quick start

1. Paste the setup prompt below into Grok Bot and approve the connection in your browser.
2. Ask Grok Bot to find your brand read-only. Confirm that the returned brand is yours.
3. Request one editable email draft. Open its preview and Migma canvas link before continuing.

For first-email prompts, read [Grok Bot email marketing: setup and first draft](https://migma.ai/blog/ai-email-marketing-from-grok-bot). For audience, sender, review, and results, use [Grok Bot email campaigns: from brief to results](https://migma.ai/blog/design-send-marketing-emails-grok-bot).

Grok Bot connects through Migma Remote MCP, which lets it use Migma tools, at `https://migma.ai/mcp`. Sign-in and access approval happen in your browser.

> [!NOTE]
>
> Agent-guided Remote MCP setup is available in Grok Bot desktop with user approval. Marketplace availability and connector authentication vary by Grok build and workspace policy.

> [!WARNING]
>
> Use one write path per task. Finish or pause current work before switching between Migma MCP and browser operation. This prevents duplicate drafts.

## Start email marketing with Grok Bot

Copy this prompt into Grok Bot:

```text theme={null}
Set up Migma so you can run my email marketing.
Read https://docs.migma.ai/grok.md and reuse my existing Migma connection if available.
Ask before adding a connection. I'll review access in my browser.
Then find my brand [brand name] with a read-only request and report which tool succeeded.
Do not create, import, schedule, or send anything during setup.
```

![Illustration showing Migma connected to Grok Bot through the Migma Remote MCP URL](https://mintcdn.com/migmaai/FD_h5ksPM7EFUv6w/images/tutorials/grok-bot/hero.webp?fit=max\&auto=format\&n=FD_h5ksPM7EFUv6w\&q=85\&s=90b33640db234ca560b8ab621fca58c1)

Illustration of Migma connecting to Grok Bot through Remote MCP

## Before you start

You need:

* A Migma account.
* Grok Bot desktop with plugins and MCP connections allowed.
* A browser for Migma access approval.

Team and Enterprise admins may need to allow the Migma server URL before members can connect it. Grok Bot follows the same plugin and MCP policy as Cursor.

## Connect Migma from Grok Bot

The quickest path is the [Migma plugin listing](https://x.ai/bot/plugin/65888866). Add it to Grok Bot, then approve access in your browser. Use the steps below if the listing is not available in your Grok build or workspace.

**1. Ask Grok Bot to add Migma**

Check **Plugins → Your plugins** for an existing Migma connection first. If it needs authentication, select **Authenticate** and complete the access approval. If no connection exists, create a Bot and paste the prompt above to add Migma.

Grok Bot should discover `https://migma.ai/mcp` and ask before adding it. Choose the approval action only when the endpoint is exact.

![Illustration showing Grok Bot reading Migma setup guidance, finding the Migma Remote MCP URL, and asking whether to add the connector](https://mintcdn.com/migmaai/FD_h5ksPM7EFUv6w/images/tutorials/grok-bot/setup-migma-mcp.webp?fit=max\&auto=format\&n=FD_h5ksPM7EFUv6w\&q=85\&s=fe40d02ebe1ec3efe7a8813b63db92e1)

Illustration of Grok Bot discovering Migma Remote MCP and asking before adding it

**2. Review Migma access**

Follow the installed connector's browser approval. Sign in if needed, review the app and permissions, then select **Allow** when they match your intended access. Return to Grok Bot and check the connector status.

Full access lets Grok Bot design, import audiences, and prepare sends for you. Review those permissions before approval. You approve every send in Migma: Grok Bot gives you a link where you review it, then select **Send**, **Schedule**, or **Decline**. Keep Grok Bot's approval controls enabled.

![Illustration showing the Migma connection review with app, return destination, requested access, Cancel, and Allow](https://mintcdn.com/migmaai/FD_h5ksPM7EFUv6w/images/tutorials/grok-bot/approve-migma-access.webp?fit=max\&auto=format\&n=FD_h5ksPM7EFUv6w\&q=85\&s=dec2b580b151142270d126f13f2fc1ac)

Illustration of the Migma access review opened by Grok Bot

Migma creates the connection credential after your approval and hands it to Grok Bot directly.

**3. See your account**

A **Connected** badge is the first check. Ask Grok Bot to make a read-only request for the brand you want to use:

```text theme={null}
Use Migma to find my brand [brand name] read-only.
State which Migma tool succeeded. Do not create or send anything yet.
```

![Illustration showing Grok Bot calling Migma list projects, returning a sanitized demo brand, and making no changes](https://mintcdn.com/migmaai/FD_h5ksPM7EFUv6w/images/tutorials/grok-bot/verify-migma-mcp.webp?fit=max\&auto=format\&n=FD_h5ksPM7EFUv6w\&q=85\&s=9f8dd579f5d071879a339a8c7f369d78)

Illustration of Grok Bot verifying Migma with a read-only brand request

### How Grok Bot connects

Use the installed Migma connector's browser authentication first. In a September 4, 2026 check, selecting **Authenticate** restored an existing connector to **Connected**, and Grok Bot successfully read a Migma brand through its tools. This verifies that connection, not every Grok build or workspace policy.

If a direct agent cannot complete browser OAuth, it may use the conditional claim-code flow described in [Agent registration](https://docs.migma.ai/agent-registration.md). That requires secure credential storage and does not repair a hosted connector that still reports `needsAuth`.

## Create your first email draft

After the read-only request succeeds, replace the brackets and send:

```text theme={null}
Use Migma with brand [brand name].
Create one welcome email for people who signed up on our website.
Goal: help them [first useful action].
Use our saved brand style and only these approved facts: [facts].
Main link: [destination URL].
Keep it as an editable draft. Show the preview and Migma canvas link.
Do not create a campaign, import contacts, schedule, or send.
```

Open the returned email and check the facts, branding, images, and links. For a focused change, identify that email by its canvas link and name the section to edit. Review the new preview before preparing recipients or delivery.

Use [Email Preflight](https://docs.migma.ai/email-editor/email-preflight.md) to check the finished email. A test email is a separate send that requires your approval; it uses Migma's sender and does not verify your own campaign sender.

> [!NOTE]
>
> Our September 4, 2026 Grok Bot check verified authentication and reading a saved brand. Draft generation reached the account's daily limit, so that run did not verify a generated preview, edit, or received test. The workflow below describes documented Migma capabilities.

## Other Grok clients

Grok web and Grok Build are separate from Grok Bot desktop.

For Grok web, open [grok.com/connectors](https://grok.com/connectors), choose **New Connector → Custom**, and add `https://migma.ai/mcp`.

For Grok Build:

```bash theme={null}
grok mcp add --transport http migma https://migma.ai/mcp
grok mcp doctor migma
```

## Browser fallback

When you choose browser fallback, Grok Bot may operate a signed-in Migma browser session. Take over for password, passkey, two-factor code, and CAPTCHA. Every Bot shares that cloud computer and its browser sessions. Sign out after use.

## Give Grok Bot its job

Ask Grok Bot to read this page, then save this operating instruction:

```text theme={null}
You run my communication through Migma: launches, announcements, newsletters, campaigns.
Write like we're chatting on WhatsApp: 1–2 short sentences, simple words, result and useful links. No fluff, hype, long recaps, or automatic follow-up offers. Match my language. Give more detail only when I ask or need to make a decision.
Start each session with migma_get_context and use the setup block to handle my task. Keep the checklist internal; ask one short question only when needed.
Raise missing setup only when it helps my current task. Handle one thing at a time; don't turn the conversation into a setup checklist.
Create drafts and show me every preview and canvas link.
When I like a Migma email's design or say "save this style," call migma_save_reference with that exact emailId. For a series, save only the email I chose. Confirm after favorite:true.
For an external email, save projectId + title + html. A screenshot alone can guide generation through images, but cannot be saved as a standing reference.
Build on facts from my brand or facts I give you, and send only to people who opted in.
Before any send or schedule, show me the audience, recipient count, sender, subject, and final preview, then give me the Migma approval link.
```

## Run the email marketing loop

Migma MCP returns exact brand, email, campaign, audience, and result data. Use Migma tools as the active write path for this workflow.

**1. Choose one brand**

Ask Grok Bot to list Migma brands, then select one.

**2. Save lasting brand facts**

When you share tone, offers, product facts, policies, or FAQs that should persist, ask Migma to save them to the selected brand's knowledge base.

**3. Build a source brief**

For current launches or product news, make Grok research primary sources first. Require a dated checklist of exact facts for each email and up to five public HTTPS source-image URLs. Use primary sources for facts and images for visual direction.

**4. Create drafts first**

Ask for one email or a short series. State audience, goal, approved facts, and CTA. End with **Keep these as editable drafts and show every preview.**

```text theme={null}
Use Migma with brand [name].
Create 3 launch emails for [audience].
Goal: [action].
Required facts by email: [exact checklist from verified sources].
Source images: [up to 5 public HTTPS URLs].
Pass those URLs through migma_generate_email.images as structured image inputs.
Keep every email as an editable Migma draft and show each preview.
```

![Illustration showing three Migma draft email previews in Grok Bot and confirmation that no email was sent](https://mintcdn.com/migmaai/FD_h5ksPM7EFUv6w/images/tutorials/grok-bot/create-drafts.webp?fit=max\&auto=format\&n=FD_h5ksPM7EFUv6w\&q=85\&s=a7a7f0f31081305545cf561f814bd8cd)

Illustration of Grok Bot returning three Migma drafts

**5. Review and check**

Review returned previews in Grok Bot. Check every required fact in content and every expected source asset in images before saying the work is complete. If a preview cannot be inspected, say verification is incomplete and open its Migma link. Ask for targeted text edits, then run compatibility and deliverability checks. Use replacement generation to add missing structured images.

**6. Prepare the audience**

Import only opted-in contacts, or choose an existing list or segment. Ask Grok Bot to report created, updated, skipped, and failed counts before continuing.

**7. Confirm the sender**

Ask Migma to list available sending domains and From addresses. If none are ready, set up a domain you own. A managed Migma address supports testing and small transactional sends, with a 50-email daily limit and a 50-recipient limit per send. Connect your own domain for larger campaigns.

**8. Prepare the campaign for review**

Ask Grok Bot to create the draft, then pause for review:

```text theme={null}
Create a campaign draft from email [email id or canvas link].
Recipients: [opted-in list or segment].
Subject: [subject].
Sender: [sender].
Keep the campaign in draft. Show recipient count, sender, subject, and final preview, then wait for my approval.
```

![Illustration showing Grok Bot and Migma preparing a campaign summary with audience, sender, schedule, previews, and nothing sent](https://mintcdn.com/migmaai/FD_h5ksPM7EFUv6w/images/tutorials/grok-bot/review-campaign.webp?fit=max\&auto=format\&n=FD_h5ksPM7EFUv6w\&q=85\&s=727ee9628922d5a45deaf6443dd57a85)

Illustration of a campaign waiting for approval

**9. Approve the exact send**

Send or schedule only after audience, recipient count, sender, subject, timing, and preview match your intent. Keep Grok Bot approval controls enabled.

**10. Read results and improve the next brief**

After sending, ask Migma for campaign stats and delivery logs. Use clicks, bounces, and complaints to shape the next draft.

![Illustration showing Grok Bot using Migma campaign stats to summarize delivery, opens, clicks, bounces, and recommend the next brief](https://mintcdn.com/migmaai/FD_h5ksPM7EFUv6w/images/tutorials/grok-bot/read-results.webp?fit=max\&auto=format\&n=FD_h5ksPM7EFUv6w\&q=85\&s=093499d103a1f0202e03727a9a88a588)

Illustration of Grok Bot reading campaign results through Migma

## Prompts worth saving

### Save an email you like

```text theme={null}
I like this email's design: [Migma canvas link or emailId].
Save it as a reference for future emails for this brand.
```

Grok Bot calls `migma_save_reference` with the selected `emailId`. This favorites the email and makes its saved design available to future emails for the same brand by default, unless saved references are disabled. Later edits to the favorite update the reference too.

For a series, name the email you want to save. Grok Bot should use that email's ID, confirm only after `favorite: true`, and continue your task. Saving requires `project:write` and does not need an HTML export, a new draft, or sending permission. Repeating the same `emailId` keeps it favorited.

### Import an opted-in CSV

```text theme={null}
Use Migma with brand [name].
Import this CSV into a list named "[list name]".
These contacts opted in on our site.
Use one contact import with the full CSV text.
Report created, updated, skipped, and failed counts.
```

### Approve one exact send

```text theme={null}
Use campaign [name or id].
Confirm the audience, recipient count, sender, subject, final preview, date, time, and timezone.
Send when every value matches this conversation.
When any value differs, show the exact correction and wait for approval.
```

### Read performance

```text theme={null}
Use Migma to show stats and recent delivery logs for campaign [name or id].
Explain the strongest click signal, bounces, and complaints in plain language.
Recommend the next email brief and return the analysis only.
```

## Safe routines

After the Migma connection is verified, first run the task once. When the result is stable, save it as a Grok Bot skill or routine.

Good routines prepare work and stop:

```text theme={null}
Every Monday at 9:00 AM, review last week's Migma campaign results for brand [name].
Prepare one draft based on the strongest click signal.
Use only approved brand facts and opted-in audience data.
Show the preview and reasoning, then wait for approval.
```

Keep routines in preparation and review mode. xAI recommends approval for sending, publishing, deleting, purchasing, and production changes.

## Disconnect or revoke access

1. Pause any routine that uses Migma.
2. Open **Settings → Plugins**, find the installed Migma connector, and disconnect or remove it.
3. Revoke its matching OAuth-created key in **Migma Settings → Developers → API Keys**.
4. If you used claim-code, revoke the matching `Agent:` key and remove its stored credential from Grok.
5. If you used browser fallback, sign out of Migma inside **Grok Bot's Computer**.

## Troubleshooting

| Problem | Fix |
| - | - |
| Grok Bot cannot add Migma | Check **Settings → Plugins** and workspace MCP policy. An admin may need to allow `https://migma.ai/mcp`. |
| Migma keeps asking for login | Open **Plugins → Your plugins → Migma**, select **Authenticate**, and complete browser approval. Then repeat a read-only brand request. |
| Bot cannot find a brand | Confirm the approved Migma account can access that brand, then repeat the read-only brand request. |
| Bot starts changing data during setup | Send `Stop now`, then repeat the setup prompt above. |
| Bot keeps retrying a connector OAuth flow | Stop the retry loop and inspect the installed connector. Complete its authentication, then verify with a read-only brand request. If it still fails, report the exact error and Grok build. |
| A direct agent needs a connection credential | Follow the conditional fallback in [Agent registration](https://docs.migma.ai/agent-registration.md). The agent must support secure credential storage; approve access in your browser. |
| Duplicate drafts appear | Browser and MCP wrote at the same time. Stop both, list existing drafts read-only, keep one set, then continue through one mode. |
| Researched features or images are missing | Rebuild an exact fact checklist. Pass source URLs through structured `images`, regenerate once, then verify content and previews. |
| Generation reports a daily limit | Check your Migma plan and usage. Wait for the limit to reset or review an upgrade yourself, then retry once. A successful connection does not mean generation capacity remains. |

Current Grok behavior: [Grok Bot overview](https://docs.x.ai/grok-bot/overview), [get started and computer login](https://docs.x.ai/grok-bot/get-started), [skills and routines](https://docs.x.ai/grok-bot/skills-routines-and-automations), [approvals and security](https://docs.x.ai/grok-bot/approvals-security-and-privacy), and [Grok Build MCP](https://docs.x.ai/build/features/mcp-servers).

## Next

> [card] [Grok Bot email campaign guide](https://migma.ai/blog/design-send-marketing-emails-grok-bot)
>
> Turn a brief into reviewed emails, prepare recipients, and read campaign results.

> [card] [Grok Bot email prompts](https://migma.ai/blog/ai-email-marketing-from-grok-bot)
>
> Start with welcome, newsletter, and product-launch drafts.

> [card] [MCP permissions](https://docs.migma.ai/security/mcp.md)
>
> Review access, approval, and revocation before connecting.

> [card] [Migma MCP server](https://docs.migma.ai/mcp-server.md)
>
> See hosted MCP behavior and troubleshooting.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.