Apono Agent Privilege Guard for Custom OAuth MCPs
Configure governed, just-in-time AI access to OAuth-protected custom MCP servers
Set up Apono Agent Privilege Guard for Custom OAuth MCPs to give AI agents controlled, temporary access to an MCP server your organization runs or any OAuth MCP server that is not available as an Apono Managed MCP.
An Apono admin creates a Custom MCP (OAuth) integration for the server, adds the MCP server to Apono, and creates an agentic access flow. Each user then connects a supported AI client through the Local Agentic Gateway, which brokers requests between the AI client, Apono, and the MCP server.
Each OAuth MCP server requires its own Custom MCP (OAuth) integration, custom MCP configuration, and agentic access flow. Access is requested and granted per server, and each server appears as its own target to the agent.
Set up the Apono account
An Apono admin completes this setup once for each OAuth MCP server that agents need to access.
After the Apono account setup is complete, each user can connect a supported AI client to the Agentic Gateway.
Prerequisites
OAuth MCP integration
Connected Apono integration for this OAuth MCP server
Verify that the integration exists and is healthy on the Connected tab. If no custom OAuth MCP integration is connected, follow the Custom MCP (OAuth) integration docs.
OAuth authorization
Authorization server that supports either Dynamic Client Registration (DCR) or a pre-registered public client with PKCE
Additional information:
OAuth client ID for a pre-registered client
Accepted scopes, if required by the server
Device authorization endpoint, if required by the server
IMPORTANT: Client-secret authentication and other OAuth methods are not supported.
Create an agentic access flow
Create a Self Serve access flow that allows agents to request temporary access to the custom OAuth MCP on behalf of permitted users:
Follow the procedure in Self Serve Access Flows to define the requestors, resources, access duration, and approval process. As you create the flow, apply the following settings for agentic access.
Access Flow Name
Enter a unique, user-friendly name, such as Agentic - Custom OAuth MCP.
When Requestor
Select the users or groups on whose behalf an agent can request access. The agent can request access only on behalf of its associated user, so that user must match these requester conditions. For Can request for, select Themselves.
Request access to
Select the Custom MCP (OAuth) integration for the server, and then select the User resource type and the Impersonate permission.
Follow the Integrations instructions in the Define the resource section of the Self Serve Access Flows guide.
Grant for
Set the access duration to 5 minutes.
Approval
Select Automatic
Settings
Click the Restrict to agentic access toggle to enable the setting.
Configure any other Self Serve access flow settings according to your organization’s access policies.
Click Save Access Flow.
Enable MCP features and the Custom MCP
Follow these steps:
On the Account Settings page, under AI & Automation, click the Enable MCP features toggle to enable the setting. The toggle turns green.
On the MCPs tab, click + Add Custom MCP. The Custom MCP panel opens.
On the Config tab, enter a Name.
From the Resource Types dropdown menu, select User (custom-mcp-oauth-user).
Under MCP Server Configuration, click HTTP.
Enter the Endpoint URL for the OAuth MCP server.
Add OAuth headers only as required by the MCP server. Enter each header value as a constant.
Under Headers, click + Add Header.
Enter a Name and Value. See table below.
Repeat steps a-b for each header.
APONO_OAUTH_CLIENT_ID
(Client ID) OAuth client ID Apono uses with the MCP server's authorization server
Use when the authorization server requires a pre-registered client.
Example: acme-mcp-client
APONO_ACCEPTED_SCOPES
Scopes the MCP server accepts
Use when the server requires specific scopes.
Example: billing.read,billing.write
APONO_OAUTH_DEVICE_AUTH_ENDPOINT
Device authorization endpoint of the MCP server's authorization server
Use when the authorization server requires a device authorization endpoint
Example: https://idp.acme.com/oauth2/device/
(Optional) Adjust the Intent Policy.
Click + Add MCP. The panel closes. The new MCP appears under Custom MCPs in an enabled state.
After setup, use the AI Agents tab to view discovered agents and their associated users. Use the AI Sessions tab to review agent activity, including access grants, tool calls, and intent policy decisions.
Set up the Agentic Gateway on a local machine
Each user running the gateway completes this setup on their local machine.
Prerequisites
Apono account setup completed
Enablement of MCP feature for the Apono account
Confirm that an Apono admin has set up the Apono Account:
Connected the applicable integration
Created an agentic access flow with Restrict to agentic access enabled
Enabled MCP features and the custom OAuth MCP
Supported operating systems
Supported operating systems:
macOS
Windows 11 (native)
WSL2 (Ubuntu)
Node.js 20+
Required runtime
The gateway is launched with npx, which runs @apono-io/apono-mcp@latest, downloads the gateway binary, and manages the Apono sign-in. No separate Apono CLI installation is required.
Configure your AI client
Follow these steps:
Run the following command for your operating system. If this is the first run, a separate browser tab opens.
macOS
Windows 11 (native)
In Command Prompt or PowerShell:
WSL2 (Ubuntu)
(First run only) Log in to Apono in the open browser tab.
Follow these steps:
In Claude, from the main navigation, click Claude > Settings > Developer. The Settings page appears.
Click Edit Config. The claude_desktop_config.json file opens.
Add the following configuration.
Save the file.
Quit and restart Claude desktop.
(First run only) Log in to Apono in the browser tab that opens.
Quick Start Installation
Follow these steps:
Click the following button to install the MCP Server. The MCP page in Cursor opens.
Click Install.
Quit and restart Cursor.
(First run only) Log in to Apono in the browser tab that opens.
Manual Installation
Follow these steps:
In Cursor, from the main navigation, click Tools & MCPs. The Tools page appears.
Under Home MCP Servers, click New MCP Server. The mcp.json file opens.
Add the following configuration.
Save the file.
Quit and restart Cursor.
(First run only) Log in to Apono in the browser tab that opens.
Verify your agent
Perform the following tests:
Ask the assistant to list your available integrations. The custom MCP (OAuth) target should appear.
Ask it to perform an action, such as "List my projects". The agent will request access through the agentic access flow.
If either task fails, troubleshoot your setup.
Troubleshooting
Apono Account
Local Machine
Last updated
Was this helpful?
