Swagger MCP connector
OAuth 2.1/DCRDeveloper ToolsProductivityConnect to Swagger MCP. Create and manage APIs, developer portals, and documentation in SwaggerHub from AI workflows.
Swagger MCP connector
-
Install the SDK
Section titled “Install the SDK”Terminal window npm install @scalekit-sdk/nodeTerminal window pip install scalekit -
Set your credentials
Section titled “Set your credentials”Add your Scalekit credentials to your
.envfile. Find values in app.scalekit.com > Developers > API Credentials..env SCALEKIT_ENVIRONMENT_URL=<your-environment-url>SCALEKIT_CLIENT_ID=<your-client-id>SCALEKIT_CLIENT_SECRET=<your-client-secret> -
Authorize and make your first call
Section titled “Authorize and make your first call”quickstart.ts import { ScalekitClient } from '@scalekit-sdk/node'import 'dotenv/config'const scalekit = new ScalekitClient(process.env.SCALEKIT_ENV_URL,process.env.SCALEKIT_CLIENT_ID,process.env.SCALEKIT_CLIENT_SECRET,)const actions = scalekit.actionsconst connector = 'swaggermcp'const identifier = 'user_123'// Generate an authorization link for the userconst { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })console.log('Authorize Swagger MCP:', link)process.stdout.write('Press Enter after authorizing...')await new Promise(r => process.stdin.once('data', r))// Make your first callconst result = await actions.executeTool({connector,identifier,toolName: 'swaggermcp_swagger_list_organizations',toolInput: {},})console.log(result)quickstart.py import osfrom scalekit.client import ScalekitClientfrom dotenv import load_dotenvload_dotenv()scalekit_client = ScalekitClient(env_url=os.getenv("SCALEKIT_ENV_URL"),client_id=os.getenv("SCALEKIT_CLIENT_ID"),client_secret=os.getenv("SCALEKIT_CLIENT_SECRET"),)actions = scalekit_client.actionsconnection_name = "swaggermcp"identifier = "user_123"# Generate an authorization link for the userlink_response = actions.get_authorization_link(connection_name=connection_name,identifier=identifier,)print("Authorize Swagger MCP:", link_response.link)input("Press Enter after authorizing...")# Make your first callresult = actions.execute_tool(tool_input={},tool_name="swaggermcp_swagger_list_organizations",connection_name=connection_name,identifier=identifier,)print(result)
What you can do
Section titled “What you can do”Connect this agent connector to let your agent:
- Update swagger — Update the settings of an existing product within a portal
- Api swagger standardize — Standardize and fix an API definition using AI to comply with the organization’s governance rules
- Search swagger — Search for APIs and domains in the SwaggerHub registry with optional filters
- Standardization swagger scan api — Run a standardization scan on an API definition against the organization’s governance rules
- Product swagger publish portal — Publish a portal product to make its content live, or publish as a preview
- List swagger — List table of contents entries for a section within a portal product
Tool list
Section titled “Tool list”Use the exact tool names from the Tool list below when you call execute_tool. If you’re not sure which name to use, list the tools available for the current user first.
swaggermcp_swagger_create_api_from_prompt#Generate and save a new API definition in SwaggerHub using SmartBear AI from a natural language prompt.4 params
Generate and save a new API definition in SwaggerHub using SmartBear AI from a natural language prompt.
apiNamestringrequiredAPI nameownerstringrequiredAPI owner (organization or user, case-sensitive)promptstringrequiredThe prompt describing the desired API functionality (e.g., 'Create a RESTful API for managing a pet store with endpoints for pets, orders, and inventory')specTypestringoptionalSpecification type for the generated API definition. Use: 'openapi20' for OpenAPI 2.0, 'openapi30x' for OpenAPI 3.0.x (default), 'openapi31x' for OpenAPI 3.1.x, 'asyncapi2xx' for AsyncAPI 2.x, 'asyncapi30x' for AsyncAPI 3.0.xswaggermcp_swagger_create_or_update_api#Create a new API or update an existing API definition in the SwaggerHub registry.3 params
Create a new API or update an existing API definition in the SwaggerHub registry.
apiNamestringrequiredAPI namedefinitionstringrequiredAPI definition content (OpenAPI/AsyncAPI specification in JSON or YAML format). Format is automatically detected. API is created with fixed values: version 1.0.0, private visibility, automock disabled, and no project assignment.ownerstringrequiredOrganization name (owner of the API)swaggermcp_swagger_create_portal#Create a new developer portal in SwaggerHub.8 params
Create a new developer portal in SwaggerHub.
subdomainstringrequiredThe portal subdomain - used in the portal URL (e.g., 'myportal' for myportal.example.com). Must be unique, lowercase, 3-20 characters, alphanumeric with hyphensswaggerHubOrganizationIdstringrequiredThe corresponding SwaggerHub organization UUID - required for portal creation. This links the portal to your SwaggerHub organizationcredentialsEnabledbooleanoptionalWhether authentication credentials are enabled for accessing the portal. When true, users can authenticate to access private content. Defaults to truenamestringoptionalThe display name for the portal - shown to users and in branding (3-40 characters)offlinebooleanoptionalIf true, the portal will not be visible to customers - useful for development/staging environments. Defaults to falseopenapiRendererstringoptionalOpenAPI renderer type: 'SWAGGER_UI' (Swagger UI), 'ELEMENTS' (Stoplight Elements), or 'TOGGLE' (allows switching between both with Elements as default). Defaults to 'TOGGLE'pageContentFormatstringoptionalFormat for page content rendering - determines how documentation pages are processed: 'HTML', 'MARKDOWN', or 'BOTH'. Defaults to 'HTML'routingstringoptionalRouting strategy for the portal - either 'browser' (client-side routing) or 'proxy' (server-side routing). Defaults to 'browser'swaggermcp_swagger_create_portal_product#Create a new product within a portal to group and expose API documentation.8 params
Create a new product within a portal to group and expose API documentation.
namestringrequiredProduct display name - will be shown to users in the portal navigation and product listings (3-40 characters)portalIdstringrequiredPortal UUID or subdomain - unique identifier for the portal instanceslugstringrequiredURL-friendly identifier for the product - must be unique within the portal, used in URLs (e.g., 'my-api' becomes /my-api). 3-22 characters, lowercase, alphanumeric with hyphens, underscores, or dotstypestringrequiredProduct creation type - 'new' to create from scratch or 'copy' to duplicate an existing productdescriptionstringoptionalProduct description - explains what the API/product does, shown in product listings and cards (max 110 characters)hiddenbooleanoptionalWhether the product is hidden from the portal landing page navigation menus - useful for internal or draft productsproductIdstringoptionalSource product UUID to copy from - required when type is 'copy', specifies which existing product to duplicate. Omit when type is 'new'publicbooleanoptionalWhether the product is publicly visible to all portal visitors - false means only authenticated users with appropriate roles can access itswaggermcp_swagger_create_table_of_contents#Add a new entry to the table of contents for a portal product section.7 params
Add a new entry to the table of contents for a portal product section.
ordernumberrequiredOrder position of the table of contents item within its parent section or itemsectionIdstringrequiredSection ID - unique identifier for the section within the productslugstringrequiredURL-friendly identifier for the table of contents item - must be unique within the section (3-22 characters, lowercase, alphanumeric with hyphens/underscores/dots)titlestringrequiredTitle of the table of contents item - will be displayed in navigation (3-40 characters)typestringrequiredType of table of contents creation - 'new' to create from scratch or 'copy' to duplicate an existing onecontentobjectoptionalContent configuration for the table of contents itemparentIdstringoptionalParent table of contents item ID - null for top-level items, or ID of parent item for nested structureswaggermcp_swagger_delete_portal_product#Delete a product from a portal by product ID.1 param
Delete a product from a portal by product ID.
productIdstringrequiredProduct UUID or identifier in the format 'portal-subdomain:product-slug' - unique identifier for the productswaggermcp_swagger_delete_table_of_contents#Remove a table of contents entry from a portal product section.2 params
Remove a table of contents entry from a portal product section.
tableOfContentsIdstringrequiredThe table of contents UUID, or identifier in the format 'portal-subdomain:product-slug:section-slug:table-of-contents-slug'recursivebooleanoptionalFlag to include all the nested tables of contents (default: false)swaggermcp_swagger_get_api_definition#Fetch an API definition from the SwaggerHub registry by owner, API name, and version.5 params
Fetch an API definition from the SwaggerHub registry by owner, API name, and version.
apistringrequiredAPI name (case-sensitive)ownerstringrequiredAPI owner (organization or user, case-sensitive)versionstringrequiredVersion identifierflattenbooleanoptionalSet to true to create models from inline schemas in OpenAPI definition (default false)resolvedbooleanoptionalSet to true to get the resolved version with all external $refs included (default false)swaggermcp_swagger_get_document#Retrieve the content and metadata of a portal document by its ID.1 param
Retrieve the content and metadata of a portal document by its ID.
documentIdstringrequiredDocument UUID - unique identifier for the documentswaggermcp_swagger_get_portal#Retrieve configuration and details for a specific portal by ID.1 param
Retrieve configuration and details for a specific portal by ID.
portalIdstringrequiredPortal UUID or subdomain - unique identifier for the portal instanceswaggermcp_swagger_get_portal_product#Retrieve details for a specific product within a portal.1 param
Retrieve details for a specific product within a portal.
productIdstringrequiredProduct UUID or identifier in the format 'portal-subdomain:product-slug' - unique identifier for the productswaggermcp_swagger_list_organizations#List organizations the authenticated user belongs to, with optional search and pagination.5 params
List organizations the authenticated user belongs to, with optional search and pagination.
orderstringoptionalSort orderpagenumberoptional0-based index of the page to returnpageSizenumberoptionalNumber of results per page to returnqstringoptionalSearch organizations by partial or full name (case-insensitive)sortBystringoptionalThe property to sort the results byswaggermcp_swagger_list_portal_product_sections#List sections within a portal product, with optional pagination and embedded data.4 params
List sections within a portal product, with optional pagination and embedded data.
productIdstringrequiredProduct UUID or identifier in the format 'portal-subdomain:product-slug' - unique identifier for the productembedarrayoptionalList of related entities to embed in the response - e.g., ['tableOfContents', 'tableOfContents.swaggerhubApi'] to include table of contents and SwaggerHub API detailspagenumberoptionalPage number for paginated results - specifies which page of results to retrieve (default is 1)sizenumberoptionalNumber of items per page for pagination - controls how many results are returned per page (default is 20)swaggermcp_swagger_list_portal_products#List all products within a specific portal.1 param
List all products within a specific portal.
portalIdstringrequiredPortal UUID or subdomain - unique identifier for the portal instanceswaggermcp_swagger_list_portals#List all portals the user has access to.0 params
List all portals the user has access to.
swaggermcp_swagger_list_table_of_contents#List table of contents entries for a section within a portal product.4 params
List table of contents entries for a section within a portal product.
sectionIdstringrequiredSection ID - unique identifier for the section within the productembedarrayoptionalList of related entities to embed in the response - e.g., ['swaggerhubApi'] to include SwaggerHub API detailspagenumberoptionalPage number for paginated results - specifies which page of results to retrieve (default is 1)sizenumberoptionalNumber of items per page for pagination - controls how many results are returned per page (default is 20)swaggermcp_swagger_publish_portal_product#Publish a portal product to make its content live, or publish as a preview.2 params
Publish a portal product to make its content live, or publish as a preview.
productIdstringrequiredProduct UUID or identifier in the format 'portal-subdomain:product-slug' - unique identifier for the productpreviewbooleanoptionalWhether to publish as preview (true) or live (false). Preview allows testing before going live. Defaults to false (live publication)swaggermcp_swagger_scan_api_standardization#Run a standardization scan on an API definition against the organization's governance rules.2 params
Run a standardization scan on an API definition against the organization's governance rules.
definitionstringrequiredAPI definition content (OpenAPI/AsyncAPI specification in JSON or YAML format) to scan for standardization errorsorgNamestringrequiredThe organization name to use for standardization rulesswaggermcp_swagger_search_apis_and_domains#Search for APIs and domains in the SwaggerHub registry with optional filters.9 params
Search for APIs and domains in the SwaggerHub registry with optional filters.
limitnumberoptionalNumber of results per page (1-100, default 20)offsetnumberoptionalOffset for pagination (0-based, default 0)orderstringoptionalSort order - ASC or DESC (default ASC)ownerstringoptionalFilter APIs by owner (organization or user)querystringoptionalSearch query to filter APIs by name, description, or contentsortstringoptionalSort field - NAME, UPDATED, or CREATED (default NAME)specTypestringoptionalFilter by specification type - API or DOMAIN (default all types)statestringoptionalFilter APIs by publication state - ALL (default), PUBLISHED, or UNPUBLISHEDtagstringoptionalFilter APIs by tagswaggermcp_swagger_standardize_api#Standardize and fix an API definition using AI to comply with the organization's governance rules.4 params
Standardize and fix an API definition using AI to comply with the organization's governance rules.
apistringrequiredAPI name (case-sensitive)ownerstringrequiredAPI owner (organization or user, case-sensitive)versionstringrequiredVersion identifiernewVersionstringoptionalThe version to save the fixed definition as (e.g. '1.0.1'). Omitting this will overwrite the current version — prefer providing a patch bump (e.g. '1.0.0' → '1.0.1') unless the user specifies otherwise.swaggermcp_swagger_update_document#Update the content or source URL of an existing portal document.4 params
Update the content or source URL of an existing portal document.
documentIdstringrequiredDocument UUID - unique identifier for the documentcontentstringoptionalThe document content to update (HTML or Markdown based on document type)sourcestringoptionalSource of the document content - 'internal' allows to edit content in both UI and API, 'external' enables editing only via API.typestringoptionalContent type - 'html' for HTML content or 'markdown' for Markdown contentswaggermcp_swagger_update_portal#Update the configuration of an existing portal.10 params
Update the configuration of an existing portal.
portalIdstringrequiredPortal UUID or subdomain - unique identifier for the portal instancecredentialsEnabledbooleanoptionalEnable/disable authentication credentials for portal access - controls whether users can authenticate to view private contentcustomDomainbooleanoptionalEnable/disable custom domain for the portal - allows using your own domain instead of the default subdomaingtmKeystringoptionalGoogle Tag Manager key for analytics tracking - format: GTM-XXXXXX (max 25 characters)namestringoptionalUpdate the portal display name - shown to users and in branding (3-40 characters)offlinebooleanoptionalSet portal visibility - true hides portal from customers (useful for maintenance or development)openapiRendererstringoptionalChange OpenAPI renderer: 'SWAGGER_UI' (Swagger UI), 'ELEMENTS' (Stoplight Elements), or 'TOGGLE' (switch between both)pageContentFormatstringoptionalUpdate page content format for documentation rendering: 'HTML', 'MARKDOWN', or 'BOTH'routingstringoptionalUpdate routing strategy - 'browser' for client-side routing or 'proxy' for server-side routingsubdomainstringoptionalUpdate the portal subdomain - changes the portal URL. Must remain unique across all portals (3-20 characters, lowercase, alphanumeric with hyphens)swaggermcp_swagger_update_portal_product#Update the settings of an existing product within a portal.6 params
Update the settings of an existing product within a portal.
productIdstringrequiredProduct UUID or identifier in the format 'portal-subdomain:product-slug' - unique identifier for the productdescriptionstringoptionalUpdate product description - explains the API/product functionality, shown in listings (max 110 characters)hiddenbooleanoptionalChange navigation visibility - true hides from portal landing page menus while keeping the product accessible via direct linksnamestringoptionalUpdate product display name - changes how it appears to users in navigation and listings (3-40 characters)publicbooleanoptionalChange product visibility - true makes it publicly accessible to all visitors, false restricts to authenticated users with rolesslugstringoptionalUpdate URL-friendly identifier - must remain unique within the portal, affects product URLs (3-22 characters, lowercase, alphanumeric with hyphens/underscores/dots)