> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rallied.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP Servers

> Connect any custom tool server to extend your agent's capabilities beyond built-in integrations.

MCP (Model Context Protocol) servers let you connect tools that aren't available as built-in integrations. Any server that implements the Model Context Protocol can be connected to Rallied.ai — the agent discovers the tools it exposes automatically and can use them in the same way it uses any other tool.

Common use cases include:

* Internal APIs and custom business systems
* Proprietary tools specific to your MSP
* Third-party services not yet in the built-in integration catalog

## How to connect an MCP server

<Steps>
  <Step title="Open the Integrations tab">
    Navigate to **MSP Settings → Integrations**.
  </Step>

  <Step title="Add an MCP server">
    Click the **Add MCP Server** button in the top-right corner of the page.
  </Step>

  <Step title="Enter the server URL">
    Paste the full URL of your MCP server endpoint (e.g. `https://tools.yourcompany.com/mcp`).
  </Step>

  <Step title="Complete authentication">
    Rallied.ai probes the server to detect what authentication it requires:

    <Tabs>
      <Tab title="OAuth">
        If the server uses OAuth, you are redirected to an authorization flow. Complete the authorization in your browser. The token is stored securely and passed to the server at runtime.
      </Tab>

      <Tab title="Bearer token">
        If the server uses Bearer token authentication, a field appears asking for your token. Enter it and click **Save**. The token is stored securely.
      </Tab>

      <Tab title="No authentication">
        If the server requires no authentication, the connection completes immediately after the probe succeeds.
      </Tab>
    </Tabs>
  </Step>

  <Step title="Tools are synced automatically">
    Rallied.ai fetches the tool list from your MCP server and adds all discovered tools to the agent's catalog. Default policies are seeded automatically based on each tool's name and description. The server shows as connected and the agent can start using the tools immediately.
  </Step>
</Steps>

## Authentication types

| Type             | How it works                                                                                                                         |
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| **OAuth (PKCE)** | Rallied.ai initiates an OAuth PKCE authorization flow. You complete the login in your browser. The token is refreshed automatically. |
| **Bearer token** | You provide a static token. It is stored securely and sent in the `Authorization: Bearer` header on every request.                   |
| **None**         | No authentication is required. The server accepts requests directly.                                                                 |

## Managing tools from MCP servers

Tools from custom MCP servers appear in the agent's tool catalog alongside built-in integration tools. You manage their policies the same way:

* Open the MCP server's detail page from **MSP Settings → Integrations**
* Find the tool by name (MCP tools are prefixed with `mcp:<server-name>:`)
* Set the permission to **Auto**, **Approval needed**, or **Disabled**

Tools that look like read operations (`get`, `list`, `search`, `fetch`) are seeded with **auto** by default. Tools that look like write operations (`create`, `update`, `delete`, `send`) are seeded with **approval needed** by default. You can override any of these defaults.

## Managing multiple MCP servers

You can connect multiple MCP servers. Each server's tools appear in the catalog independently. If two servers expose a tool with the same name, the agent uses them as separate tools distinguished by their server prefix.

To disconnect an MCP server, open **MSP Settings → Integrations**, find the server in the list, and click **Disconnect**. This removes the server's tools from the agent's catalog and deletes the associated policies.
