Skip to main content

n8n Workflow with Linear MCP Gateway

A walkthrough demonstrating how to set up Permit.io's Agent Security MCP Gateway so that you can trust automated workflows built with n8n.

Problem Statement

Automated workflow builders like n8n allow you to connect to external MCPs — automated tools calling automated tools. But who is monitoring all of this? Where are the checks on the system?

That is where Permit.io's MCP Gateway comes in. Using the MCP Gateway, you can control exactly which tools an agent or workflow can use.

This demo shows how to solve that by placing Permit.io's MCP Gateway in front of a n8n workflow.

Task: Use Permit.io's MCP Gateway to allow an n8n workflow to access only specific tools of a Linear MCP.

Before You Begin

  1. Create a Permit.io Account
  2. Create an Agent Security Account
  3. Add Linear MCP to your Account

The n8n Workflow

For this demo, assume you use two popular tools for work management: Attio (CRM) and Linear (project tracking). You have an Attio object that tracks all customers. For every new sale, you want to automatically create a Linear issue. Let's automate this with an n8n workflow.

The workflow has three components:

  1. API Webhook Listener (Attio) — listens for new items added to Attio
  2. HTTP Fetcher — retrieves the new item data from Attio
  3. MCP Client — calls the MCP Gateway to create a Linear issue with the item data

n8n workflow overview showing webhook, fetcher, and MCP client nodes

Since this demo focuses on the MCP Gateway integration, we'll skip to component 3 — the MCP Client.

Step 1 — Configure the MCP Client in n8n

  1. In your n8n workflow, grab MCP Client from the tool selector on the right.

    MCP Client in the n8n tool selector

  2. Insert the URL from the Linear MCP you created previously in the Agent Security Platform. For Authentication, select MCP OAuth2 and then Create New Credential.

    MCP Client configuration with URL and authentication

  3. In the Create New Credential modal, enter the MCP Endpoint URL again and press Connect to MCP.

    Create New Credential modal with MCP endpoint URL

  4. This brings you to the Consent Service screen to select which MCP to include for this workflow. Select the Linear MCP.

    Consent Service screen showing Linear MCP selection

  5. You will be prompted to sign in and grant access to Linear. Then you will be asked to import and assign trust levels for all of Linear's tools. This is where you directly control what n8n can do.

    Tool import screen with trust level assignment

Step 2 — Configure the Linear Action

  1. In the MCP Client config area, n8n now shows all the imported Linear tools. Select save_issue.

    Selecting save_issue from imported Linear tools

  2. Define the team for the issue. Then pass along whatever data you need — for this demo, we use the customer name and sale amount for the Linear issue title and description.

    Configuring issue fields with customer data

Step 3 — Test the Workflow

As long as the trust level is set appropriately for this user/agent, every time a new item is added to the Attio object, a Linear issue will be created automatically.

Completed n8n workflow execution

Linear issue created from Attio data

Attio item that triggered the workflow

Step 4 — Adjust Trust Levels in Real Time

If at any time you want to change what n8n can do with the Linear MCP, go to the Agent Security dashboard and toggle the trust level.

Agent Security dashboard showing trust level controls

Setting trust level to Low for the workflow

For example, setting the trust level to Low causes the Linear MCP to fail execution — the MCP Gateway blocks the action.

n8n execution log showing blocked MCP action

Summary

This demo shows how Permit.io's MCP Gateway gives you real-time control over what automated n8n workflows can do with external MCPs like Linear — without any changes to the underlying MCP server or n8n workflow logic.

Trust Levelsave_issue Result
HighAllowed — issue created
LowBlocked — MCP Gateway denies the action