Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to the Swagger MCP server

Vendor MCP
Open markdown

The Swagger MCP connector routes your AI agent's tool calls to Swagger's own MCP server through Scalekit. Each user signs in to Swagger once, and Scalekit stores and refreshes their tokens, so your agent never handles credentials. It comes with 28 tools.

Tools
28
What they doRead · write · destructive
12 · 7 · 912 read7 write9 destructive
Users sign in with
OAuth app
Scalekit's or your own

What you can do

  • Search and fetch APIs: find APIs and domains in the SwaggerHub registry and read their resolved definitions
  • Create and update APIs: save new OpenAPI or AsyncAPI definitions, or generate one from a plain-language prompt
  • Check API standards: scan definitions against your organization’s governance rules and fix the errors they find
  • Manage portals and products: create, update, and publish developer portal products, live or as a preview
  • Organize portal docs: add, edit, and delete documentation pages and table of contents entries in product sections

Setup

  1. Install the SDK

    Terminal window
    npm install @scalekit-sdk/node dotenv
  2. Set your credentials

    Add your Scalekit credentials to your .env file. 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>
  3. Create the Swagger MCP connection

    In AgentKit > Connections, create a Swagger MCP connection. The name you give it is the connection_name your code passes. See Configure connections.

    Scalekit credentials are available for Swagger MCP server, so you don't need to register an OAuth app.

  4. Authorize a user and make your first call

    quickstart.mts
    import { ScalekitClient } from '@scalekit-sdk/node'
    import 'dotenv/config'
    import { createInterface } from 'node:readline/promises'
    const scalekit = new ScalekitClient(
    process.env.SCALEKIT_ENVIRONMENT_URL,
    process.env.SCALEKIT_CLIENT_ID,
    process.env.SCALEKIT_CLIENT_SECRET,
    )
    const actions = scalekit.actions
    const connector = 'swaggermcp'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize Swagger MCP:', link)
    const rl = createInterface({ input: process.stdin, output: process.stdout })
    await rl.question('Press Enter after authorizing...')
    rl.close()
    // Make your first call
    const result = await actions.executeTool({
    connector,
    identifier,
    toolName: 'swaggermcp_swagger_list_organizations',
    toolInput: {},
    })
    console.log(result)
    Terminal window
    npx tsx quickstart.mts

    Each user signs in once. See Authorize a user for the full flow and statuses.

Tools

Pass the exact name to execute_tool
Try in PlaygroundRequest a tool
  • swaggermcp_swagger_get_api_definitionFetch resolved API definition from SwaggerHub Registry based on owner, API name, and version.Read-only

    Swagger Get Api Definition

    Fetch resolved API definition from SwaggerHub Registry based on owner, API name, and version. **Toolset:** Registry API **Parameters:** - owner (string) *required*: API owner (organization or user, case-sensitive) - api (string) *required*: API name (case-sensitive) - version (string) *required*: Version identifier - resolved (boolean): Set to true to get the resolved version with all external $refs included (default false) - flatten (boolean): Set to true to create models from inline schemas in OpenAPI definition (default false)

    Inputs

    apistringrequired
    API name (case-sensitive)
    ownerstringrequired
    API owner (organization or user, case-sensitive)
    versionstringrequired
    Version identifier
    flattenboolean
    Set to true to create models from inline schemas in OpenAPI definition (default false)
    formatstring
    Response format: 'json' (default) may convert YAML to JSON; 'text' returns the definition as YAML — required for swagger_patch_api edits.one of jsontext
    resolvedboolean
    Set to true to get the resolved version with all external $refs included (default false)
  • swaggermcp_swagger_get_documentGet document content and metadata by document ID.Read-only

    Swagger Get Document

    Get document content and metadata by document ID. Useful for retrieving HTML or Markdown content from table of contents items. **Toolset:** Documents **Parameters:** - documentId (string) *required*: Document UUID - unique identifier for the document

    Inputs

    documentIdstringrequired
    Document UUID - unique identifier for the document
  • swaggermcp_swagger_get_portalRetrieve information about a specific portal.Read-only

    Swagger Get Portal

    Retrieve information about a specific portal. **Toolset:** Portals **Parameters:** - portalId (string) *required*: Portal UUID or subdomain - unique identifier for the portal instance

    Inputs

    portalIdstringrequired
    Portal UUID or subdomain - unique identifier for the portal instance
  • swaggermcp_swagger_get_portal_productRetrieve information about a specific product resource.Read-only

    Swagger Get Portal Product

    Retrieve information about a specific product resource. **Toolset:** Products **Parameters:** - productId (string) *required*: Product UUID or identifier in the format 'portal-subdomain:product-slug' - unique identifier for the product

    Inputs

    productIdstringrequired
    Product UUID or identifier in the format 'portal-subdomain:product-slug' - unique identifier for the product
  • swaggermcp_swagger_list_organizationsGet organizations for a user.Read-only

    Swagger List Organizations

    Get organizations for a user. Returns a list of organizations that the authenticating user is a member of. On-Premise admin gets a list of all organizations in the system. **Toolset:** Registry API **Parameters:** - q (string): Search organizations by partial or full name (case-insensitive) - sortBy (enum): The property to sort the results by - order (enum): Sort order - page (number): 0-based index of the page to return - pageSize (number): Number of results per page to return

    Inputs

    orderstring
    Sort orderone of ASCDESC
    pagenumber
    0-based index of the page to return
    pageSizenumber
    Number of results per page to return
    qstring
    Search organizations by partial or full name (case-insensitive)
    sortBystring
    The property to sort the results byone of NAMEEMAIL
  • swaggermcp_swagger_list_portal_product_sectionsGet sections for a specific product within a portal.Read-only

    Swagger List Portal Product Sections

    Get sections for a specific product within a portal. **Toolset:** Sections **Parameters:** - productId (string) *required*: Product UUID or identifier in the format 'portal-subdomain:product-slug' - unique identifier for the product - embed (array): List of related entities to embed in the response - e.g., ['tableOfContents', 'tableOfContents.swaggerhubApi'] to include table of contents and SwaggerHub API details - page (number): Page number for paginated results - specifies which page of results to retrieve (default is 1) - size (number): Number of items per page for pagination - controls how many results are returned per page (default is 10)

    Inputs

    productIdstringrequired
    Product UUID or identifier in the format 'portal-subdomain:product-slug' - unique identifier for the product
    embedarray
    List of related entities to embed in the response - e.g., ['tableOfContents', 'tableOfContents.swaggerhubApi'] to include table of contents and SwaggerHub API details
    pagenumber
    Page number for paginated results - specifies which page of results to retrieve (default is 1)
    sizenumber
    Number of items per page for pagination - controls how many results are returned per page (default is 20)
  • swaggermcp_swagger_list_portal_productsGet products for a specific portal that match your criteria.Read-only

    Swagger List Portal Products

    Get products for a specific portal that match your criteria. **Toolset:** Products **Parameters:** - portalId (string) *required*: Portal UUID or subdomain - unique identifier for the portal instance

    Inputs

    portalIdstringrequired
    Portal UUID or subdomain - unique identifier for the portal instance
  • swaggermcp_swagger_list_portalsSearch for available portals within Swagger.Read-only

    Swagger List Portals

    Search for available portals within Swagger. Only portals where you have at least a designer role, either at the product level or organization level, are returned. **Toolset:** Portals

    Inputs

    This tool takes no inputs.