> ## 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. Melso API: https://api.melso.ai/v1, invoicing only, with a company API key.
>
> 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.

# Conectar Gmail u Outlook — connect_app MCP

> MCP connect_app: ask the person to connect the mailbox where their invoices arrive. They connect it in the web app.

Ask the person to connect one of their apps to Melso, such as gmail or outlook, where Melso finds their invoices and its agent works for them in its chat. It returns url: the person opens it in Melso's web app, signed in, and connects the app there; an app already connected answers already\_connected. Pass another\_account only to add a different account.

**Availability:** Autónomo / Empresa.

The live tool list is authoritative: the company's plan and your role can narrow this contract. [Understand access](https://docs.melso.ai/mcp/permissions.md).

## When to use

Use it when the person wants Melso to find their invoices and receipts in their mailbox: pass `gmail` or `outlook` as `toolkit_slug` and give them the returned `url`. They connect the app in Melso's web app, signed in; no tool connects it for them. It is listed once an autónomo's setup is done and the company has a plan.

## Input

```json theme={null}
{
  "additionalProperties": false,
  "properties": {
    "another_account": {
      "description": "Ask although they have an account of this app: a different account, or one to connect again.",
      "type": "boolean"
    },
    "toolkit_slug": {
      "description": "App toolkit slug, such as gmail or google_search_console.",
      "type": "string"
    }
  },
  "required": [
    "toolkit_slug"
  ],
  "type": "object"
}
```

## Output

For an app the person already has, `already_connected` with its `accounts`. Otherwise a `url` the person opens in Melso's web app, signed in, to connect the app; the same request also waits on their Home, and asking again returns it.

The result uses MCP `content` blocks; JSON payloads are encoded in text and may also appear in `structuredContent`. Check `isError` before reading a success payload. When the server declares an `outputSchema`, it is reproduced below. Check the action result and its declared fields before reporting success.

## Example

Ask the person to connect the Gmail where their invoices arrive. These are the `arguments` of each call, in order.

**1. Get the link to connect Gmail**

```json theme={null}
{
  "toolkit_slug": "gmail"
}
```

The first call as a request. Use an OAuth access token issued for this MCP resource and replace the example identifiers with values from your own company.

```bash theme={null}
curl --fail-with-body https://mcp.melso.ai/mcp \
  -H "Authorization: Bearer $MELSO_MCP_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  --data-binary @- <<'JSON'
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "connect_app",
    "arguments": {
      "toolkit_slug": "gmail"
    }
  }
}
JSON
```


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