Connect AI clients to Agent Gateway
Add the Agent Gateway MCP endpoint URL to Claude, ChatGPT, Cursor, VS Code, Claude Code, Windsurf, Grok Bot or any MCP client, then sign in once.
Each person on your team connects their own AI client to the Gateway’s MCP endpoint URL, then signs in with their own account. This page shows how to add the URL to each client, and what happens the first time the client connects.
Before you start
Section titled “Before you start”- The MCP endpoint URL. Copy it from Settings in Agent Gateway, or from the last step of the Quickstart. If your environment has a custom domain, the URL uses it.
- A Gateway user account for the person connecting. You’re added when you enable the Gateway. Add more users under Identity.
Add the URL to your client
Section titled “Add the URL to your client”The dashboard shows the same steps under Connect your agent after setup. In the examples below, replace <MCP endpoint URL> with your URL.
Claude
Section titled “Claude”- Open Claude, then go to Settings > Connectors.
- Select Add custom connector.
- Paste the MCP endpoint URL and select Add.
ChatGPT
Section titled “ChatGPT”- Open ChatGPT, then go to Settings > Apps > Advanced settings, and turn on Developer mode.
- Add a new connector and paste the MCP endpoint URL.
Cursor
Section titled “Cursor”In the dashboard, pick Cursor under Connect your agent and select Open in Cursor. Cursor opens and adds the Gateway as an MCP server named gateway.
VS Code
Section titled “VS Code”- Open the Command Palette: ⇧⌘P on macOS, Ctrl+Shift+P on Windows and Linux.
- Run MCP: Add Server, choose HTTP and paste the MCP endpoint URL.
- Name the server, for example
gateway, and choose Global or Workspace.
Claude Code
Section titled “Claude Code”Run this command in your terminal:
claude mcp add gateway --transport http <MCP endpoint URL>Windsurf and other MCP clients
Section titled “Windsurf and other MCP clients”Add the Gateway to the client’s MCP server configuration as an HTTP server:
{ "mcpServers": { "gateway": { "type": "http", "url": "<MCP endpoint URL>" } }}The client must support remote MCP servers that sign in with OAuth.
Grok Bot
Section titled “Grok Bot”- In a Grok Bot chat, ask it to add the Gateway as a custom server, for example: “Add a custom MCP server called gateway at
<MCP endpoint URL>”. - Grok Bot shows a connect card. Select Authorize and sign in.
Sign in the first time
Section titled “Sign in the first time”The first time a client connects, it opens a browser window:
- Sign in with your Gateway user account.
- Approve the consent screen. It lets the client act on your behalf through the Gateway.
The client then lists the tools from the Gateway’s connections that your groups allow.
Connect your app accounts
Section titled “Connect your app accounts”Each person connects their own account for each app, such as their own Gmail or Outlook. The first time a tool needs an app you haven’t connected, the client returns a link instead of a result. Open the link, sign in to the app and approve access, then ask the client to try again.
Review and revoke access
Section titled “Review and revoke access”Each user has their own account pages at <environment URL>/ui/agents/get-started. Get started there shows the MCP endpoint URL and the setup for each client, so you can send teammates that link. The same pages let each user review their own access:
- Connected apps lists the apps you’ve connected. Select Disconnect to stop agents from using an app. An agent asks you to connect it again the next time it needs it.
- Authorized agents lists the AI clients you’ve approved. Select Revoke to stop a client from getting new tokens. A token it already has keeps working until it expires.
As an admin, you set how long access tokens last with Access token lifetime in Settings.
Common problems
Section titled “Common problems”The client can’t register with the Gateway
Section titled “The client can’t register with the Gateway”Most AI clients register themselves the first time they connect. In Settings > Advanced configuration, keep Allow dynamic client registration turned on. Some clients identify themselves with a metadata URL instead; for those, turn on Allow Client ID Metadata Document (CIMD).
The client connects but shows no tools, or fewer than expected
Section titled “The client connects but shows no tools, or fewer than expected”Tools appear only for connections your groups can use. Open the connection under Connections, then its Policies tab, and select Preview Access to see which tools a user gets. See Access policies.
Requests return 404
Section titled “Requests return 404”The Gateway is disabled for the environment. Open Settings and select Re-enable Gateway. Users, registered clients and logs are kept while it’s disabled.