Skip to main content

Connect an MCP client

Use this page to add your PolicyArc environment to an MCP client. Every client points at the same gateway URL. The client matrix shows which clients have been run against the gateway, at which version and on which date.

Copy your gateway URL​

In the Admin Portal, under Configure, select Clients & Agents and then the Connect MCP Client tab. The Endpoint line at the bottom of the Connect an MCP Client card shows your gateway URL. The snippets on that tab already contain it.

The snippets below use https://your-environment.example/gateway/mcp. Replace it with the URL you copied.

You do not create a client or a secret in PolicyArc first. Each client identifies itself when it signs you in.

Add the server and sign in​

Add the server. By default Claude Code adds it in the local scope, which is private to you in the current project. Add --scope user to use it in every project.

claude mcp add policyarc https://your-environment.example/gateway/mcp --transport http

Sign in. Claude Code opens your browser at your identity provider.

claude mcp login policyarc

After you sign in, Claude Code prints Authenticated with "policyarc". Its tools are now available in Claude Code. Then check the connection.

claude mcp list

You should see policyarc: https://your-environment.example/gateway/mcp (HTTP) - ✔ Connected.

Run with Claude Code 2.1.296 on 2026-10-12. A tool call from Claude Code has not been run. Claude Code has the full steps.

If something goes wrong​

  • If the client never opens a sign-in page, check the URL. Check the gateway without a client shows the 401 and the WWW-Authenticate header that every client starts from.
  • If claude mcp list shows ! Needs authentication, run claude mcp login policyarc.
  • If opencode mcp list shows needs authentication, run opencode mcp auth policyarc.