NicoChatNicoChatDocsSearch the docs…
Sign in
NicoChat MCP/Gemini CLI - Connect the MCP

Gemini CLI - Connect the MCP

Declare the server in settings.json with OAuth enabled and authenticate with the /mcp auth command.

2026-09-08

In Gemini CLI, the NicoChat server is declared in the settings.json file with HTTP transport and OAuth enabled. On the first session, the /mcp auth command opens the browser for authorization in NicoChat, and the token is stored locally for the next ones.

Before you start

  • Server URL: https://mcp.nicochat.com/mcp. It is the only information the client asks for; there is no API key to copy.
  • A NicoChat account with a workspace on a paid or trial plan, and you as its owner or admin.
  • Gemini CLI installed and authenticated (gemini opens in the terminal).

Step by step

1
Edit settings.json
Open ~/.gemini/settings.json (user configuration) or .gemini/settings.json at the project root (that project only). Add the block below under mcpServers.
2
Open Gemini CLI
Run gemini. Type /mcp to list the servers: NicoChat shows up asking for authentication.
3
Authenticate
Type /mcp auth nicochat. The browser opens the NicoChat authorization page. Log in, choose permissions and validity, and confirm.
4
Confirm
Back in the terminal, /mcp shows the server connected and the list of tools.
json
{
  "mcpServers": {
    "nicochat": {
      "httpUrl": "https://mcp.nicochat.com/mcp",
      "oauth": {
        "enabled": true
      }
    }
  }
}

You can also register it from the command line, without editing the file by hand:

bash
gemini mcp add --transport http nicochat https://mcp.nicochat.com/mcp

In that case, check that the generated block has oauth.enabled set to true; without it Gemini CLI does not start the authorization.

The authorization screen

Whatever the client, authorization happens in the browser, on the NicoChat page. You log in, choose the permissions (read and analytics is always granted; configuration, contacts, integrations and campaigns are optional) and the validity of the connection: 1, 7, 30 or 90 days, or no expiration. The tools the assistant sees depend on what you check here — to expand later, just reconnect.

Start with read only
On your first connection, grant only read and analytics and ask for a diagnosis of your channels. Once you are comfortable with what the assistant does, reconnect granting configuration or contacts.

First requests to try

Once connected, ask Gemini in plain language. A few examples that use read only:

  • "List my workspaces and the channels in each one."
  • "How many contacts came into the WhatsApp channel in the last 7 days, and what is the average first response time?"
  • "Summarize the structure of channel X: flows, triggers, AI agents and kanban boards."
  • "Which keywords are set up in channel X and where does each one lead?"

If you granted configuration, the assistant also creates flows, triggers, tags and AI agents. Everything it creates inside a flow stays as a draft until you publish it in NicoChat.

Disconnect or revoke

  • In the client: remove the nicochat block from settings.json, or run gemini mcp remove nicochat. The local token lives in ~/.gemini/mcp-oauth-tokens.json and can be deleted.
  • In NicoChat: under Account Settings, revoke the authorization. It takes effect immediately, even if the server is still registered in the client.

Common problems

Check that oauth.enabled is true and that the key used is httpUrl, not url. Then run /mcp auth nicochat.
Gemini CLI shows the authorization URL in the terminal. Open the URL on another device, authorize and paste the code back when it asks.
Copy the link the client shows and open it manually. If it shows no link at all, remove the server and add it again: the client registration in NicoChat is redone on first access.
That is expected when only the read permission was granted. Disconnect and connect again, checking the write permissions you need.
The server only works on workspaces on a paid or trial plan where you are the owner or admin. Check the plan and your role in the workspace in the NicoChat dashboard.
The validity you chose during authorization expired. Reconnect and, if you prefer, choose "no expiration".