> ## 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.

# Subir facturas desde Claude o ChatGPT — upload_files MCP

> MCP upload_files: open Melso's upload box in Claude or ChatGPT to send invoices, receipts and documents.

Open Melso's upload box in this chat: the person drops PDFs, photos or spreadsheets, and their browser sends them to Melso. Use it in Claude and ChatGPT whenever the person wants to send files, since their code tools cannot reach Melso's upload link; never ask them to paste a file's content. With purpose record the box says what each invoice or receipt became; with purpose upload its message gives one upload\_id per file to pass to documents save, gestiones upload\_complete, bank\_statements import or book\_imports import. Wait for the box's message before you go on.

**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 in Claude and ChatGPT whenever the person wants to send you files: their code tools cannot reach Melso's upload link. It opens Melso's upload box in the chat, where they drop PDFs, photos or spreadsheets and their browser sends them. Choose `purpose` `record` for invoices and receipts Melso should record, or `upload` to get an `upload_id` per file for `documents` `save`, `gestiones` `upload_complete`, `bank_statements` or `book_imports`. Then wait for the box's message. Only Claude and ChatGPT list it; other clients PUT the file to the `upload_url` an `upload` action returns. The box calls three more tools itself (`upload_files_start`, `upload_files_part`, `upload_files_finish`); never call them.

## Input

```json theme={null}
{
  "additionalProperties": false,
  "properties": {
    "note": {
      "description": "What the files are for, shown in the box, at most 120 characters (for example: invoices issued in 2026).",
      "type": "string"
    },
    "purpose": {
      "description": "record: Melso reads each invoice or receipt and records it as income or an expense, as expenses from_document does. upload: the box only uploads, for you to save, attach or import each file with its upload_id.",
      "enum": [
        "record",
        "upload"
      ],
      "type": "string"
    }
  },
  "required": [
    "purpose"
  ],
  "type": "object"
}
```

## Output

The open upload box: its `purpose`, `note`, the file types it accepts (`accept`) and `max_bytes`, with a `message` to wait for the person. When they have dropped the files, the box writes in the chat what each invoice or receipt became (`record`) or one `upload_id` per file (`upload`).

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

Record the receipts the person wants to send from Claude. These are the `arguments` of each call, in order.

**1. Open the upload box**

```json theme={null}
{
  "purpose": "record",
  "note": "Receipts from October"
}
```

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": "upload_files",
    "arguments": {
      "purpose": "record",
      "note": "Receipts from October"
    }
  }
}
JSON
```


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