# n8n

n8n's **MCP Client Tool** is a sub node that attaches to an AI Agent. Point the node at Cakewalk's gateway and the agent gets access to the tools the gateway exposes. The connection is per workflow.

## Install Method

Custom form on the MCP Client Tool node inside an n8n workflow. The node parameters write to the workflow JSON. The node ships with n8n; no community package install is required.

## Step 1: Add the MCP Client Tool Node

1. In your workflow, locate the **AI Agent** step.
2. On the Agent's **Tool** input, click **+** to add a tool.
3. Select **MCP Client Tool** from the sub node list.

## Step 2: Choose the Transport

The node supports two transports. Pick the Streamable HTTP option for new integrations; SSE is supported but deprecated. n8n's current docs label these fields as **HTTP Streamable URL** and **SSE Endpoint**, though the verbatim labels may have shifted.

* Streamable HTTP URL field: `https://mcp-gateway.getcakewalk.io/mcp`
* SSE Endpoint field: leave empty unless you select SSE transport.

Cakewalk's gateway speaks Streamable HTTP, which is also n8n's recommended option.

## Step 3: Configure Authentication

In the Authentication setting, select the OAuth2 option. Cakewalk's gateway authenticates over OAuth.

Bearer and Header Auth are also supported by the node, but Cakewalk's gateway does not accept them. Do not pick None.

## Step 4: Pick Tools to Expose

The Tools to Include setting controls which tools from Cakewalk's gateway the agent can call:

* All: expose every tool the gateway returns.
* Selected: allow only a named subset.
* All Except: expose everything except a named subset.

Pick the option that matches your policy intent. For a first connection, All is the simplest start.

## Step 5: Run the Agent Once to Authenticate

Run the workflow. n8n opens the OAuth flow on the first call. Sign in with your Cakewalk account and approve the Connection. n8n stores the credentials on the OAuth2 credential record so subsequent runs do not re-prompt.

## Verifying It Works

In the AI Agent's execution log, the Cakewalk tools appear under the Tools the agent considered or invoked. In Cakewalk, the n8n card on **My Agents** flips to **Connected** after the first agent call.

## Per Workflow Scope

The MCP Client Tool node lives on the workflow. Adding Cakewalk to one workflow does not surface it on others. Reuse the saved OAuth2 credential across workflows to avoid repeating the OAuth flow.

## Troubleshooting

* **Tool list is empty after auth:** confirm Tools to Include is set to All and that the OAuth flow completed (the credential record shows Connected, not Pending).
* **n8n falls back to SSE:** if Cakewalk's gateway URL is pasted into the SSE Endpoint field instead of the HTTP Streamable URL field, the node connects in SSE mode. Move the URL to the HTTP Streamable field.
* **OAuth flow does not start:** confirm Authentication is set to OAuth2, not None.

## Learn more

* [MCP Client Tool node documentation](https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.toolmcp/) from n8n.


---

# Agent Instructions: 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://www.cakewalk.security/docs/ai-agent-access/connections-and-integrations/agent-platforms/n8n.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.
