> ## 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, with a company API key or a partner key (early access); invoicing is live and the other operations are marked beta.
>
> 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.

# Melso for gestorías over MCP

> Connect a gestoría's AI assistant to Melso: the firm's clients and obligations, and each client's books with the client argument.

A gestoría that works its clients in Melso's console can connect its own AI assistant to the same server, `https://mcp.melso.ai/mcp`. The connection works as the firm's staff work from the console: it reads and keeps the firm's clients and, in the client each call names, keeps that client's books. It never acts as the client.

The console itself is described in Spanish in [Melso para despachos](https://docs.melso.ai/es/despachos/consola.md).

## Connect the firm

**1. Add the server**

Add `https://mcp.melso.ai/mcp` to your client as a remote MCP server, as in [Connect your AI](https://docs.melso.ai/mcp/connect.md). There is no separate address for firms. A connection bound to a firm names its server `melso-gestoria`, titled «Melso para gestorías».

**2. Choose the firm at consent**

Sign in with your Melso account and choose your gestoría as the company on the OAuth screen. A connection bound to the firm gets the firm's tools below; a connection bound to one of your own companies gets that company's tools instead.

**3. List the clients**

Ask: **"List my Melso clients without changing anything."** The client calls [`clients_read`](https://docs.melso.ai/mcp/tools/clients-read) with `{"action": "list"}`, which returns the clients a page at a time. Each client's `id` is what every client tool takes as `client`.

The firm needs its payment method saved before its connection works: until then every call but `skills` answers with the link to the firm's billing, and nothing is charged until a month with clients ends. While the firm's monthly invoice is unpaid, the connection keeps its reads and refuses its writes. See [Alta del despacho](https://docs.melso.ai/es/despachos/alta.md) and [Precio y facturación](https://docs.melso.ai/es/despachos/precio.md).

## What the connection lists

| Tools | What they do |
| - | - |
| [`clients_read`](https://docs.melso.ai/mcp/tools/clients-read) | List and read the clients you work, with each one's fiscal profile, what it still misses, its digital certificates (never the file or its password) and its bank connection (`bank_status`). `import_read` reads a list of clients exported from another program without saving anything. No `client` argument. |
| [`clients`](https://docs.melso.ai/mcp/tools/clients) | Create and update the firm's clients, invite a client's owner, archive or unarchive a client (owner or admin), and import the new clients of a list once the professional agrees (`import_upload`, then `import`). An import contacts nobody. No `client` argument. |
| [`obligations`](https://docs.melso.ai/mcp/tools/obligations) | The portfolio's tax obligations and blockers, or one client's with `client`, and this month's payroll of every client that employs someone. |
| [`skills`](https://docs.melso.ai/mcp/tools/skills) | Melso's playbooks for firm work, the same for every firm. A client that shows MCP prompts, such as Claude Code, also offers each playbook as a prompt. No `client` argument. |
| The client tools | `contacts`, `invoices`, `payments`, `expenses`, `income`, `taxes`, `accounting`, `bank`, `bank_statements`, `book_imports`, `payroll`, `gestiones_read`, `documents` and `fiscal_profile`, with their `*_read` companions. Each one requires `client`. |

Each tool page says which actions a gestoría's connection lists. The list is the same for every client; a call to what one client lacks, such as a self-employed client's journal or a write on a client without a plan that includes the tools, answers why.

A client tool takes the same fields as on a company's own connection, plus `client`:

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "expenses_read",
    "arguments": {
      "client": "11111111-1111-4111-8111-111111111111",
      "action": "list"
    }
  }
}
```

`expenses` `batch` records several of a client's expenses in one call. Only a gestoría's connection lists it. `expenses` `upload` and `from_document` record a client's invoice or receipt from a file, and `expenses_read` `document_status` says what it became.

A connection authorized with the read-only scope `mcp:read` lists only the tools that read, here as on a company's connection. See [OAuth and scopes](https://docs.melso.ai/mcp/oauth.md#scopes).

## Who sees which clients

The firm's owner and admins work every client of the firm. A member works only the clients assigned to them in the console, and `clients_read` `list` returns only those. A call that names a client the person does not work is refused as if the client did not exist. Melso checks this on every call, so a change of assignment in the console applies at once. See [Tu equipo](https://docs.melso.ai/es/despachos/equipo.md).

## What a firm's connection never does

It never acts as the client. It does not issue, void or send for approval a client's invoices, and it does not request approval of, file or pay a client's tax returns: no MCP tool files a return. The firm's staff file a client's returns from the console, and only the administration's reference and receipt prove a filing. A client's `agent_authority`, which staff switch in the console, decides whether Melso's chat works in that client; it does not limit this connection. Saving a client's file writes to nobody; `clients` `invite_owner` returns a WhatsApp link that the professional sends the client.

Melso's own connections (`company`, `plans`, `connect_app`, `mcp_servers`, `upload_files`), `chat`, `chat_read` and `support_tickets_create` are not listed to a firm. Some client actions, such as `clients` `archive` or `accounting` `close`, run only after the professional confirms them; see [Two-step confirmation](https://docs.melso.ai/mcp/permissions.md#two-step-confirmation).

## Limits

Each connection makes at most 300 requests a minute and 8 at once, and the firm at most 1,200 a minute across all its people and connections, whichever clients they work. `initialize` and `tools/list` do not count. Past a limit, a call answers `429` with `Retry-After`: wait that long and retry. See [Rate limits](https://docs.melso.ai/mcp/reference.md#rate-limits).


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