> ## 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 Claude Code

> Add the Melso MCP server to Claude Code with one command and sign in through OAuth from /mcp.

Claude Code adds Melso from the terminal. The command writes the server configuration; you sign in with Melso afterwards from inside Claude Code.

<Card title="Add Melso to Claude Code" icon="terminal" href="#connect">
  Run `claude mcp add --transport http melso https://mcp.melso.ai/mcp`, then `/mcp` to sign in.
</Card>

## Before you start

* Claude Code installed and signed in.
* A Melso account in the company you want Claude Code to use.

## Connect

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

    Claude Code prints an `Added ...` line when the configuration is saved. Add `--scope project` or `--scope user` if you want the server in a project file or in every project.
  </Step>

  <Step title="Open the MCP panel">
    Start Claude Code and run:

    ```text theme={null}
    /mcp
    ```
  </Step>

  <Step title="Sign in with Melso">
    Select `melso` and authenticate. Your browser opens Melso's OAuth screen: choose the company and review the requested access. If the browser does not open, copy the URL Claude Code shows.
  </Step>

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

Do not add an `Authorization` header or paste a token. Claude Code stores and refreshes the OAuth token itself. Keep its tool confirmation prompts on for actions that change records.

A non-interactive run (`claude -p`) cannot open the sign-in flow. Sign in once from an interactive session first, with `/mcp`.

## First request

The client calls [`company`](/mcp/tools/company), as in [Try a first read](/mcp/connect#try-a-first-read). Then try the calendar: [`taxes`](/mcp/tools/taxes) with `{"action": "calendar"}` lists what the company files and when. The [tool catalog](/mcp/tools) shows every tool; the list you get depends on the plan, your role and setup, as [Permissions and approvals](/mcp/permissions) explains. Claude Code 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 Claude Code: `claude mcp remove melso`. Claude Code also deletes the OAuth tokens it stored. To keep the server but sign out, use **Clear authentication** in the `/mcp` menu.
* In Melso: **Configuración**, tab **MCP**, then **Desconectar** next to the connection.

## If something fails

* **`claude mcp list` says Melso needs authentication.** Run `/mcp` and authenticate Melso.
* **The add command fails because the name exists.** Melso is already configured in that scope. Run `claude mcp get melso` to check its URL.
* Other causes are in [Troubleshooting](/mcp/troubleshooting).

## Source and verification

The command and sign-in steps follow the [Claude Code MCP guide](https://code.claude.com/docs/en/mcp), 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.