Skip to main content

Permit MCP Gateway quickstart

Short answer: Permit MCP Gateway is a proxy between MCP clients such as Cursor and Claude Code and your MCP servers, so each person's agent can call only the tools that person approved and an admin allowed. Use it when you want per-person, per-tool authorization, consent, approvals, and an audit log without changing the MCP servers. Don't use it when you own the MCP server and want to enforce permissions inside its own code.

FactValue
Setup stepsSign in with Permit.io, create a host, import an MCP server, grant a person access, connect your MCP client, and approve the agent on the consent screen.
Gateway URLhttps://<subdomain>.agent.security/mcp/<server_key> for one MCP server, or https://<subdomain>.agent.security/mcp to let the person pick a server when they connect.
Supported MCP clientsCursor, VS Code, Claude Desktop, and Claude Code. Each MCP server's page in the admin dashboard shows its URL and a configuration snippet for each client.
Deployment modesHosted (SaaS) on *.agent.security, customer-controlled, and fully on-premises. The last two are available on Enterprise plans. See Enterprise deployment.
Authorization modelA relationship-based access control (ReBAC) trust ceiling on standard Permit objects: an agent gets the lower of the trust level the person approved and the maximum an admin set. Gateway policies can also use RBAC and ABAC.
Optional controlsAdmin approval per tool, agent identity checks, and the Guardian, an LLM judge that grades each tool call against the server's intent.
Sign-in methodsEmail and password (on by default), email one-time passcode, passkeys, Google, GitHub, and Microsoft OAuth, and SAML 2.0 or OIDC single sign-on. See Authentication methods.
AuditEach allowed or denied tool call is logged with the person, the agent, the tool, and the MCP server, on the Audit Logs tab of each agent, person, and server, and in the Permit Audit Log screen.
SDK or code changeNone. You point the MCP client at the gateway URL instead of the MCP server URL.
Free tierCommunity plan, labeled "Free forever" on the Permit MCP Gateway pricing page: "Up to 1,000 MAU (human + agentic identities)", Tenants 10, Environments 1, Audit log retention 7 days. The main Permit.io pricing page lists different Community limits for Permit.io authorization outside the gateway.
Open-source componentsThe Permit PDP and OPAL that Permit uses are open source. The Access Request MCP server (permitio/permit-mcp) is a separate open-source project and is not the gateway.

Create a Permit MCP Gateway host, import one Model Context Protocol (MCP) server, and connect your MCP client to it through the gateway. This quickstart is for AI agent builders and admins who set up the gateway for the first time and want their agent's tool calls authenticated, authorized, and logged without changing the MCP server or the agent.

When you finish, your MCP client calls the DeepWiki MCP server through the gateway, one tool call is allowed, one is denied, and both appear in the agent's audit log.

Prerequisites​

  • A Permit.io account. You sign in to the gateway admin dashboard with it.
  • An MCP client: Cursor, VS Code, Claude Desktop, or Claude Code.
  • The URL of a remote MCP server. The examples use DeepWiki, https://mcp.deepwiki.com/mcp, which needs no sign-in of its own.
  • The email address of the person who connects the MCP client. For a first test, use your own.

The examples use the organization Acme Corp and the host acme-zesty-magenta-11.agent.security. Replace them with your own.

1. Sign in and choose an organization​

  1. Go to app.agent.security and click Sign in with Permit.io.
  2. Sign in with your Permit.io account. The organization switcher at the top of the sidebar shows your current Permit organization.
  3. If your account has no organization, click Manage Organizations on the welcome page. On the Organizations page, enter an Organization name and an Organization key (lowercase letters, numbers, and dashes only), and click Create Organization.

To create another organization later, open the organization switcher, click +, and click Create Another Organization on the Organizations page.

2. Create a host​

A host is one gateway tenant: its own subdomain, its own sign-in page for the people who connect agents, and one Permit environment that stores its policies.

  1. On the Hosts page, the Get Started card lists three steps. Click Create Host.

    Hosts page in a new organization with the Get Started card and the Create Host button

  2. In Subdomain, type a prefix such as acme. The platform adds a suffix such as -zesty-magenta-11.agent.security. You can't change the suffix.

  3. Under Environment, pick the Permit Project. In Environment, keep + Create new environment and enter an Environment Name and an Environment Key, or pick an existing environment. You can't change the environment after you create the host.

  4. Decide on Allow Dynamic MCP Connections. The switch is on by default and lets people connect to any MCP server URL, not only servers you import. Turn it off to limit people to the servers you import.

  5. Click Create Host, then click Create Host again in the Confirm Host Creation dialog.

