Custom MCP server
Put an internal or unlisted MCP server behind the gateway, choose how it signs in, and send it the user's identity
Your team runs MCP servers the catalog doesn't list, such as an internal tool or a vendor server too new to have a catalog entry. Add one as a custom server and it gets the same treatment as a catalog resource: each of its tools sits behind a policy rule and each call lands in the audit log. A custom server also takes request headers and can receive the calling user's identity, which catalog resources can't.
Add a custom server
- Navigate to MCP Servers & Tools, click Add resource, then + Custom server
- Enter a Display name, a Slug, and the Server URL for the MCP server.
The slug is the short identifier used in policies (
mcp.slug == "…") and when scoping a connection to one MCP. - Under Authentication, choose how the server signs in (see Choose how the server signs in)
- Add any headers the server needs
- Optionally add a description and an icon
- Click Add
The gateway connects to the server and discovers available tools automatically.
Choose how the server signs in
Authentication decides whose access the agent's tool calls run with:

- Users sign in themselves – each user signs in to the server once with their own account. Under Client, choose Register automatically to have the gateway register an OAuth app with the provider for you (dynamic client registration, DCR), with no credentials to enter. Choose Use your own app to enter an OAuth app you registered yourself (see Use your own app).
- Enterprise-managed – appears only when your organization has the
id_jagfeature flag. Users get access through your organization's SecureAuth Connect sign-in, with no sign-in screen. Enter the app's client ID, secret, and scopes, plus the endpoints. See Enterprise-managed authorization for the prerequisites. - OAuth app – the gateway signs in as its own app (client credentials), and every user shares that access. Enter the client ID, secret, scopes, and an issuer URL or token URL
- API key – headers sent with every request, shared by every user
- No authentication – the server needs no credentials
Use your own app
An OAuth app is a record you create in the provider's developer settings that gives you a client ID and secret. Register one with the provider first, then enter its client ID, secret, and scopes, plus the endpoints: an issuer URL, or an authorize URL and a token URL. An issuer URL works for both OpenID Connect providers and plain OAuth servers that publish only RFC 8414 metadata. When you save, the gateway reads the server's protected resource metadata and sends its resource indicator (RFC 8707) when a user signs in, which servers such as CrowdStrike require. Copy the Redirect URI to register shown with those fields, and add it to your app at the provider as an allowed redirect URI (some providers call it a callback URL).
If the provider rejects the gateway
Some providers let only a fixed list of apps connect to their MCP server, and the gateway isn't on it. You find out in one of two places:
- When you add the server – with Register automatically, the console shows an error that starts with
Registration rejected, followed by the provider's reason - When a user signs in – the provider's sign-in page rejects the gateway's redirect URI, so the user can't finish connecting
Try Use your own app instead. If the provider doesn't let you register an app or add a redirect URI, users can't sign in to that server themselves through the gateway until the provider changes this. If the server also accepts an API key or an OAuth app, those options don't use a redirect URI. Ask the provider to accept the gateway's redirect URI. To see it, choose Use your own app and copy Redirect URI to register.
Token endpoint authentication
Token endpoint authentication sets how the gateway sends the client ID and secret to the provider's token endpoint. You see it wherever you enter a client ID and secret: Use your own app, Enterprise-managed, and OAuth app. Catalog resources set up with Bring your own app have the same setting.
The default is Auto-detect.
Some providers only accept credentials in the POST body and reject HTTP Basic authentication.
With those providers, auto-detection can make a user's sign-in fail with Users sign in themselves:
the gateway tries HTTP Basic first, and that attempt uses up the user's one-time sign-in code.
If the provider is strict, choose its method:
client_secret_basic (client secret in the HTTP Basic header), client_secret_post (client secret in the POST body), or none (public client).
With Register automatically, the gateway uses the method the provider reports during registration, and you can't change it.
Give it an icon
Who can change the icon
The icon tile appears only for people with the upload_images permission.
Administrators have it.
Anyone else needs a role that grants it: an administrator creates one under Settings > Roles > Create role and gives it to you.
See Settings.
To give the server an icon, select the tile beside Display name, either when you add the server or after you choose Edit on it. Use a PNG, JPEG or WebP file of up to 1 MB. The gateway scales an image over 512 pixels on a side down to fit. Select Remove in the same menu to go back to the generic icon. Catalog resources keep their brand logo.
Headers
A custom server can take request headers that the gateway sends with every call, such as a tenant ID, a routing key, or an API key under its own name. They also let you secure an internal server at the network level: put it behind a proxy or firewall that requires a secret header, give that header to the gateway, and only calls through Agent Authority get through. Add them in the Headers section of the Connections tab, or inside Authentication with API key.
See Propagate request headers for the setup, reserved names, limits, and how values are stored.
User identity
A custom server often needs to know the person behind a call, to scope results or log the caller.
This works only when the server URL starts with https.
Switch on Send user identity on the Connections tab, and the gateway tells the server on every call, in one of two ways:
- User identity assertion – a signed token in the
X-SecureAuth-Jwt-Assertionheader, which your server verifies before it trusts the person. See User identity assertion. - User identity headers – the same person as plain
X-SecureAuth-User-headers, for a server or proxy that can't verify a token. Trust them only behind a channel check, such as a network allowlist or mutual TLS. See User identity headers.
Prefer the assertion. Only custom servers support either.
Change a custom server later
On the detail page, Edit changes the display name, description, slug, and server URL.

If you chose Register automatically, the server URL can't change: to target another server, delete the custom server and add it again. The Connections tab holds everything about authentication: the option you chose, the client credentials, the endpoints, the scopes, and the headers. Leave a secret or a header value blank there to keep the stored one.
Next steps
Your server's tools now go through the gateway, and if you switched on user identity, your server knows which person each call comes from. Decide which agents may call which of those tools in Policies, matching the server by its slug.
- Manage your MCP servers – describe, inspect, and track changes to the servers you added
- Connect an agent – scope a connection to this one server

