Skip to main content
Glama
sAndreotti

n8n MCP Server

by sAndreotti
README.md
# n8n MCP Server

This is a Model Context Protocol (MCP) server for n8n. It allows AI clients (like Claude Desktop or compatible IDEs) to list, inspect, and manage your n8n workflows.

## Configuration

1.  **Environment Variables**:
    Copy `.env.example` to `.env` and fill in your n8n details:
    ```bash
    cp .env.example .env
    ```
    
    Edit `.env`:
    ```env
    N8N_HOST=https://your-n8n-instance.com
    N8N_API_KEY=your-api-key-here
    ```

2.  **Build**:
    ```bash
    npm install
    npm run build
    ```

## Antigravity Configuration

To use this MCP server with Google Antigravity, you need to add it to your `mcp_config.json` file.

1.  Open Antigravity.
2.  Go to **Settings** > **MCP Servers**.
3.  Click **View raw config** to open `mcp_config.json`.
4.  Add the following configuration (replace the environment variables with your actual values):

```json
{
  "mcpServers": {
    "n8n": {
      "command": "node",
      "args": [
        "/path-to-project/dist/index.js"
      ],
      "env": {
        "N8N_HOST": "https://your-n8n-instance.com",
        "N8N_API_KEY": "your-api-key-here"
      }
    }
  }
}
```

> **Note:** Make sure to run `npm run build` first so the `dist/index.js` file exists.

## Usage

To use this MCP server with an AI client:

1.  **Command**: `node`
2.  **Args**: `/Users/stefano/Documents/Progetti/n8n MCP/dist/index.js`

### Available Tools

-   `list_workflows`: List all workflows (supports filtering by active status and tags).
-   `activate_workflow`: Activate a workflow by ID.
-   `deactivate_workflow`: Deactivate a workflow by ID.
-   `get_workflow`: Get details of a specific workflow.
-   `create_workflow`: Create a new workflow with a given name and nodes/connections.
-   `search_templates`: Search the n8n public template library to find workflow examples.
-   `get_node_specs`: Get a link to the official documentation for a specific node type.
-   `create_tag`: Create a new tag for organizing workflows.
-   `list_tags`: List all available tags.
-   `add_tags_to_workflow`: Add one or more tags to an existing workflow.
-   `index_all_nodes`: Returns a directory of node categories (Core, Trigger, App) with links to their official documentation.

> **Safety Note:** There is no `delete_workflow` tool implemented to prevent accidental deletion of your workflows.

### Available Resources

-   `n8n://workflows`: A dynamic list of all workflows.

TDQS

B3.4/5.0

Scored across 11 tools

Disambiguation5/5

Each tool targets a distinct operation: workflow CRUD and activation, tag management, node specs, and template search. No overlapping purposes.

Naming Consistency5/5

All tools follow a consistent verb_noun snake_case pattern (e.g., activate_workflow, list_tags), making the set predictable.

Tool Count5/5

11 tools cover the main aspects of n8n (workflows, tags, nodes, templates) without being excessive or sparse.

Completeness3/5

Missing update/delete for workflows and tags, and no tool to remove tags from a workflow. These gaps could hinder some automation tasks.

Maintenance

ActivityInactive
ResponsivenessNo issues