Quickstart: let AI clients operate your API

Create a gateway for one of your APIs and connect an AI client to it. At the end, the client lists records from your API through the gateway, and the request is in the gateway's logs.

This is the short path, with the defaults. For each step explained on an example app, see Publish your API as an MCP server.

Prerequisites

  • An API in your workspace whose analysis has finished, with a connection that passes its test. See Analyze your first API.
  • Claude Code, or an account on claude.ai that can add custom connectors.

1. Create the gateway

  1. In the portal, go to Agent Gateway and select New Gateway.
  2. Under Who is this gateway for?, select People using chat and coding agents.
  3. Under APIs, select your API, then Continue.
  4. Under Name & URL, enter a Name and select Continue.
  5. Under First credential, select A user, enter a Display name and keep the generated password. Select Continue.
  6. Select Create gateway.
  7. Copy the username and the password from the dialog. The password is shown once.

The gateway exposes every operation of the API in its Production environment. The user can call all of them, and is asked to approve the ones that require confirmation.

2. Copy the MCP URL

In the gateway's Connect tab, copy the MCP URL from the Endpoints card. It has this form:

https://gateway.faustine.ai/<workspace>/<gateway>/mcp

3. Connect a client

Add the gateway as an MCP server. <GATEWAY> is a name for the server and <MCP_URL> is the URL you copied.

terminal
claude mcp add --transport http <GATEWAY> <MCP_URL>

Start Claude Code and run /mcp. Select the server, then Authenticate. The browser opens the gateway's sign-in page. Enter the username and the password of the gateway user.

The client lists three tools: search_operations, get_operation and run_code.

4. Make a call

Ask the client for something your API returns. With a CRM API:

List the five most recent contacts.

The client searches the gateway's operations, writes a short script that calls the one it needs, and answers with the result.

Checkpoint

The client shows records from your API. In the portal, the gateway's Logs tab has a run_code request with the status OK, and the Overview tab shows First successful call as done.

Call the gateway from code

An automation uses an API key instead of a user. Create one in Access > API keys > Create key, then call an operation over REST. <GATEWAY_KEY> is the key, and <API> and <OPERATION> are the two parts of an operation key from the gateway's Operations tab, such as crm and contacts.list.

terminal
curl "https://gateway.faustine.ai/<workspace>/<gateway>/api/<API>/<OPERATION>" \
  -H "Authorization: Bearer <GATEWAY_KEY>"

GET works for read operations. A write takes POST with a JSON body. See Gateway HTTP.

Troubleshooting

Symptom Cause Fix
The sign-in page rejects the username and the password The user belongs to another environment, or the password was mistyped. Use the MCP URL from the Connect tab of the environment where you created the user. To set a new password, select Reset password on the user's page.
The client answers that an operation failed with upstream_error Your API answered with an error or could not be reached. Open the request in Logs to see the exchange with your API, and test the connection on the API's Connections tab.
A write is refused with requires_confirmation The client cannot show a confirmation. See Confirmation for the clients that can.

Next steps

Last updated November 13, 2026