Skip to content

Commit 7be3ea4

Browse files
authored
PER-14219 Linear MCP Gateway Demo (#615)
* Linear MCP Gateway Demo * updated location of demo in docs * n8n agent security demo
1 parent bd80b8d commit 7be3ea4

37 files changed

Lines changed: 257 additions & 0 deletions
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"label": "Usage Examples and Demos",
3+
"position": 10,
4+
"collapsible": true,
5+
"collapsed": true,
6+
"link": {
7+
"type": "generated-index",
8+
"slug": "/permit-mcp-gateway/demos",
9+
"title": "Usage Examples and Demos",
10+
"description": "Step-by-step demos showing how to use Permit MCP Gateway to enforce trust-based access control on real MCP servers."
11+
}
12+
}
Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
---
2+
sidebar_position: 1
3+
title: "Linear MCP Gateway Demo"
4+
description: "Enforce trust-based access control on Linear's MCP server — allow a Developer to create issues while restricting a Project Manager to read-only access."
5+
---
6+
7+
# Linear MCP Gateway Demo
8+
9+
A walkthrough demonstrating how to set up Permit.io's Agent Security MCP Gateway so that users with different trust levels are limited in what they can do with their Linear MCP tools.
10+
11+
## Problem Statement
12+
13+
When exposing Linear's MCP server to multiple users or AI agents, everyone gets the same level of access by default. An intern and a team lead can both create issues, delete comments, and modify projects — there's no way to enforce least-privilege access out of the box.
14+
15+
This demo shows how to solve that by placing Permit.io's MCP Gateway in front of the Linear MCP server.
16+
17+
**Task:** Use Permit.io's MCP Gateway to allow a Developer (High trust) to create Linear issues and a Project Manager (Medium trust) to only list Linear issues.
18+
19+
## Before You Begin
20+
21+
1. [Create a Permit.io Account](/quickstart/#1-create-a-permit-account)
22+
2. [Create an Agent Security Account](/permit-mcp-gateway/guide)
23+
24+
## Step 1 — Set Up Your Host and MCP
25+
26+
1. Go to the [**Dashboard**](https://app.agent.security/) and select **Hosts**, then click **Create Host**.
27+
28+
![Create Host button in the Dashboard](/img/mcpermit/linear-demo/create-host.png)
29+
30+
2. Fill in:
31+
- **Subdomain** — choose a prefix (e.g., `my-tenant`). A unique suffix is auto-generated.
32+
- **Project** — select the Permit project that contains the environment you want to use.
33+
- **Environment** — select the Permit environment this host will use. The environment cannot be changed after the host is created.
34+
35+
![Host creation form with subdomain, project, and environment fields](/img/mcpermit/linear-demo/host-details.png)
36+
37+
3. Click **Create Host**.
38+
39+
4. The Host you created exists but has no abilities because it is not linked to an external MCP. Click **MCP Servers** to create an MCP server.
40+
41+
![MCP Servers tab in host configuration](/img/mcpermit/linear-demo/mcp-servers.png)
42+
43+
5. Enter the Linear MCP URL: `https://mcp.linear.app/mcp`. Upon pressing **Connect**, you will be prompted by Linear to sign in.
44+
45+
![Entering the Linear MCP URL](/img/mcpermit/linear-demo/linear-mcp-url.png)
46+
47+
6. All of the tools available to the Linear MCP are shown as imported. For this demo we only need two tools: `list_issues` and `save_issue`. Set `save_issue` to **High** trust and `list_issues` to **Medium** trust. You can adjust tool trust levels afterwards as well.
48+
49+
![Tool trust level configuration showing list_issues and save_issue](/img/mcpermit/linear-demo/tool-trust-levels.png)
50+
51+
Your MCP Gateway now has Linear MCP abilities.
52+
53+
## Step 2 — Add Users
54+
55+
To add users in your organization, they will need the Gateway MCP URL found in the **Dashboard** tab.
56+
57+
![Dashboard showing the Gateway MCP URL](/img/mcpermit/linear-demo/dashboard-mcp-url.png)
58+
59+
### Developer Signs Up with Claude Desktop
60+
61+
The Developer can add the MCP configuration object found in the Dashboard into the Claude Desktop config file, or add the MCP URL via the Claude Desktop UI.
62+
63+
Upon adding the MCP connector and connecting, the Developer will be brought to the MCP Gateway Consent Service to sign in or register an account.
64+
65+
![Consent Service sign-in page](/img/mcpermit/linear-demo/consent-signin.png)
66+
67+
![Consent Service registration page](/img/mcpermit/linear-demo/consent-signup.png)
68+
69+
Upon signing in, the new user will not have any MCPs available because the admin has not yet granted access.
70+
71+
![Empty MCP list for new user](/img/mcpermit/linear-demo/no-mcps.png)
72+
73+
Navigate to **Humans** in the Dashboard — you will see the new user has registered. Grant the user MCP Server Access to the Linear MCP created previously. Because this user is a Developer, set the **Max Trust Level** to **High**.
74+
75+
![Granting High trust level access to the Developer](/img/mcpermit/linear-demo/grant-access-high.png)
76+
77+
After refreshing, the user will see the MCP available for selection. Upon selecting it, they must authorize via Linear.
78+
79+
![MCP available for selection in the Consent Service](/img/mcpermit/linear-demo/mcp-available.png)
80+
81+
![Linear OAuth authorization prompt](/img/mcpermit/linear-demo/linear-auth.png)
82+
83+
![Successfully connected confirmation](/img/mcpermit/linear-demo/connected.png)
84+
85+
The user can also set restrictions on their agent's use of the MCP. See the [Consent Service](/permit-mcp-gateway/consent-service) documentation to learn more.
86+
87+
![User consent restrictions interface](/img/mcpermit/linear-demo/consent-restrictions.png)
88+
89+
### Project Manager Signs Up with Claude Code
90+
91+
The signup and consent service procedure is the same as described above. The only difference is that when the admin assigns access, the **Max Trust Level** is set to **Medium** instead of High.
92+
93+
This is what the Project Manager will see when connecting Claude Code to the MCP:
94+
95+
![Project Manager connected with Medium trust level](/img/mcpermit/linear-demo/pm-medium-trust.png)
96+
97+
## Step 3 — Test Actions by User
98+
99+
### PM (Claude Code) Tries to Create Issue
100+
101+
![PM receives Permission Denied when trying to save_issue](/img/mcpermit/linear-demo/pm-create-denied.png)
102+
103+
As expected, the PM does not have a high enough trust level and is returned **Permission Denied** for `save_issue`.
104+
105+
### Developer (Claude Desktop) Tries to Create Issue
106+
107+
![Developer successfully creates an issue](/img/mcpermit/linear-demo/dev-create-success.png)
108+
109+
As expected, the Developer successfully creates an issue.
110+
111+
### Both Users List Issues
112+
113+
![PM successfully lists issues](/img/mcpermit/linear-demo/pm-list-issues.png)
114+
115+
![Developer successfully lists issues](/img/mcpermit/linear-demo/dev-list-issues.png)
116+
117+
As expected, both the Project Manager and Developer succeed in listing issues — their trust levels meet the Medium trust requirement of the `list_issues` tool.
118+
119+
## Summary
120+
121+
| User | Trust Level | `list_issues` (Medium) | `save_issue` (High) |
122+
|------|-------------|----------------------|---------------------|
123+
| Developer | High | Allowed | Allowed |
124+
| Project Manager | Medium | Allowed | Denied |
125+
126+
This demo shows how Permit MCP Gateway enforces least-privilege access on MCP tools based on trust levels — without any changes to the underlying Linear MCP server.
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
---
2+
sidebar_position: 2
3+
title: "n8n Workflow with Linear MCP Gateway"
4+
description: "Use Permit.io's MCP Gateway to control which Linear MCP tools an n8n workflow can access — and revoke access in real time."
5+
---
6+
7+
# n8n Workflow with Linear MCP Gateway
8+
9+
A walkthrough demonstrating how to set up Permit.io's Agent Security MCP Gateway so that you can trust automated workflows built with n8n.
10+
11+
## Problem Statement
12+
13+
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?
14+
15+
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.
16+
17+
This demo shows how to solve that by placing Permit.io's MCP Gateway in front of a n8n workflow.
18+
19+
**Task:** Use Permit.io's MCP Gateway to allow an n8n workflow to access only specific tools of a Linear MCP.
20+
21+
## Before You Begin
22+
23+
1. [Create a Permit.io Account](/quickstart/#1-create-a-permit-account)
24+
2. [Create an Agent Security Account](/permit-mcp-gateway/guide)
25+
3. [Add Linear MCP to your Account](/permit-mcp-gateway/demos/linear-mcp-gateway)
26+
27+
## The n8n Workflow
28+
29+
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.
30+
31+
The workflow has three components:
32+
33+
1. **API Webhook Listener (Attio)** — listens for new items added to Attio
34+
2. **HTTP Fetcher** — retrieves the new item data from Attio
35+
3. **MCP Client** — calls the MCP Gateway to create a Linear issue with the item data
36+
37+
![n8n workflow overview showing webhook, fetcher, and MCP client nodes](/img/mcpermit/n8n-linear-demo/workflow-overview.png)
38+
39+
Since this demo focuses on the MCP Gateway integration, we'll skip to component 3 — the MCP Client.
40+
41+
## Step 1 — Configure the MCP Client in n8n
42+
43+
1. In your n8n workflow, grab **MCP Client** from the tool selector on the right.
44+
45+
![MCP Client in the n8n tool selector](/img/mcpermit/n8n-linear-demo/mcp-client-tool-selector.png)
46+
47+
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**.
48+
49+
![MCP Client configuration with URL and authentication](/img/mcpermit/n8n-linear-demo/mcp-client-config.png)
50+
51+
3. In the **Create New Credential** modal, enter the MCP Endpoint URL again and press **Connect to MCP**.
52+
53+
![Create New Credential modal with MCP endpoint URL](/img/mcpermit/n8n-linear-demo/create-credential.png)
54+
55+
4. This brings you to the Consent Service screen to select which MCP to include for this workflow. Select the **Linear MCP**.
56+
57+
![Consent Service screen showing Linear MCP selection](/img/mcpermit/n8n-linear-demo/consent-service-select.png)
58+
59+
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.
60+
61+
![Tool import screen with trust level assignment](/img/mcpermit/n8n-linear-demo/tool-import.png)
62+
63+
## Step 2 — Configure the Linear Action
64+
65+
1. In the MCP Client config area, n8n now shows all the imported Linear tools. Select **save_issue**.
66+
67+
![Selecting save_issue from imported Linear tools](/img/mcpermit/n8n-linear-demo/select-save-issue.png)
68+
69+
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.
70+
71+
![Configuring issue fields with customer data](/img/mcpermit/n8n-linear-demo/issue-config.png)
72+
73+
## Step 3 — Test the Workflow
74+
75+
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.
76+
77+
![Completed n8n workflow execution](/img/mcpermit/n8n-linear-demo/workflow-complete.png)
78+
79+
![Linear issue created from Attio data](/img/mcpermit/n8n-linear-demo/linear-issue-created.png)
80+
81+
![Attio item that triggered the workflow](/img/mcpermit/n8n-linear-demo/attio-item.png)
82+
83+
## Step 4 — Adjust Trust Levels in Real Time
84+
85+
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.
86+
87+
![Agent Security dashboard showing trust level controls](/img/mcpermit/n8n-linear-demo/trust-level-dashboard.png)
88+
89+
![Setting trust level to Low for the workflow](/img/mcpermit/n8n-linear-demo/trust-level-low.png)
90+
91+
For example, setting the trust level to **Low** causes the Linear MCP to fail execution — the MCP Gateway blocks the action.
92+
93+
![n8n execution log showing blocked MCP action](/img/mcpermit/n8n-linear-demo/execution-blocked.png)
94+
95+
## Summary
96+
97+
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.
98+
99+
| Trust Level | `save_issue` Result |
100+
|-------------|-------------------|
101+
| High | Allowed — issue created |
102+
| Low | Blocked — MCP Gateway denies the action |

sidebars.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,23 @@ const sidebars = {
214214
"permit-mcp-gateway/architecture",
215215
"permit-mcp-gateway/permit-integration",
216216
"permit-mcp-gateway/advanced-features",
217+
{
218+
type: "category",
219+
label: "Usage Examples and Demos",
220+
link: {
221+
type: "generated-index",
222+
slug: "/permit-mcp-gateway/demos",
223+
title: "Usage Examples and Demos",
224+
description:
225+
"Step-by-step demos showing how to use Permit MCP Gateway to enforce trust-based access control on real MCP servers.",
226+
},
227+
items: [
228+
{
229+
type: "autogenerated",
230+
dirName: "permit-mcp-gateway/demos",
231+
},
232+
],
233+
},
217234
],
218235
},
219236
],
224 KB
Loading
98.9 KB
Loading
315 KB
Loading
38.1 KB
Loading
238 KB
Loading
241 KB
Loading

0 commit comments

Comments
 (0)