Skip to main content

How to connect Wati MCP to Meta Muse or Gemini CLI

Summary

Connect the Wati Model Context Protocol (MCP) server to Meta Muse or Google's Gemini Command Line Interface (CLI) to work with your Wati workspace using natural language. Once connected, you can use compatible AI clients to manage contacts, conversations, messages, templates, campaigns, and other supported features.

This guide walks you through connecting Wati MCP to Meta Muse and Gemini CLI using OAuth authentication. You can sign in with your existing Wati account without creating a new account or adding an API key to your configuration.

Note: The Wati MCP server is available to customers on Wati's Growth, Pro, and Business plans. If you're currently using a trial account, you can also enable and use the Wati MCP server during your trial period.

Instructions

Choose the AI client you want to connect to Wati and follow the steps in the corresponding section.

Use the MCP server URL that matches your Wati workspace region:

Workspace region

MCP server URL

Global

https://mcp.wati.io/mcp

EU

https://eu-mcp.wati.io/mcp

Part 1: Connect Wati MCP to Meta Muse

Availability: Meta Muse is currently available only in the United States and Canada. If you're outside these regions, connect Wati through Gemini CLI instead (see Part 2).

Connect Wati to Meta Muse directly from the Muse app. You'll sign in to your existing Wati account and authorize access through Wati's OAuth authentication flow.

Steps to connect

1. Open Connectors

  • Open the Muse app, go to Settings, and select Connectors.

2. Open custom connectors

  • Scroll to the Custom section and select Custom connectors.

3. Enter the Wati MCP server URL

  • On the Add custom connector screen, enter the MCP server URL for your workspace region from the table above.

4. Choose Wati

  • Your browser will open Wati's connection page. It will indicate that agent.meta.ai wants to connect to Wati and Astra. Select Wati and click Continue.

5. Sign in and authorize access

  • On the Wati sign-in page, sign in using your existing Wati account. Review the authorization request and approve access to complete the connection.

You don't need to create a new account or generate an API key.

6. Start using Wati in Muse

  • Once the connection is complete, ask Muse to perform supported tasks in your Wati workspace using natural language.

Part 2: Connect Wati MCP to Gemini CLI

You can connect Wati MCP to Google's Gemini CLI by adding the Wati server configuration to your Gemini CLI settings file. Gemini CLI uses OAuth to authenticate your Wati account through your browser.

Gemini CLI connects to MCP servers listed under mcpServers in your settings.json file. The wati entry uses httpUrl to reach the Wati MCP server over Streamable HTTP, and oauth.enabled lets Gemini CLI sign you in through your browser, so you don't need to add an API key to the file. Once you're authorized, Gemini CLI discovers the Wati tools available to your account. For more configuration options, see the Gemini CLI MCP server documentation.

Prerequisite

Install Gemini CLI before you begin. Follow the official Gemini CLI installation and setup guide.

Steps to connect

Tip: If you prefer not to edit JSON, run the following command in your terminal instead of steps 1 and 2, then continue from step 3:

gemini mcp add --transport http wati <https://mcp.wati.io/mcp>

For EU workspaces, use the EU URL from the table above.

1. Open the Gemini CLI settings file

  • Open ~/.gemini/settings.json in your preferred text editor.

    If the file doesn't exist, create it.

2. Add the Wati MCP server configuration

Under mcpServers, add the following configuration:

{
"mcpServers": {
"wati": {
"httpUrl": "https://mcp.wati.io/mcp",
"oauth": {
"enabled": true
}
}
}
}

For EU workspaces, use the EU URL from the table above.

If your settings file already contains other MCP servers, add the wati entry inside the existing mcpServers object. Keep the existing configuration intact and ensure the JSON syntax is valid.

3. Restart Gemini CLI

  • Close and restart Gemini CLI so it loads the updated configuration.

4. Sign in to Wati

  • When you first use the connection, Gemini CLI will open your browser to start the Wati OAuth sign-in flow. Sign in with your existing Wati account and approve the requested access.

5. Return to the terminal

  • Once authorization is complete, return to Gemini CLI and continue using the connected Wati server.

6. Authenticate again if needed

  • If you need to sign in again, run the following command in Gemini CLI:

/mcp auth wati

7. Verify the connection

  • Ask Gemini CLI to perform a simple task, such as:

List my Wati contacts.

If the connection and permissions are configured correctly, Gemini CLI should be able to retrieve the supported contact information from your Wati workspace.

What can you do with Wati MCP?

Depending on your workspace permissions, product plan, and enabled channels, you can use Muse or Gemini CLI to perform tasks such as:

  • Contacts: Search, list, add, and update contacts; manage contact attributes; view contact counts; and assign contacts to teams.

  • Conversations: Retrieve messages, manage tags and conversation status, assign conversations, and hand conversations over to an operator.

  • Messaging: Send text messages and files, use interactive buttons and lists, and send approved message templates.

  • Campaigns: Work with broadcasts, view campaign statistics, estimate sending costs, and check available credits.

  • Workspace setup: Manage supported segments, channels, webhooks, and message templates.

  • Instagram: Use supported Instagram workflows where the feature is enabled for your workspace.

