# How to Connect Grok Build to MewCP

Grok Build is xAI's coding agent for the terminal. It adds remote MCP servers with one command and signs in with OAuth in the browser. Add MewCP once, and Grok Build can use every app you have connected in MewCP: Gmail, Calendar, Slack, GitHub and the rest. There is no API key to paste.

There are two ways to set it up:

| Method                             | Best for                     |
| ---------------------------------- | ---------------------------- |
| [Command](#option-a-command)       | Most people                  |
| [MCP config](#option-b-mcp-config) | Editing the config yourself  |

---

## Before you start

- **Grok Build** installed
- **A MewCP account** with **at least one app connected** under [Apps](https://mewcp.com/dashboard/apps)

---

## Option A: Command

<Stepper>

1. **Add the server**

   ```bash
   grok mcp add --transport http mewcp https://gateway.mewcp.com/personal/mcp
   ```

1. **Sign in to MewCP**

   Start `grok`. The browser opens the first time a MewCP tool is used: sign in and click **Allow access**. To sign in right away, open `/mcps`, select `mewcp` and press `i`.

</Stepper>

---

## Option B: MCP config

<Stepper>

1. **Open your config**

   Edit `~/.grok/config.toml`. Create it if it does not exist. For one repository only, use `.grok/config.toml` in that project instead.

1. **Add the server**

   ```toml
   [mcp_servers.mewcp]
   url = "https://gateway.mewcp.com/personal/mcp"
   ```

1. **Sign in to MewCP**

   Start `grok`, or refresh in `/mcps` with `r` if it is already running. The browser opens the first time a MewCP tool is used. To sign in right away, select `mewcp` in `/mcps` and press `i`.

</Stepper>

This is the entire configuration either way. One entry reaches every app you have connected, and connecting another app later needs no change here.

---

## Check it works

```bash
grok mcp doctor mewcp
```

This checks the connection. Then ask:

```
List the tools you can use from MewCP.
```

You will see four tools, not the tools of every app: `search`, `get_schema`, `manage_connections` and `call_tool`. That is expected. Grok Build uses them to find and run the right tool for whatever you ask. See [How MewCP works](/mewcp/getting-started#how-mewcp-works).

---

## Troubleshooting

### Sign-in has expired or failed

Open `/mcps`, select `mewcp` and press `i` to sign in again. See [OAuth Sign-In](/mewcp/authentication/oauth-sign-in#troubleshooting) for errors on the sign-in page.

### A `403` says your plan's billing period has ended

Your MewCP plan needs renewing under [Billing](https://mewcp.com/dashboard/billing).

---

_Last updated on 29 November 2026._
