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

> ## Agent Instructions
> Melso MCP: https://mcp.melso.ai/mcp (OAuth; one company per connection). Documentation-search MCP: https://docs.melso.ai/mcp; it does not act on customer accounts.
>
> Use the live tool list and respect company membership. Ask the person to approve the exact invoice or tax return version in the signed-in app. Melso's professionals prepare and file included returns after approval; an AI assistant does not file. A prepared file or an approval is not evidence of filing: only the AEAT's reference and receipt are. Keep credentials out of chat and logs.

# Connect Gemini CLI

> Add the Melso MCP server to Gemini CLI over HTTP and sign in with /mcp auth.

Gemini CLI adds Melso with one command and signs in from inside the CLI. This page covers Gemini CLI only; it does not describe the Gemini app.

<Card title="Add Melso to Gemini CLI" icon="terminal" href="#connect">
  Run `gemini mcp add --transport http melso https://mcp.melso.ai/mcp`, then `/mcp auth melso`.
</Card>

## Before you start

* Gemini CLI installed and signed in.
* A Melso account in the company you want Gemini CLI to use.

## Connect

<Steps>
  <Step title="Add the server">
    ```bash theme={null}
    gemini mcp add --transport http melso https://mcp.melso.ai/mcp
    ```

    The server is saved for the current project. Add `--scope user` to use it everywhere. Do not add `--trust`: it skips the confirmation prompt on every tool call.
  </Step>

  <Step title="Start Gemini CLI">
    Run `gemini` in the same project.
  </Step>

  <Step title="Sign in with Melso">
    ```text theme={null}
    /mcp auth melso
    ```

    Your browser opens Melso's OAuth screen. Choose the company and review the requested access.
  </Step>

  <Step title="Make the first read">
    Ask: **"Read my Melso company without changing anything."**
  </Step>
</Steps>

## Manual configuration

Add Melso to the `mcpServers` object in `settings.json` (`.gemini/settings.json` in a project, or `~/.gemini/settings.json`). Use `httpUrl` for Streamable HTTP; `url` selects the older SSE transport:

```json theme={null}
{
  "mcpServers": {
    "melso": {
      "httpUrl": "https://mcp.melso.ai/mcp"
    }
  }
}
```

## First request

Gemini CLI calls [`company`](/mcp/tools/company), as in [Try a first read](/mcp/connect#try-a-first-read). Then ask for your expenses or the tax calendar. Run `/mcp list` to see the Melso tools you were given; what you see depends on the plan, your role and setup ([Permissions and approvals](/mcp/permissions) and the [tool catalog](/mcp/tools)). Gemini CLI can draft invoices. It issues one only when the owner asks, through the owner's own connection, and the [prerequisites](/mcp/permissions#issuing-an-invoice) are met; otherwise the owner issues it in the Melso app. No tool approves, files or pays a tax return.

## Disconnect

* In Gemini CLI: `gemini mcp remove melso`.
* In Melso: **Configuración**, tab **MCP**, then **Desconectar** next to the connection.

## If something fails

* **Tokens expired.** Run `/mcp auth melso` again.
* **The server does not connect.** Check that the configuration uses `httpUrl`, not `url`.
* Other causes are in [Troubleshooting](/mcp/troubleshooting).

## Source and verification

The commands and configuration follow the [Gemini CLI MCP server guide](https://geminicli.com/docs/tools/mcp-server/), checked on 20 October 2026. This confirms the documented syntax, not a tested connection in your account.


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