MetorialDocs

Set up SwaggerHub in Metorial for Claude, ChatGPT and Cursor

Share SwaggerHub with your team in Claude, ChatGPT and Cursor through Metorial: API key sign-in, 15 tools (7 read-only).

To give your team SwaggerHub in Claude, ChatGPT, Cursor and other AI clients, an admin shares the SwaggerHub integration in a Metorial portal, and each person connects with an API key. Agents can create, retrieve, update, and delete API definitions (OpenAPI and AsyncAPI) and reusable domains in SwaggerHub's centralized registry. The integration has 15 tools, 7 read-only, 6 write and 2 destructive, plus 1 trigger.

What you'll learn

  • How an admin shares SwaggerHub in a portal and how each person connects
  • What SwaggerHub asks for when you connect, and where to find it
  • How to keep the 7 read-only tools and reject the other 8

Before you start

Sign-in method

MethodTypeWhat a person provides
API KeyAPI tokentoken

API Key

To connect, a person enters:

  • token: Your SwaggerHub API key. Find it at https://app.swaggerhub.com/settings/apiKey

Setup settings

Setup also asks for:

  • baseUrl (optional): Base URL for the SwaggerHub Registry API. Change this for on-premise installations.
  • owner (optional): Default owner (username or organization) to use for API operations when not explicitly specified.

Admin: share SwaggerHub in a portal

In the dashboard

Open Shared Resources

Open Workforce, choose the portal, and select Shared Resources under Access.

Share a new integration

Select Share a Resource, then New Integration, and choose SwaggerHub. For how members connect, choose Each person connects so everyone enters their own API key, or Shared connection to enter one API key for everyone.

Limit the tools

Under Tool Filters, set the write and destructive groups to Reject if agents should only read from SwaggerHub.

Choose who gets it

Add the access groups that should see SwaggerHub. When a person asks for access from the portal, the request appears under Access Requests.

With the CLI

The CLI cannot create the per-user SwaggerHub integration. Once it exists, check which groups have it:

metorial-admin portals access list <portal-id> --type provider_template --search swaggerhub

Employee: connect SwaggerHub

In the portal

Open SwaggerHub in the catalog

Sign in to your portal and open SwaggerHub. The status reads Available.

Authenticate

Under Quick setup, select Authenticate. In the setup window, enter your API key (token).

Confirm

The status changes to Configured. If it later reads Needs reconnect, select Reconnect and sign in again.

With the CLI

metorial catalog search swaggerhub
metorial setup <catalog-item-id>

catalog search prints the catalog item ID.

Add it to your AI client

metorial install adds your SwaggerHub connection to a local MCP client such as Claude Code, Cursor or Codex. metorial list prints the integration ID and metorial client list the client identifiers.

metorial list swaggerhub
metorial client list
metorial install <client-identifier> <integration-id>

For a client that takes a server URL, such as ChatGPT, metorial install custom <integration-id> creates an installation token and shows the endpoint details.

Make it read-only

Open the integration's Tool Filters and set the write and destructive groups to Reject. Agents keep the 7 read-only tools, such as get_comments and get_collaboration, and lose the 6 write tools, such as manage_projects or manage_integrations, and the 2 destructive tools, such as delete_api or delete_domain.

Employees see the result on the integration's page in the portal under Tool access. For the full walkthrough, see Tool permissions.

Check it worked

metorial list swaggerhub
metorial tools <integration-id>
metorial call <integration-id> search_apis_and_domains -d '{}'

metorial tools lists the 15 tools, minus any you rejected. search_apis_and_domains takes no input. It searches the SwaggerHub catalog for APIs and domains.

To see every input a tool takes, run metorial schema <integration-id> <tool-key>.

Tools

Read-only tools (7)

  • run_standardization: Retrieve standardization results for an API definition in SwaggerHub. Needs apiName and version.
  • get_comments: Retrieve all comments and replies on a specific API or domain version in SwaggerHub. Needs resourceName, version and resourceType.
  • get_api_definition: Inspect an API definition in SwaggerHub, or list its versions. Needs apiName.
  • get_collaboration: Retrieve the collaboration settings and list of collaborators for an API in SwaggerHub. Needs apiName.
  • search_apis_and_domains: Search the SwaggerHub catalog for APIs and domains.
  • get_domain_definition: Retrieve a domain definition from SwaggerHub. Needs domainName.
  • download_definition: Download an API or domain definition from SwaggerHub as a YAML or JSON file.

Write tools (6)

  • save_domain_definition: Create or update a domain definition in SwaggerHub. Needs domainName and definition.
  • manage_integrations: List, inspect, create, update, delete, or execute integrations on an API version in SwaggerHub. Needs apiName, version and action.
  • manage_projects: List, create, update, or delete projects in SwaggerHub. Needs action.
  • update_api_settings: Update settings for an API in SwaggerHub. Needs apiName.
  • save_api_definition: Create or update an API definition in SwaggerHub. Needs apiName and definition.
  • clone_definition_version: Create a new API or domain version by copying an existing SwaggerHub version.

Destructive tools (2)

  • delete_domain: Delete a domain or a specific domain version from SwaggerHub. Needs domainName.
  • delete_api: Delete an API or a specific API version from SwaggerHub. Needs apiName.

Triggers

SwaggerHub has 1 trigger, which fire on events in SwaggerHub:

  • api_version_event: Triggers when an API version is saved or published in SwaggerHub via a configured webhook integration.

Next steps