MCP Servers

mcp-servers.md

Open your agent in the console and select Tools, then open the MCP Servers tab.

This page documents the MCP Servers tab. Related pages:

What an MCP Server does

An MCP Server connects Leilani to a remote Model Context Protocol server. During calls, the agent can use tools exposed by that server alongside built-in tools and custom Functions.

Use MCP Servers when a remote system already exposes tools through MCP and you want Leilani to call those tools directly.

Common uses:

  • retrieve records from an internal system
  • create tickets, notes, or follow-up tasks
  • search a remote knowledge system
  • run business workflows hosted outside Leilani

MCP Servers tab

The MCP Servers tab shows a table with these columns:

  • Name
  • URL
  • Tools
  • Headers
  • Description
  • Updated

Available actions:

  • Create
  • Edit
  • Delete

Create or edit an MCP Server

Select Create or Edit to open the MCP Server modal.

Name

Use a short, unique name for the server.

Requirements:

  • lowercase letters
  • digits
  • underscores

Examples:

  • acme_files
  • crm_tools
  • support_ops

This name becomes the MCP server label exposed to the model.

URL

URL is the MCP endpoint Leilani connects to.

Supported schemes:

  • https
  • http

Use HTTPS for production unless you have a controlled internal reason not to.

Example:

https://example.com/mcp

Description

Description is optional guidance for when and how the agent should use the MCP server.

Use it to explain the server's domain, the data it can access, and any important usage boundaries.

Good examples:

  • Use this server for CRM account lookup and support ticket creation.
  • Use only for policy document search, not for customer account changes.

Tool Allowlist

Tool Allowlist limits which MCP tools Leilani exposes from the server.

Enter one tool name per line.

If the allowlist is empty, Leilani does not add an allowed_tools restriction for that server.

Use an allowlist when:

  • the server exposes tools Leilani should not call
  • only a small subset is relevant to callers
  • you want a narrower and easier-to-audit tool surface

Headers

Headers are sent when Leilani initializes the MCP server connection.

Use headers for static authentication tokens, tenant IDs, environment routing, or other server-required metadata.

Header names must be valid lowercase HTTP header names.

OAuth behavior

When you create an MCP Server, Leilani checks whether the server requires authorization.

If the server does not require OAuth, creation finishes without extra user action.

If OAuth is required, Leilani opens the authorization page in a new browser tab. Complete the provider's authorization flow, then return to Leilani.

Leilani uses the resulting authorization for future calls and refreshes it automatically when supported by the provider.

How MCP Servers behave during a call

When a call starts, each configured MCP Server is available to the agent.

Leilani sends:

  • the server label
  • the server URL
  • the optional server description
  • the optional allowed tools list
  • configured headers
  • authorization when one is available

MCP tool approval is configured as never, so callers are not asked to approve each individual MCP tool call during the voice interaction.

Best practices

  • use one MCP Server entry per remote MCP endpoint
  • name servers by purpose, not by vendor alone
  • keep descriptions operational and specific
  • allowlist only the tools the voice agent should actually use
  • avoid broad write-capable tool surfaces unless the instructions require confirmation first
  • use HTTPS for production MCP servers
  • treat static authorization headers as sensitive configuration

Limitations and notes

  • MCP server URLs must use http or https.
  • Some MCP OAuth flows may fail if the provider does not support Leilani's authorization setup.
  • Editing an MCP Server updates its URL, description, tool allowlist, and headers, but does not automatically restart OAuth in the current UI. Delete and recreate the server when you need to run OAuth setup again.