Skip to main content

Create a third-party MCP Server with OAuth 2.1 in Cequence AI Gateway

Because agents act as the person using them, an agent can only see and do what that person can in the service. The example below uses GitHub; the steps are the same for any third-party app, such as Jira or Slack.

1. Find the app in the App Catalog​

  1. In the sidebar, select App Catalog.
  2. Set the Source filter to Third-party, then search for the service by name.
  3. Select the app.

Some services have two entries: an OpenAPI Spec app and a Remote MCP Server app. Either works; this example uses the OpenAPI Spec version of GitHub.

The App Catalog filtered to Third-party apps and searched for GitHub, showing two GitHub entries, one OpenAPI Spec and one Remote MCP Server.The App Catalog filtered to Third-party apps and searched for GitHub, showing two GitHub entries, one OpenAPI Spec and one Remote MCP Server.

2. Start the Create MCP Server wizard​

The app's details open on the right. Under MCP Registry, select Add to MCP Registry.

The GitHub app details panel, with the API Registry and MCP Registry cards at the top and the Add to MCP Registry button.The GitHub app details panel, with the API Registry and MCP Registry cards at the top and the Add to MCP Registry button.

3. Choose the tools and set up the server​

The first two wizard steps are the same for every app:

  1. App Configuration — select the endpoints agents can use as tools, then select Next.
  2. MCP Server Setup — check the server name and description, choose the environment and where the server runs, then select Next.

For more on each option, see App Configuration and MCP Server Setup in Getting Started.

4. Set up OAuth 2.1 Authorization​

On the Authentication step, select OAuth 2.1 Authorization. For apps in the App Catalog, most of the form is filled in for you.

  1. Check the Authorization URL and Token URL.
  2. Under Callback, keep Latest (recommended). If the service asks you to register a redirect URL, copy it from here.
  3. Under Client registration, keep the option the form selected, unless your IT team has given you an OAuth app to use. In that case, select Use my own client and enter its Client ID and Client secret.
  4. Under Scopes, choose what agents may do in the service on each person's behalf. Auto-add Scopes adds the scopes the tools you selected need.
  5. Select Next.
The Authentication step with OAuth 2.1 Authorization selected, showing the Authorization URL and Token URL, the Callback options, and the Client registration options.The Authentication step with OAuth 2.1 Authorization selected, showing the Authorization URL and Token URL, the Callback options, and the Client registration options.

Every field on this form is explained in OAuth 2.1 Authorization.

5. Review and deploy​

Check the summary and select Create & Deploy. Once the server is running, each person connects their own account the first time they use it — see Connect your apps.

What to ask your IT team​

You only need this if you use Use my own client.

Ask forWhy
The Client ID and Client secret of an OAuth app registered with the serviceThe AI Gateway uses them to identify itself when people sign in
The AI Gateway's callback URL added as an allowed redirect URL on that OAuth appSign-in fails until the service allows it
The scopes your organization approves for agentsSo agents get only the access they need

Tips​

  • Start with the fewest scopes your agents need. You can add more later.
  • Keep the recommended options for Callback and Client registration unless you have a reason to change them — the form picks what the service supports.
  • Internally-hosted server? If your MCP server runs on a private network the Gateway can't reach directly, see Onboarding an internally-hosted MCP server.