# Creating Swagger MCP Servers

> Create a Swagger MCP Server in Orchestrator by supplying an OpenAPI document that describes the API to expose as tools.

:::note
This functionality is in preview.
:::

A Swagger MCP Server turns an OpenAPI document into MCP tools. You supply the document, and each operation it describes becomes a tool that the server invokes over HTTP.

## Prerequisites

- The folder-level **Create** permission for **MCP Servers**.
- The OpenAPI document for the API, either as a URL or as a file you can paste.

## Create a Swagger MCP Server

1. In **Agent Gateway > MCP Servers**, select the **Add MCP Server** menu.
2. Under **External**, select **Swagger**.
3. Enter a **Name**. This is the display name shown in the server list.
4. Enter a **Slug**.
   :::note
   The slug accepts lowercase letters, numbers, and hyphens only, and must be between 3 and 50 characters. It becomes the last segment of the server URL.
   :::
5. Optionally, enter a **Description** of up to 500 characters.
6. Choose how to supply the OpenAPI document: select **From URL** and enter the **Swagger URL** it's served from, or select **Paste JSON** and paste the document itself.
   :::note
   **From URL** is the option to prefer, since it's the only one that supports refreshing the tools later. Use **Paste JSON** when the document isn't served at an address UiPath can reach. Switching between the two options clears what you entered in the other.
   :::
7. Select the **Connection Type**: **Standard** to connect directly over the public internet, or **Private (Relay)** to route traffic through [UiPath Relay](https://docs.uipath.com/automation-cloud/automation-cloud/latest/admin-guide/relay) for an API inside your own network.
8. Add the **Headers** the API expects, one per line, in the form `Name:value`.
   :::note
   The resolved value is sent to the API as the configured header, so use asset-backed headers only for endpoints you trust with those secrets.
   :::

   Instead of pasting a secret, give a header a value of the form `%ASSETS/AssetName%`. UiPath resolves it against the asset in the server's folder before sending the request, and the call fails rather than forwarding an unresolved placeholder if the asset can't be read. The autocomplete lists only assets that allow Automations and API access.
9. Optionally, expand **Guardrails** and configure them.
10. Select **Add**.

**Result:** UiPath reads the document, fetching it if you gave a URL, and creates one tool per operation it describes. If the document can't be read, the server isn't created, and the error names the reason. Select **Copy URL** on the server's row to get its address:

```plaintext
https://cloud.uipath.com/{org_name}/{tenant_name}/agenthub_/mcp/{folder_key}/{server_slug}
```

Text, Secret, Bool, Integer, Credential, and Windows Credential assets are supported for asset-backed headers; Credential and Windows Credential assets resolve to the password value. Key-value-list assets aren't supported, since one header value must resolve to one string.

To pick up changes to the API later, select **Refresh** on the server. It re-reads the document from its URL and rebuilds the tool list; connected clients see the new list the next time they ask for one. A server created from a pasted document has no URL to re-read, so keeping it current means editing the pasted document.

:::note
On a **Standard** connection, the request UiPath makes to the API has a 30-second timeout and a 1 MiB response limit, and the tool call is held open until it returns. Long-running operations, and operations that return large payloads, aren't a good fit for this server type.
:::

Calls appear in the **Runs** tab on the server.

For how callers authenticate and which permissions they need, check [MCP Server authentication](./mcp-server-authentication.md). For what this server type is and how it compares with the others, check [MCP Server types](./mcp-server-types.md#swagger-mcp-servers).
