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

# company

> When to use the company MCP tool, its input, actions, output and a worked example.

Read the company this connection works in: its name, its kind (freelancer for an autónomo, company for an empresa), the share of its Melso plan used when it has one, and onboarding while an autónomo's setup is pending. Read it first to confirm the company.

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

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

## When to use

Call it first on every new connection, before any other tool. It names the one company the connection works in and says whether it is an autónomo (`freelancer`) or an empresa (`company`). If the answer carries `onboarding`, the autónomo's setup is still pending and the connection lists only `company`, `fiscal_profile` and `support_tickets_create`.

## Input

```json theme={null}
{
  "additionalProperties": false,
  "properties": {},
  "type": "object"
}
```

## Output

A JSON object with `name`, `kind` (`freelancer` for an autónomo, `company` for an empresa) and, when the company has a plan, its `plan` usage. `onboarding` appears while an autónomo's setup is pending. It carries no instructions, credits or capabilities.

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. The server does not declare an `outputSchema`, so rely on the fields named here and in the live result.

## Example

Confirm the company before anything else. These are the `arguments` of each call, in order.

<Steps>
  <Step title="Read the company">
    ```json theme={null}
    {}
    ```
  </Step>
</Steps>

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. Write actions change data.

```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": "company",
    "arguments": {}
  }
}
JSON
```


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