> For the complete documentation index, see [llms.txt](https://help.sipgate.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.sipgate.com/documentation/en/connections-and-integrations/mcp-server-mit-n8n.md).

# MCP server with n8n

## How do I set up an MCP server with n8n?

n8n is a workflow automation platform that lets you build an MCP server without deep programming knowledge. Every tool call of your agent is mapped as a separate n8n workflow.

{% hint style="info" %}
**Prerequisite:** A running n8n instance, self-hosted or n8n Cloud, as well as basic knowledge of the n8n interface. Connecting your own tools is available from the Scale plan onwards. More on this under [Plans & pricing](/documentation/en/plans-and-pricing/sipgate-sona-tarife-and-kosten.md).
{% endhint %}

If you want to connect monday.com or commercetools, you don't need your own MCP server with sipgate sona. For that there are [ready-made playbooks](/documentation/en/behavior/playbooks.md#playbooks-aus-der-bibliothek) from the library.

***

### Step 1: Create MCP server workflow

1. Open your n8n instance and create a new workflow.
2. Select the **MCP Server Trigger**.
3. as the trigger node. n8n automatically generates a webhook URL for your MCP server – make a note of it, you will need it later in sipgate.

{% hint style="warning" icon="lightbulb" %}
**Tip:** Also secure your MCP server workflow with a token. To do this, enable bearer or header authentication in the MCP Server Trigger and assign a token. This way only sipgate can communicate with your server.
{% endhint %}

***

### Step 2: Define tools as workflows

A tool is a single capability that your agent uses during the conversation, such as looking up a customer number, checking availability, or booking an appointment. Each tool corresponds to exactly one n8n workflow: your agent decides during the conversation when it needs a tool, and n8n executes the underlying logic.

Each tool your agent should use is created as an independent workflow:

1. Create a new workflow for each tool.
2. Also use the **MCP Server Trigger** as the entry point.
3. Build the desired logic behind it: database queries, API calls, calculations.
4. Return a structured result at the end that your agent can use.

{% hint style="warning" icon="lightbulb" %}
**Tip:** Keep each workflow focused on a single, clearly defined task. Simple, deterministically operating workflows are more reliable than complex branches.
{% endhint %}

***

### Step 3: Store tool descriptions in n8n

So that your agent knows when to use which tool, you must store descriptions in n8n:

* **Tool name:** unambiguous and descriptive, maximum 28 characters
* **Tool description:** one to two sentences about what the tool does and when it should be used
* **Parameter descriptions:** what is expected, in what format, and whether the parameter is optional

**Example of a good tool description:**

> "Returns the full name and customer number of a customer. Input: telephone number in the format +49…"

***

### Step 4: Store MCP server in sipgate

1. Copy the webhook URL of your n8n MCP workflow.
2. Open the agent overview, click on your agent and select **Tools**. Click on **Add tool**.
3. Enter the URL. If you assigned a token in n8n, enter it in the field **Token** .
4. Save. sipgate checks the connection and displays the detected tools.

***

### Test MCP server

Before using your agent productively, we recommend these tests:

* **Check connection status.** Open the tools overview in sipgate and click **Refresh**. If all tools load, the connection is established.
* **Manual test calls.** Trigger the playbook and check in n8n whether the workflows are called correctly and the responses are correct.
* **Check server logs.** Look in the n8n execution logs to see whether requests are arriving and whether errors have occurred.
* **Error handling.** Make sure your workflow returns a comprehensible error message in case of an error. Your agent uses it to adjust its behavior.

{% hint style="info" %}
**Tip:** Formulate error messages so that your agent can infer what went wrong and whether it should try again.
{% endhint %}

***

### Best practices

* Use n8n for **deterministic tasks**: retrieve, write, calculate data.
* Leave **non-deterministic decisions**to the AI agent: what it does, in what order, how it responds.
* Validate all incoming parameters server-side. Your agent doesn't always pass exactly what you expect.
* Return clean, structured responses. Unclear returns lead to unreliable agent behavior.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.sipgate.com/documentation/en/connections-and-integrations/mcp-server-mit-n8n.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
