> For the complete documentation index, see [llms.txt](https://docs.frends.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.frends.com/reference/triggers/mcp-trigger.md).

# MCP Trigger

In order to expose a Frends Process as a callable tool for AI agents and Large Language Models (LLMs), MCP Trigger can be used.&#x20;

You can learn more about Triggers in general [here](/reference/shapes/event-shapes/trigger.md).&#x20;

<figure><img src="/files/5T82yb3ZwdHnmIabWr8n" alt=""><figcaption><p>MCP Trigger in Frends Process Editor.</p></figcaption></figure>

## What is MCP Trigger?

The MCP Trigger exposes a Frends Process as a callable Tool for AI agents and Large Language Models (LLMs) using the [Model Context Protocol](https://modelcontextprotocol.io/) (MCP). MCP is an open standard for AI-to-application communication, functioning as a universal interface between AI systems and the services they interact with. When a Process uses an MCP Trigger, it becomes discoverable and executable by any MCP-compatible AI client — without requiring custom API wrappers or bespoke integrations.

Each Frends Agent acts as an independent MCP Server, hosting an endpoint at `/mcp` by default. The endpoint accepts JSON-RPC requests over HTTPS, and AI clients interact with it using the standard MCP methods `tools/list` and `tools/call`. When an AI client calls `tools/list`, Frends returns only the Tools the authenticated client is authorized to access. When the client calls `tools/call` with a Tool name and input arguments, Frends executes the corresponding Process and returns the result.

## Usage

To use a Trigger in your Process, add it to your Process canvas, and connect it to the beginning of your Process using a Sequence flow. If you are using multiple Triggers in your Process, all Triggers must connect to the same shape, which is also the first non-Trigger shape in your Process.

Once added to your Process, you can change the Trigger's type to match your requirement and give it a unique name. By default, the Trigger's type will provide a corresponding name for the Trigger. You can then configure the parameters for the chosen Trigger type.

For the MCP Trigger, you should define a `name` and a `description` for the tool, and optionally provide an `inputSchema` and `outputSchema` to describe the data the tool accepts and returns. Once the Process is activated, the Frends Agent exposes it as a callable MCP tool at its `/mcp` endpoint. Any MCP-compatible AI client that has been granted access through an API Policy can then discover and invoke the Process as a tool.

### Authentication

Every external AI client must authenticate before calling the `/mcp` endpoints (`tools/list` or `tools/call`). Authentication is done using a token that contains the `mcp_tools` claim.&#x20;

For usage in AI Connectors in Processes within the same Frends Agent Group, the authentication is bypassed as the tool call is made using internal connectivity, rather than over network.

#### **Which Tools can a client access?**

The **Private Application** or **OAuth Application** used to issue the token determines which MCP Tools the client is allowed to access. As a result, `tools/list` only returns the Tools that the authenticated client has been granted permission to use.

#### **Granting Tool access**

When issuing tokens through a Private Application in Frends, the token must include an `mcp_tools` claim. This claim defines which MCP Tools are visible and callable by the token holder.

Supported value formats:

| Value format        | Example                          | Meaning                                        |
| ------------------- | -------------------------------- | ---------------------------------------------- |
| Wildcard string     | `"*"`                            | Grants access to **all** MCP Tools             |
| Single tool name    | `"tool_name_here"`               | Grants access to exactly **one** specific Tool |
| Array of tool names | `["tool_name_1", "tool_name_2"]` | Grants access to **multiple** specific Tools   |

Example token claim payload fragment:

```
{
  "sub": "ai-client-1",
  "mcp_tools": ["tool_name_1", "tool_name_2"]
}
```

## Configuration

To set up an MCP Trigger, add the shape to your Process canvas and connect it as part of your Process. After that, you can select the Trigger type and configure the parameters for it.

The common parameters available for all Triggers are explained on the [Trigger reference page](https://docs.frends.com/reference/shapes/event-shapes/trigger#configuration). The following configuration parameters are available for MCP Trigger. Well-written names and descriptions are important because AI agents use them to decide which tool to call and how to use it.

### Name

The `name` field is the unique identifier for the tool. It is used as the tool name in `tools/list` and `tools/call` responses, and as the target endpoint identifier in the associated API Policy.&#x20;

The name must be unique across all activated Processes in the Tenant. Process Editor validates this in real time and marks the Trigger with an error if a duplicate is detected.

### Title

The `title` field is an optional, human-readable display name for the tool. It is shown to AI clients and users in contexts where a friendlier label is preferable to the identifier in `name`.

### Description

The `description` field explains what the tool does in plain language. While optional, a clear and accurate description significantly improves how reliably AI agents select and invoke the tool. A vague or missing description can cause AI clients to call the wrong tool or fail to call the right one.

### Input Schema

The `inputSchema` field defines the parameters the tool accepts, expressed as a [JSON Schema](https://json-schema.org/) object. When an `inputSchema` is defined, the Process Editor provides IntelliSense and autocomplete for `#trigger.data.body.*` variable references throughout the Process.

An example `inputSchema` for a tool that creates a CRM lead:

```json
{
  "type": "object",
  "properties": {
    "fullName": {
      "type": "string",
      "description": "The full name of the new lead"
    },
    "email": {
      "type": "string",
      "description": "The email address of the new lead"
    }
  },
  "required": ["fullName", "email"]
}
```

Another example to expect no input parameters for the tool:

```json
{
    "type": "object",
    "properties": {}
}
```

### Output Schema

The `outputSchema` field defines the structure of the data returned by the Process, also as a JSON Schema object. It is optional, but when provided it enables the **Create Return Shape** button in the Process Editor. Clicking this button automatically generates a return shape template populated with sample data derived from the schema, removing the need to map response fields manually.

Example `outputSchema` that returns a single plain string:

```json
{
    "type": "string"
}
```

More complex `outputSchema` to return an object with `count` field for number of `results`, as well as the result objects as array:

```json
{
  "type": "object",
  "properties": {
    "count": {
      "type": "integer"
    },
    "results": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id":   { "type": "string" },
          "name": { "type": "string" }
        }
      }
    }
  }
}
```

### Annotations

Annotations are optional hints that inform AI clients about the behavioral characteristics of the tool. They do not affect how Frends executes the Process, but they help AI agents make better decisions about when and how to call a tool.

Each annotation can be individually set to be Yes or No for the Trigger.

The available annotations are:

`readOnly` signals that the tool only reads data and never modifies or deletes anything. AI clients can treat such tools as safe to call freely.

`destructive` warns that the tool may modify or delete data. AI clients that respect this hint may prompt the user for confirmation before calling the tool.

`idempotent` signals that calling the tool multiple times with the same inputs produces the same result. AI clients can safely retry an idempotent tool if a call fails or times out.

`openWorld` indicates that the tool may return fields beyond what is described in `outputSchema`. AI clients should not assume the output is exhaustively defined by the schema.

### Do not log trigger parameters

Toggle option that when enabled, hides the Trigger parameters from being logged in Process Instances.&#x20;

## Reference Values

In addition to the [default Trigger reference values](https://docs.frends.com/reference/shapes/event-shapes/trigger#reference-values), MCP Trigger provides the following additional values.

### #trigger.data (Frends.ExecutableProcess.CaseInsensitivePropertyTree)

Object containing the data provided by the AI client when calling the tool, including the tool name and its input arguments.

### #trigger.data.tool (String)

The name of the tool that was called by the AI client, as specified in the `tools/call` request. This corresponds to the `name` field configured on the MCP Trigger.

### #trigger.data.arguments (Object)

The input arguments passed by the AI client in the `tools/call` request. Each property on the object corresponds to a named argument. For example, if an AI client calls the tool with `fullName = "Jane"` and `email = "jane@example.com"`, then `#trigger.data.arguments.fullName` resolves to `"Jane"` and `#trigger.data.arguments.email` resolves to `"jane@example.com"`.

If an `inputSchema` is defined, the Process Editor provides autocomplete for all property names declared in the schema when typing `#trigger.data.arguments.`.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.frends.com/reference/triggers/mcp-trigger.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
