Skip to main content

n8n Workflow with Linear MCP Gateway

Connect an n8n workflow to the Linear Model Context Protocol (MCP) server through Permit MCP Gateway. The workflow creates a Linear issue for each new customer in Attio. You then lower the workflow's trust level in the gateway and watch the gateway block the same call. This tutorial is for admins and workflow builders who run automated agents against MCP servers.

Why route n8n through the gateway​

Workflow builders such as n8n can call external MCP servers with no person reviewing each call. Permit MCP Gateway checks every tool call the workflow makes against the trust level granted to the workflow, so you control which tools the workflow can use and can lower that access at any time without editing the workflow.

Before you begin​

  • A Permit account.
  • A Permit MCP Gateway host with the Linear MCP server imported, and access granted to your user. Follow steps 1 and 2 of the Linear MCP Gateway demo, or see Set up hosts for your organization.
  • An n8n instance where you can add the MCP Client Tool node.
  • An Attio workspace with an object that tracks customers, if you want to run the full workflow. Only the MCP Client Tool part of the workflow involves the gateway.

This tutorial uses the tool trust levels from the Linear demo: save_issue requires High trust, list_issues requires Medium, and your user's Max trust on the Linear MCP server is High. If you imported Linear with different tool trust levels, substitute the level that covers save_issue wherever this tutorial says High.

The workflow calls save_issue directly. Keep Require Agent Identity off in the host's Settings. When that setting is on, the gateway refuses tool calls until the agent calls gateway_register_session, which the MCP Client Tool node doesn't do.

The n8n workflow​

The example workflow uses Attio (CRM) and Linear (project tracking). For every new sale recorded in an Attio object, the workflow creates a Linear issue.

The workflow has three nodes:

n8n nodeName in the screenshotWhat it does
WebhookAttio Item AddedReceives the POST that Attio sends when an item is added to the object.
HTTP RequestFetch Record DetailsReads the new item's data from the Attio API.
MCP Client ToolMCP ClientCalls Permit MCP Gateway to create a Linear issue with the item's data.

n8n canvas with the Attio Item Added webhook node connected to a Fetch Record Details HTTP Request node and an MCP Client node

Webhook and HTTP Request are built-in n8n nodes, renamed on the canvas to describe their job, and they don't involve the gateway. The steps below cover the MCP Client Tool node, which n8n names "MCP Client" when you add it.

1. Configure the MCP Client node in n8n​

  1. In your n8n workflow, add MCP Client Tool from the node selector on the right.

    MCP Client Tool in the n8n node selector

  2. In the node's Parameters tab, leave Server Transport on HTTP Streamable. In MCP Endpoint URL, enter the host-level gateway URL of the host where you imported the Linear MCP server: https://<subdomain>.agent.security/mcp. Your host's address is on its card on the Hosts page of app.agent.security. With the host-level URL, the consent screen lets you pick the Linear server in step 5. For Authentication, select MCP OAuth2, then open Credential for MCP OAuth2 API and select Create new credential.

    MCP Client Tool parameters with the gateway MCP endpoint URL, MCP OAuth2 authentication, and the Create new credential option

    Each MCP server's page in the admin dashboard also shows a per-server URL on its MCP URL card, https://<subdomain>.agent.security/mcp/<server_key>. For how the per-server URL and the host-level URL differ, see Server URLs and the host-level URL.

  3. In the credential dialog, leave Use Dynamic Client Registration on, enter the same gateway URL in Server URL, and select Connect to MCP. Dynamic client registration lets the gateway register n8n as an OAuth client without you creating one by hand.

    MCP OAuth2 API credential dialog with dynamic client registration on, the gateway URL in Server URL, and the Connect to MCP button

  4. The browser opens the Consent Service's Sign In page on your host. Sign in with the account that has access to the Linear MCP server.

  5. On the Connect MCP Server screen, which names n8n as the client, select Linear MCP and click Select.

    Connect MCP Server screen for n8n with the Linear MCP server selected

  6. Linear requires a sign-in, so the consent screen shows Authorization Required. Click Sign in to Continue and approve access on Linear's authorization page.

  7. The review screen shows the Trust Level slider, the Task and expiry section, and every Linear tool with the trust level it requires and whether this consent allows it. Set the terms:

    • Trust Level: drag the slider to High, because save_issue requires High trust in this setup. The slider starts at Medium and stops at your max trust, shown as Max: High. save_issue moves from Denied to Allowed in the tool list.
    • Task and expiry: leave the defaults, "n8n reports its own task when it connects." and "Access never expires."
    • Ask me before this agent changes or deletes anything: leave the switch off. When it is on, changes wait for your approval by email, which holds up a workflow that runs without you.

    Select Accept. For every field on the review screen, with a screenshot, see Consent Service.

2. Configure the Linear action​

  1. In the MCP Client Tool node, open the Tool field, keep From list, and select save_issue. The list holds the Linear tools the gateway exposes to this connection.

    The Tool field in the MCP Client Tool node with save_issue selected from the list of Linear tools

  2. Set the Linear team for the issue, then map the data from Attio. This example uses the customer name and sale amount for the issue title and description.

    save_issue fields mapped to Attio customer data

3. Test the workflow​

Add an item to the Attio object. With the High trust level you granted in step 1, the gateway allows save_issue, the workflow runs, and Linear gets a new issue.

Expected result: every node in the n8n execution shows a green check, and the new issue appears in the Linear team you selected, with the title and description built from the Attio item.

n8n execution with a green check on the webhook, HTTP Request, and MCP Client nodes

Linear issue created from the Attio item, with the customer name in the title

Attio record whose creation triggered the n8n workflow

4. Lower the workflow's trust level​

To restrict what the n8n workflow can do on the Linear MCP server, lower the agent's trust level in the Permit MCP Gateway admin dashboard:

  1. Open Agents, expand the person who connected n8n, and open the n8n agent.
  2. On the Overview tab, find the Access card. Under Admin actions, Level shows Low, Medium, and High, with a check on the current level, High.
  3. Click Low. A warning asks "Lower n8n to Low?" and says that from its next call the agent can run only Low tools on the server.
  4. Click Lower to Low.

The gateway applies the new trust level to the workflow's next tool call, with no change in n8n.

Add another Attio item. Expected result: the MCP Client Tool node fails with MCP error -32004, the JSON-RPC code the gateway returns for a permission denial, and the message names save_issue. No Linear issue is created, and the denial appears in the agent's Audit Logs tab.

n8n node output showing MCP error -32004 Permission denied for tool save_issue

An admin can only lower an agent's trust level. To give the workflow High trust again, the person who approved it revokes the agent on the host's Your MCP agents page, https://<subdomain>.agent.security/my-mcp-agents, connects the n8n credential again, and approves High on the consent screen. For the Access card and the full procedure, see Modifying agent trust levels.

Results​

Trust levelsave_issue result
HighAllowed: the issue is created
LowBlocked: Permit MCP Gateway denies the call

You changed what the n8n workflow can do on the Linear MCP server from the gateway, with no change to the Linear MCP server or the n8n workflow.

Next steps​