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

# mcp_servers MCP

> MCP mcp_servers: add or remove a remote MCP server for Melso's own chat. The person signs in on the web app.

Add a remote MCP server by its https URL for Melso's own agent to use in its chat, not this client. connect returns the url where the person signs in to it in Melso's web app; never ask for an API key, token or client secret. Actions (\* required): add(name\*, url); connect/delete(server\*).

**Availability:** Self-employed / Company.

These servers are for Melso's own chat. They add no tool to the client that calls this one.

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 `mcp_servers` for `add`, `connect`, `delete`. Use [`mcp_servers_read`](https://docs.melso.ai/mcp/tools/mcp-servers-read) for the companion actions. The live tool list determines availability.

## Input

```json theme={null}
{
  "additionalProperties": false,
  "oneOf": [
    {
      "additionalProperties": false,
      "properties": {
        "action": {
          "const": "add"
        },
        "name": {
          "description": "The name the person knows it by, such as Linear, or Holded or Qonto for a server Melso offers.",
          "type": "string"
        },
        "url": {
          "description": "The server's public https URL, such as https://mcp.linear.app/mcp, with no query string. Leave it out for a server Melso offers: Holded or Qonto.",
          "type": "string"
        }
      },
      "required": [
        "action",
        "name"
      ],
      "type": "object"
    },
    {
      "additionalProperties": false,
      "properties": {
        "action": {
          "const": "connect"
        },
        "server": {
          "description": "The server's id, or its name as list shows it.",
          "type": "string"
        }
      },
      "required": [
        "action",
        "server"
      ],
      "type": "object"
    },
    {
      "additionalProperties": false,
      "properties": {
        "action": {
          "const": "delete"
        },
        "server": {
          "description": "The server's id, or its name as list shows it.",
          "type": "string"
        }
      },
      "required": [
        "action",
        "server"
      ],
      "type": "object"
    }
  ],
  "properties": {
    "action": {
      "enum": [
        "add",
        "connect",
        "delete"
      ],
      "type": "string"
    },
    "confirmation_token": {
      "type": "string"
    },
    "name": {
      "description": "The name the person knows it by, such as Linear, or Holded or Qonto for a server Melso offers.",
      "type": "string"
    },
    "server": {
      "description": "The server's id, or its name as list shows it.",
      "type": "string"
    },
    "url": {
      "description": "The server's public https URL, such as https://mcp.linear.app/mcp, with no query string. Leave it out for a server Melso offers: Holded or Qonto.",
      "type": "string"
    }
  },
  "required": [
    "action"
  ],
  "type": "object"
}
```

## Actions

The tool's schema combines the fields of every action. Each action accepts only its own fields below; send `action` with them.

### Connection actions

These actions add, sign in to or remove a server Melso's own chat uses. The person signs in on the link in Melso's web app; never ask them for an API key or token.

> [accordion] add
>
> Check a remote MCP server's https URL as the web's Add server form does and save it for the company under name, or add a server Melso offers by its name alone. A server that needs sign-in answers the link where the owner or an admin signs in.
>
> ```json theme={null}
> {
>   "additionalProperties": false,
>   "properties": {
>     "name": {
>       "description": "The name the person knows it by, such as Linear, or Holded or Qonto for a server Melso offers.",
>       "type": "string"
>     },
>     "url": {
>       "description": "The server's public https URL, such as https://mcp.linear.app/mcp, with no query string. Leave it out for a server Melso offers: Holded or Qonto.",
>       "type": "string"
>     }
>   },
>   "required": [
>     "name"
>   ],
>   "type": "object"
> }
> ```

> [accordion] connect
>
> Give the link where the owner or an admin signs in to a server that needs it. A server signed in, or without sign-in, answers ready.
>
> ```json theme={null}
> {
>   "additionalProperties": false,
>   "properties": {
>     "server": {
>       "description": "The server's id, or its name as list shows it.",
>       "type": "string"
>     }
>   },
>   "required": [
>     "server"
>   ],
>   "type": "object"
> }
> ```

> [accordion] delete
>
> Remove a server from the company; the chat stops using its tools.
>
> ```json theme={null}
> {
>   "additionalProperties": false,
>   "properties": {
>     "server": {
>       "description": "The server's id, or its name as list shows it.",
>       "type": "string"
>     }
>   },
>   "required": [
>     "server"
>   ],
>   "type": "object"
> }
> ```

## Output

`add` returns the saved server; one that needs sign-in also returns the link where the owner or an admin signs in. `connect` returns that link, or `ready` for a server already signed in or without sign-in. `delete` removes the server, and Melso's chat stops using its tools.

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

Use the actions of this tool in the order shown; its companion tool covers the other actions. These are the `arguments` of each call, in order.

**1. Add a server by its URL**

```json theme={null}
{
  "action": "add",
  "name": "Example CRM",
  "url": "https://mcp.example.com/mcp"
}
```

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": "mcp_servers",
    "arguments": {
      "action": "add",
      "name": "Example CRM",
      "url": "https://mcp.example.com/mcp"
    }
  }
}
JSON
```


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