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

> Add the Melso MCP server to Codex with codex mcp add and sign in with codex mcp login.

Codex adds Melso from the terminal or from its configuration file. Codex documents no install link, so setup is two commands.

<Card title="Add Melso to Codex" icon="terminal" href="#connect">
  Run `codex mcp add melso --url https://mcp.melso.ai/mcp`, then `codex mcp login melso`.
</Card>

## Before you start

* The Codex CLI installed and signed in.
* A Melso account in the company you want Codex to use.

## Connect

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

  <Step title="Sign in with Melso">
    ```bash theme={null}
    codex mcp login melso
    ```

    Your browser opens Melso's OAuth screen. Choose the company and review the requested access.
  </Step>

  <Step title="Check the server">
    Run `codex mcp list`, or `/mcp` inside Codex, and check that `melso` is listed.
  </Step>

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

## Manual configuration

Add a table to `~/.codex/config.toml`, or to a project's `.codex/config.toml`, then run `codex mcp login melso`:

```toml theme={null}
[mcp_servers.melso]
url = "https://mcp.melso.ai/mcp"
```

Do not set `bearer_token_env_var` or headers for Melso. The OAuth login stores the credential.

## First request

Codex 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"}`. The [tool catalog](/mcp/tools) lists every tool, and each page shows its input schema; what you see depends on the plan, your role and setup ([Permissions and approvals](/mcp/permissions)). Check `result.isError` before relying on a result, as [Read MCP results](/mcp/results) explains. Codex 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 Codex: delete the `[mcp_servers.melso]` table from `config.toml`. `codex mcp --help` lists the other MCP commands for your version.
* In Melso: **Configuración**, tab **MCP**, then **Desconectar** next to the connection.

## If something fails

* **Tools fail with an authentication error.** Run `codex mcp login melso` again.
* Other causes are in [Troubleshooting](/mcp/troubleshooting).

## Source and verification

The commands and configuration follow the [Codex MCP guide](https://developers.openai.com/codex/mcp), which now opens at `learn.chatgpt.com`. It was 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.