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 advanced programming knowledge. Each tool call from your AI agent is represented as a separate n8n workflow.
Step 1: Create the MCP server workflow
Open your n8n instance and create a new workflow.
Select the following as the trigger node MCP Server Trigger.
n8n automatically generates a webhook URL for your MCP server — note it down, you will need it later in sipgate.
Tip: Secure your MCP server workflow with a token as well. To do this, enable Bearer or header authentication in the MCP Server Trigger and assign a token. This ensures that only sipgate can communicate with your server.
Step 2: Define tools as workflows
A tool is a single capability your AI agent can use during the conversation, such as looking up a customer number, checking availability, or booking an appointment. Each tool corresponds to exactly one n8n workflow: the agent decides during the conversation when it needs a tool, and n8n executes the underlying logic.
Each tool that your AI agent should use is created as a separate workflow:
Create a new workflow for each tool.
Also use the MCP Server Trigger as the entry point.
Build the desired logic behind it: database queries, API calls, calculations.
Return a structured result at the end of the workflow that the AI agent can use.
Step 3: Store tool descriptions in n8n
So the AI agent knows when to use which tool, you need to add descriptions in n8n:
Tool name: Give it a unique, descriptive name — maximum 28 characters.
Tool description: Explain in 1–2 sentences what the tool does and when it should be used.
Parameter descriptions: Describe each parameter: what is expected, in what format, and whether it is optional.
Example of a good tool description:
“Returns the customer’s full name and customer number. Input: phone number in the format +49…”
Step 4: Add the MCP server in sipgate
Copy the webhook URL of your n8n MCP workflow.
Open your AI agent in app.sipgate.com → Integrations → Live call functions → Add.
Enter the URL. If you have assigned a token in n8n, enter it in the Token (optional) field.
Save. sipgate checks the connection and shows you the recognized tools.
Test the MCP server
Before using the AI agent in production, we recommend the following tests:
Check connection status: Open the Live Call Functions overview in sipgate and refresh the connection to the MCP server. If all tools are loaded, the connection was successful.
Manual test calls: Trigger the playbook manually and check in n8n whether the workflows are called correctly and the responses are correct.
Check server logs: Check the n8n execution logs to see whether requests are coming in and whether errors occurred.
Error handling: Make sure your workflow returns a clear error message in case of failure — the AI agent uses this to adjust its behavior.
Best practices
Use n8n for deterministic tasks: retrieve data, write data, calculate.
Leave the AI agent nondeterministic decisions: what it does, in what order, how it responds.
Validate all incoming parameters server-side — the AI agent does not always provide exactly what you expect.
Return clean, structured responses. Unclear returns lead to unreliable agent behavior.
Last updated

