Skip to main content

Create an MCP connection in n8n

Learn how to connect 2Chat to n8n to automate WhatsApp messages, SMS, and calls using the MCP server.

Before connecting your MCP to your n8n workflows, you need to create a connection to the 2Chat MCP. Follow these steps to do so:

  • On the n8n dashboard, click the orange button and select Create credential

alt text

  • The following window will open for you to choose the authentication method. Select MCP OAuth2 API

  • The following window will open.

alt text

Before continuing, make sure you have 2Chat open and are logged into your account in another browser tab.

  • Click on Connect to MCP and you will see the next window.

  • Click on Allow Access


How to use the 2Chat MCP in an n8n workflow

  • Go to n8n and make sure you have an AI Agent in your workflow with its assigned LLM model.

alt text

  • Now click on Tool and then on MCP Client Tool

alt text

  • The following window will open.

alt text

  • Enter the following details:

    • Server Transport (B): HTTP Streamable

    • Authentication (C): MCP OAuth2

    • Tools to include (D): In this case, select "Selected" since we are only going to use specific permissions.

Testing the 2Chat MCP in n8n

Now we need to validate that the MCP is working. In this case, since the trigger is a Chat, we enter a prompt and watch it run through all the steps, successfully executing the call to 2Chat without any issues.

alt text

Did this answer your question?