Create Host form with the subdomain prefix acme, a new Acme Gateway environment, and Allow Dynamic MCP Connections on

Dynamic MCP connections can't be turned off after they're on

If you create the host with Allow Dynamic MCP Connections off, you can turn it on later in Settings. After the setting is on, you can't turn it off. To limit a host to imported servers, turn the switch off before you click Create Host.

The host card on the Hosts page is marked Current, and the host chip in the top bar shows the host's address. Host settings are under Settings in the sidebar.

3. Import an MCP server​

  1. Go to MCP Servers and click Create Server. The Import MCP Server page opens on the Connect step.

  2. Enter the server URL, https://mcp.deepwiki.com/mcp, and click Connect. The platform asks the server for its tools. If the server requires a sign-in, the page shows Authorization Required. Click Sign in to MCP Server, sign in with the provider, and you return to the import.

  3. On the Review & Configure step, check the Server Key, such as deepwiki. The key is part of the server's gateway URL. Add a Description (optional) and a Workflow intent (optional): up to 500 characters that say what the server is for. The Guardian uses the intent if you turn it on later.

  4. Under Tools to Import, each tool shows a trust level that the gateway picks from the tool name: Low for reads, Medium for writes, High for deletes. For this quickstart, set ask_wiki_question to Medium so you can see a denied call later.

    Review and Configure step for DeepWiki with the server key, workflow intent, and three tools with HITL switches and trust levels

  5. Click Import Server & 3 Tools. The button shows the number of tools you selected.

  6. The Server Created Successfully dialog offers to add people who already signed in to the host. In a new host nobody has signed in yet, so click Skip for Now, then click View Server.

4. Give a person access to the server​

Nobody can use an imported server until an admin grants access. The grant sets Max trust, the highest trust level that person can give any of their agents on this server.

  1. On the server page, find the Authorized Humans card and click Grant Access.
  2. In the Grant Human Access dialog, open the Invite by Email tab and enter the person's email address. Use Existing User instead for someone who already signed in to the host.
  3. Set Max trust to High and click Grant Access.

An invite stays pending until the person signs up on the host with that email address. Their access starts when they sign up.

For a person who already signed in, you can also grant access from Humans: open the person, click Grant Access on the MCP Server Access card, pick the MCP Server and Max trust, and click Grant Access.

Grant MCP Server Access dialog with DeepWiki selected and Max trust set to High

5. Connect your MCP client​

The MCP URL card on the server page shows the server's gateway URL, https://<subdomain>.agent.security/mcp/<server_key>, and a tab for each client. The examples use https://acme-zesty-magenta-11.agent.security/mcp/deepwiki.

MCP URL card for DeepWiki with the Cursor / VS Code tab open

Remove direct connections to the same MCP server

If your client also has a direct connection to the same MCP server, the agent can call the server through that connection and skip the gateway. Remove the direct entry so only the gateway URL remains.

Cursor and VS Code​

Add the server to .cursor/mcp.json:

{
"mcpServers": {
"deepwiki": {
"url": "https://acme-zesty-magenta-11.agent.security/mcp/deepwiki"
}
}
}

VS Code reads MCP servers from .vscode/mcp.json, which uses a top-level servers key instead of mcpServers. See the VS Code MCP server documentation for the file format.

Claude Desktop​

Open Settings > Connectors, click Add custom connector, and enter the gateway URL. The Claude Desktop tab on the server's MCP URL card shows a config-file snippet. Claude Desktop adds remote servers as custom connectors instead, so use only the gateway URL from the card.

Claude Code​

Run this command:

claude mcp add deepwiki --transport http "https://acme-zesty-magenta-11.agent.security/mcp/deepwiki"

To let the person choose among every server they have access to, use the host URL https://acme-zesty-magenta-11.agent.security/mcp instead. The consent screen then lists the servers.

6. Sign in and approve the agent​

