n8n API key, OAuth and MCP

Manage n8n through the API and expose your workflows as tools for an AI. The API key is created in 3 steps et voyage dans l'en-tête de chaque appel. An official MCP server connects it to Claude, ChatGPT or Le Chat.

Databases, automation and workflows · Advanced automation

n8n

Manage n8n through the API and expose your workflows as tools for an AI.

  • REST API
  • Key or personal token
  • Official MCP server
  1. 1

    Paramètres, API n8n, Créer une clé d'API.

  2. 2

    Copiez-la : elle s'envoie dans l'en-tête X-N8N-API-KEY.

  3. 3

    L'API vit sur votre instance : https://votre-instance/api/v1.

Send with every call
X-N8N-API-KEY: <key>
Test the key
curl https://votre-instance/api/v1/workflows \
  -H "X-N8N-API-KEY: $N8N_CLE"

Worth knowing. When self-hosted, n8n keeps your data in-house: it’s often the best bridge between an AI and tools that have no MCP server.

Your questions about n8n.

Where do you create a n8n API key?

Paramètres, API n8n, Créer une clé d'API. Copiez-la : elle s'envoie dans l'en-tête X-N8N-API-KEY. L'API vit sur votre instance : https://votre-instance/api/v1.

How do you check that n8n access works?

With a call that changes nothing, on the REST API of n8n, l'en-tête X-N8N-API-KEY: … en place. The “API key” tab gives the command to copy. A 200 response confirms the key; a 401 or 403 error means it is wrong, expired or too restricted.

Do you need OAuth with n8n?

No. This documentation describes no OAuth flow for n8n: la clé d'API suffit pour vos propres usages.

Does n8n have an official MCP server?

Official MCP server. There are two official routes: the MCP Server Trigger node exposes a workflow as a tool, at the URL the node provides; and instance-level MCP access, which since version 2.14 lets you create and edit workflows. The “MCP server” tab explains how to add it in Claude, ChatGPT or Le Chat.

What precautions should you take with n8n access?

When self-hosted, n8n keeps your data in-house: it’s often the best bridge between an AI and tools that have no MCP server.