
Conectar con n8n
n8n — NewAlgorithm as a tool for an AI Agent inside your workflow.
Este contenido está disponible en inglés.
¿Qué MCP vas a conectar? Los comandos de abajo cambian según tu elección.
- 1
Generate your API key
Sign in to app.newalgorithm.io with your account, open Keys & apps and generate a key. It is shown only once: copy it and store it somewhere safe.
Key formatna_live_xxxxxxxxxxxxxxxxx - 2
Create the authentication credential
In Credentials → New, choose Header Auth. Use Authorization as the header name and, as the value, Bearer followed by your key. The credential is stored encrypted in n8n.
Header AuthName: Authorization Value: Bearer na_live_xxxxxxxxxxxxxxxxx - 3
Build the workflow with an AI Agent
Add the AI Agent node and connect a language model to it. The agent is what decides when to query NewAlgorithm.
- 4
Add the MCP Client Tool
On the AI Agent's tools input, add the MCP Client Tool node and configure the endpoint, the transport and the credential you created earlier.
MCP Client ToolEndpoint: https://totvs.mcp.newalgorithm.io/mcp Server Transport: HTTP Streamable Authentication: Header Auth (credential created above) Tools to Include: All - 5
Guide the agent in the system prompt
Without instructions, the agent may answer from memory. Tell it explicitly to query NewAlgorithm before stating anything about SAP.
Query NewAlgorithm (na_search) before answering about SAP. Let the Manager Agent choose the Specialist and cite the evidence returned. - 6
Run and confirm
Run the workflow with a real question. Open the output of the MCP Client Tool node: it shows the call made and the evidence returned by NewAlgorithm.
Resultado esperado: na_prepare, na_search, na_route, na_specialists, na_version
On self-hosted n8n, make sure the instance has outbound HTTPS access to mcp.newalgorithm.io — on locked-down corporate networks, this is the most common reason the node fails to connect.
Detalles de autenticación y herramientas en la Documentación.