> 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/frends-development/agentic-ai/model-context-protocol.md).

# Model Context Protocol

Frends supports the **Model Context Protocol (MCP)**, an open standard that defines how AI agents discover and call external tools. In Frends, MCP works in both directions: you can expose your own Processes as MCP Tools for AI to call, and the Intelligent AI Connector can consume MCP Tools from both Frends and external sources.

<figure><img src="/files/oLJKi7Q49btzoVOF2JgW" alt=""><figcaption><p>MCP Trigger in action.</p></figcaption></figure>

## **Publishing Frends Processes as MCP Tools**

Any Frends Process can be published as an MCP Tool by adding the MCP Trigger shape to the Process. The Process logic itself does not need to change. Each Tool is given a name and a description that the AI reads to determine whether and when to call it — so writing a clear, accurate description is the most important part of the configuration. Tools can be built, versioned, and governed independently of the AI models that use them.

The Trigger also supports annotations that give the AI additional context about the nature of the Tool — for example, whether calling it has side effects or modifies state. Access to published Tools is controlled per shape, so each AI Connector only sees the Tools it has been explicitly permitted to use.

See the [MCP Trigger reference documentation](/reference/triggers/mcp-trigger.md) for full configuration details.

## **Consuming MCP Tools in the Intelligent AI Connector**

The Intelligent AI Connector becomes agentic when Tools are configured on it. It can connect to Tools published by Frends Agents in the same Environment, Tools published by Frends Agents in other Environments, or Tools exposed by any external MCP-compatible server. Once at least one Tool source is configured, the AI Connector retrieves the available Tool list and enters the reasoning loop rather than producing a single response.

<figure><img src="/files/PcWnKhypK6W3n7wccPp8" alt=""><figcaption><p>AI Connector with MCP Tools enabled.</p></figcaption></figure>

The AI Connector queries each configured MCP Server for its Tool list at the start of each agentic execution. From that point, the AI reasons over the available Tools and calls them as needed during the reasoning loop. The AI Connector does not pre-select Tools. The AI determines which Tool is appropriate based on the descriptions provided and the current state of the reasoning.


---

# 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/frends-development/agentic-ai/model-context-protocol.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.
