{"type":"mcp_server","name":"n8n","description":"**Concise Description:**\n\nWorkflow automation platform. Visual builder, custom code, AI, 400+ integrations. Self-host/cloud. Automate tasks & connect apps.","category":"AI","language":"TypeScript","stars":194256,"forks":34323,"owner":"n8n-io","github_url":"https://github.com/n8n-io/n8n","homepage":"https://n8n.io","setup":"## Setup\n\nn8n can be quickly set up using either `npx` or Docker. Choose the method that best suits your needs.\n\n### Prerequisites\n\n*   **Node.js (for npx):** Ensure you have Node.js installed. It is recommended to use the latest LTS version. You can download it from [nodejs.org](https://nodejs.org/en/).\n*   **Docker (for Docker):** Ensure you have Docker installed. You can download it from [docker.com](https://www.docker.com/get-started).\n\n### Installation\n\n#### Using npx (for quick testing)\n\n1.  Open your terminal.\n2.  Run the following command:\n\n    ```bash\n    npx n8n\n    ```\n\n    This will download and start n8n.\n\n#### Using Docker (for persistent deployments)\n\n1.  Open your terminal.\n2.  Create a Docker volume to persist your n8n data:\n\n    ```bash\n    docker volume create n8n_data\n    ```\n\n3.  Run the n8n Docker container:\n\n    ```bash\n    docker run -it --rm --name n8n -p 5678:5678 -v n8n_data:/home/node/.n8n docker.n8n.io/n8nio/n8n\n    ```\n\n    *   `-it`: Runs the container in interactive mode.\n    *   `--rm`: Automatically removes the container when it exits.\n    *   `--name n8n`: Assigns the name \"n8n\" to the container.\n    *   `-p 5678:5678`: Maps port 5678 on your host machine to port 5678 in the container.  This is the default port n8n uses.\n    *   `-v n8n_data:/home/node/.n8n`: Mounts the `n8n_data` volume to the n8n data directory inside the container, ensuring your data persists between container restarts.\n    *   `docker.n8n.io/n8nio/n8n`: Specifies the n8n Docker image to use.\n\n### Accessing n8n\n\nAfter running either the `npx` or Docker command, n8n will be accessible in your web browser at:\n\n```\nhttp://localhost:5678\n```\n\n### Configuration (Docker - Optional)\n\nFor more advanced configurations (e.g., setting up a database, configuring email, or setting environment variables), refer to the [n8n documentation](https://docs.n8n.io).  You can pass environment variables to the Docker container using the `-e` flag.\n\nFor example:\n\n```bash\ndocker run -it --rm --name n8n -p 5678:5678 -v n8n_data:/home/node/.n8n -e N8N_PORT=5678 -e N8N_HOST=localhost docker.n8n.io/n8nio/n8n\n```\n\n### Environment Variables (Docker - Common Examples)\n\nHere are some commonly used environment variables for configuring n8n when using Docker:\n\n*   `N8N_PORT`: The port n8n will listen on (default: `5678`).\n*   `N8N_HOST`: The hostname n8n will use (default: `localhost`).\n*   `N8N_PROTOCOL`: The protocol n8n will use (default: `http`).  Use `https` for secure connections.\n*   `N8N_BASIC_AUTH_ACTIVE`: Set to `true` to enable basic authentication.\n*   `N8N_BASIC_AUTH_USER`: The username for basic authentication.\n*   `N8N_BASIC_AUTH_PASSWORD`: The password for basic authentication.\n*   `DB_TYPE`: The database type to use (e.g., `postgres`, `mysql`, `sqlite`).  Defaults to `sqlite`.\n*   `DB_POSTGRESQL_HOST`: The hostname of the PostgreSQL database.\n*   `DB_POSTGRESQL_PORT`: The port of the PostgreSQL database.\n*   `DB_POSTGRESQL_DATABASE`: The name of the PostgreSQL database.\n*   `DB_POSTGRESQL_USER`: The username for the PostgreSQL database.\n*   `DB_POSTGRESQL_PASSWORD`: The password for the PostgreSQL database.\n\nRefer to the [n8n documentation](https://docs.n8n.io) for a complete list of available environment variables and their descriptions.","tools":"## Available Tools\n\nHere's a breakdown of n8n's key capabilities, presented as tools and features:\n\n*   **Visual Workflow Editor:**\n    *   **What it does:** Provides a drag-and-drop interface to design and build automation workflows without writing code. Connect nodes representing different services and operations to create complex automation logic.\n    *   **Usage:** Drag and drop nodes, connect them visually, configure each node's settings, and execute the workflow.\n\n*   **Code Execution (JavaScript/Python):**\n    *   **What it does:** Allows you to incorporate custom JavaScript or Python code directly into your workflows for advanced logic, data manipulation, or integration with services that don't have dedicated nodes.\n    *   **Usage:** Use the Function node to write JavaScript code or the Python Script node to execute Python code within your workflow.\n\n*   **npm Package Integration:**\n    *   **What it does:** Enables the use of npm packages within JavaScript code nodes, extending the functionality and capabilities of your workflows.\n    *   **Usage:** `require('your-npm-package')` within a Function node to use the package.\n\n*   **AI-Native Platform (LangChain):**\n    *   **What it does:** Facilitates the creation of AI agent workflows using LangChain. Allows you to integrate your own data and models for custom AI-powered automations.\n    *   **Usage:** Utilize LangChain nodes to build AI agents that can perform tasks such as natural language processing, data analysis, and decision-making. Refer to the [AI & LangChain Guide](https://docs.n8n.io/langchain/) for detailed instructions.\n\n*   **400+ Integrations:**\n    *   **What it does:** Provides pre-built nodes for connecting to a wide range of popular services and applications, including CRMs, marketing automation platforms, databases, and more.\n    *   **Usage:** Search for the desired service in the node library and add it to your workflow. Configure the node with your credentials and settings.\n\n*   **Workflow Templates:**\n    *   **What it does:** Offers a library of pre-built workflow templates that you can use as a starting point for your automations. These templates cover common use cases and can be customized to fit your specific needs.\n    *   **Usage:** Browse the [templates](https://n8n.io/workflows) and import the one that best suits your needs. Modify the nodes and settings to match your requirements.\n\n*   **Self-Hosting:**\n    *   **What it does:** Allows you to deploy n8n on your own infrastructure, giving you full control over your data and security.\n    *   **Usage:** Install n8n using Docker, npm, or other methods as described in the [documentation](https://docs.n8n.io).\n\n*   **Cloud Offering:**\n    *   **What it does:** Provides a managed cloud environment for running n8n workflows, eliminating the need for self-hosting.\n    *   **Usage:** Sign up for an account on [n8n cloud](https://app.n8n.cloud/login) and start building workflows.\n\n*   **Enterprise Features:**\n    *   **What it does:** Offers advanced features for enterprise users, such as advanced permissions, SSO (Single Sign-On), and air-gapped deployments.\n    *   **Usage:** Contact n8n sales for more information on enterprise features and pricing.\n\n*   **Fair-Code License:**\n    *   **What it does:** Provides transparency and flexibility with a source-available license that allows self-hosting, modification, and extension.\n    *   **Usage:** Review the [Sustainable Use License](https://github.com/n8n-io/n8n/blob/master/LICENSE.md) for details on usage rights and restrictions.","faq":null,"created_at":"2019-06-22T09:24:21+00:00","updated_at":"2025-07-07T16:55:55+00:00","source_url":"https://model-context-protocol.com/servers/n8n","related_articles":[]}