Example prompts

After connecting Wati to either client, try asking:

  • "Find every conversation tagged billing from last week."

  • "Send the order_update template to contacts in the VIP Customers segment."

  • "How many contacts do we have?"

  • "Show me the latest messages in conversations assigned to my team."

These are examples of supported workflows. The actions available to you depend on your account and workspace configuration.

Troubleshooting and important notes

Keep the following points in mind when using Wati MCP with either client:

  • Available tools may vary: The tools available to your account are determined by the MCP server's tool list for your authenticated session.

  • Permissions still apply: Your Wati workspace role, product plan, and channel permissions determine which actions you can perform. A tool may be available but return a permission or plan-related error when you use it.

  • Use the correct server URL: Make sure you use the Global or EU endpoint that matches your Wati workspace.

  • Check your configuration: For Gemini CLI, confirm that the server entry is under mcpServers, the URL is correct, and the JSON syntax is valid.

  • Use a machine with a local browser (Gemini CLI): Gemini CLI opens a browser on the same machine to complete the Wati OAuth sign-in. This doesn't work over SSH or in headless environments, such as remote servers or containers. Run Gemini CLI on a machine with a browser to sign in.

  • Reauthenticate if necessary: If your session requires renewed authorization, run /mcp auth wati in Gemini CLI.

  • No API key is required: Both integrations use OAuth authentication, so you don't need to add a Wati API key to the connection configuration.

Related resources

Frequently Asked Questions (FAQs)

Wati MCP Integration FAQs

1. What is the Wati MCP server, and what can I use it for?

The Wati Model Context Protocol (MCP) server connects compatible AI clients, such as Meta Muse and Google's Gemini Command Line Interface (CLI), to your Wati workspace. You can use natural language to perform supported tasks, including searching contacts, managing conversations, sending approved message templates, viewing campaign statistics, and managing supported segments and webhooks. Available actions depend on your workspace permissions, product plan, and enabled channels.

2. Which Wati plans support MCP, and which AI clients can I use?

The Wati MCP server is available on the Growth, Pro, and Business plans. Trial accounts can also enable and use the server during the trial period. You can connect Wati to Meta Muse or Gemini CLI. Meta Muse is currently available only in the United States and Canada; customers outside these regions can use Gemini CLI.

3. Which Wati MCP server URL should I use?

Use the URL that matches your Wati workspace region:

  • Global: https://mcp.wati.io/mcp

  • EU: https://eu-mcp.wati.io/mcp

Use the appropriate regional URL when configuring your AI client.

Setup and Authentication

4. How do I connect Wati MCP to Meta Muse?

In the Muse app, go to Settings > Connectors > Custom connectors. Enter the Wati MCP server URL for your workspace region. When your browser opens Wati's connection page, select Wati, click Continue, sign in with your existing Wati account, and approve access. Once connected, you can use natural language to interact with your Wati workspace.

5. How do I connect Wati MCP to Gemini CLI?

First, install Gemini CLI. Then add the Wati MCP server to ~/.gemini/settings.json under mcpServers using the following configuration:

{
"mcpServers": {
"wati": {
"httpUrl": "https://mcp.wati.io/mcp",
"oauth": {
"enabled": true
}
}
}
}

For EU workspaces, replace the URL with https://eu-mcp.wati.io/mcp. Save the configuration and restart Gemini CLI. On first use, sign in to Wati through the browser and approve access.

Alternatively, add the server from your terminal using:

gemini mcp add --transport http wati https://mcp.wati.io/mcp

For EU workspaces, use the EU URL instead.

6. Do I need a Wati API key to connect an AI client?

No. Both Meta Muse and Gemini CLI use OAuth authentication. Sign in with your existing Wati account through the browser and approve access. You do not need to create a new Wati account or add an API key to your configuration.

Troubleshooting and Permissions

7. How do I verify or reauthenticate the Wati MCP connection in Gemini CLI?

To verify the connection, ask Gemini CLI, "List my Wati contacts." If you need to authenticate again, run:

/mcp auth wati

Complete the browser-based sign-in and approve access when prompted.

8. Why can't Gemini CLI complete Wati OAuth authentication over SSH or in a headless environment?

Gemini CLI opens a browser on the same machine where it is running to complete Wati's OAuth sign-in. This process does not work over SSH or in headless environments, such as remote servers or containers. Run Gemini CLI on a machine with a local browser to complete authentication.

9. Why does a Wati MCP action return an error or appear unavailable?

The tools and actions available depend on the Wati MCP tool list for your authenticated session, your workspace role, your product plan, and your enabled channel permissions. A tool may be available but return a permission or plan-related error when you use it. For Gemini CLI connection issues, also verify that the server URL matches your workspace region, the configuration is under mcpServers, the JSON syntax is valid, and OAuth is enabled.

Did this answer your question?