The first time the client connects, the gateway asks it to sign in. The client registers itself with the host and opens a browser window on the host.

  1. Sign in, or create an account on the host. Gateway accounts are separate from your Permit.io sign-in, and one account works on every gateway host. If you don't have one yet, click Create Account and enter your Name, the Email you invited, a Password, and Confirm Password. On the hosted gateway, a Check your email page asks you to verify your address. Open the link in the email to continue.
  2. Review the request. The Connect MCP Server screen opens with DeepWiki selected, because the URL names the server. The screen names your MCP client, such as "Acme Research Agent wants to connect to an MCP server".
  3. Set the terms.
    • Trust Level: pick Low. The slider stops at Max, the level an admin granted you.
    • Task and expiry: by default the agent reports its own task and access never expires. Under Advanced, choose I set the task to write the task yourself (up to 500 characters) and pick when Access ends: 1 hour, 1 day, 7 days, Custom, or Forever.
    • Available Tools: each tool shows Allowed or Denied at the level you picked. At Low, ask_wiki_question shows Denied because it requires medium trust.
  4. Click Accept. The browser returns to your MCP client, and the client is connected.

Connect MCP Server review screen for DeepWiki with Low trust, a task set by the person, access ending in 7 days, and two tools allowed and one denied

For each field on the consent screen, see Consent service.

7. Verify that tool calls go through the gateway​

  1. Ask your agent to read documentation through DeepWiki, such as "Use DeepWiki to read the documentation for facebook/react." The agent calls read_wiki_structure or read_wiki_contents, and the gateway allows the call.

  2. Ask your agent to call the medium-trust tool, such as "Use the ask_wiki_question tool to ask how React schedules updates." The gateway denies the call and returns this error to the agent:

    Permission denied: tool 'ask_wiki_question' is not allowed at your current trust level. To use this tool, an administrator needs to enable it or increase your trust level in the Agent Security Gateway.
  3. In app.agent.security, open Dashboard. Gateway activity counts the allowed and denied calls, and Live activity lists them.

  4. Open Agents, expand your person, and open the agent. The Audit Logs tab shows each call with its decision, such as "Tool call on deepwiki: allowed by the agent and person checks".

Agent audit log with allowed DeepWiki tool calls, a trust-level denial, Guardian verdicts, and a session registration

The Consent Grants page shows the approval you gave in step 6, with its level, task, and end date.

If a call you expected to pass is denied, see Troubleshooting.

Frequently asked questions​

How do I give an MCP server per-person tool permissions with Permit MCP Gateway?​

Create a host, import the MCP server, and grant each person access with a Max trust level. The gateway gives every tool a trust level (low for reads, medium for writes, high for deletes), and you can change any tool's level. When a person connects an MCP client, they approve the agent at a trust level up to their maximum. The gateway checks every tool call and denies calls above the agent's level.

Do I need to change my MCP server or my agent?​

No. You change only the MCP server URL in the MCP client configuration to the gateway URL. If you turn on agent identity checks later, you also paste an instruction snippet into the agent's rules file, such as CLAUDE.md.

Which MCP clients can connect through the gateway?​

Cursor, VS Code, Claude Desktop, and Claude Code. Each MCP server's page shows the configuration for each client on its MCP URL card.

Can an agent skip the gateway?​

Yes, if the MCP client also has a direct connection to the same MCP server. The agent can call the server through that connection, and those calls are not authorized or logged by the gateway. Remove the direct entry so that only the gateway URL remains.

How does a person give an agent a higher trust level?​

The person revokes the agent on Your MCP agents (https://<subdomain>.agent.security/my-mcp-agents), then reconnects it from the MCP client and picks a higher level on the consent screen, up to their max trust. Reconnecting while the grant is active doesn't show the consent screen. An admin can lower an agent's trust level but can't raise it.

What does the gateway log?​

Each allowed or denied tool call, with the person, the agent, the tool, the MCP server, the time, and the reason. Open the Audit Logs tab of an agent, a person, or an MCP server in app.agent.security, or the Dashboard for the totals.

Is there a free tier?​

Yes. The Community plan on the Permit MCP Gateway pricing page lists "Up to 1,000 MAU (human + agentic identities)", Tenants 10, Environments 1, and Audit log retention 7 days.

Next steps​