Swaggerhub MCP server for AI agents and assistants

Securely connect your AI agents and chatbots (Claude, ChatGPT, Cursor, etc) with Swaggerhub MCP or direct API to create APIs, update documentation, manage API versions, and collaborate on API design through natural language.

Swaggerhub logoSwaggerhub
Api Key

Swaggerhub is a collaborative API design and documentation platform built on OpenAPI. It accelerates API delivery, quality, and teamwork with powerful standards and workflow tools.

44 Tools

Try Swaggerhub now

Type what you want done — sign in and watch it run live in the Tool Router playground.

TOOL ROUTER PLAYGROUND
Swaggerhub
Try asking
TOOLS

Supported Tools

Every Swaggerhub action and event your agent gets out of the box.

Add Access Control for Teams

Tool to assign access control roles to teams on a SwaggerHub resource.

Add Access Control for Users

Tool to assign access control roles to users on a SwaggerHub resource.

Delete Table of Contents Entry

Delete a SwaggerHub portal table of contents entry by ID, optionally including nested entries.

Get Access Control Users

Tool to retrieve the list of users assigned access control on a SwaggerHub resource.

Get API Default Version

Tool to get the default version identifier of a SwaggerHub API.

Get API Versions

Tool to retrieve a list of API versions for a specific API in SwaggerHub.

Get Consumer Products

List products visible to a consumer in a SwaggerHub portal, with an optional access filter and pagination.

Get API Definition

Retrieve the definition of a specified SwaggerHub API version, including its endpoints, schemas, and documentation.

Get Domain Default Version

Tool to retrieve the default version identifier of a SwaggerHub domain.

Get domain definition

Tool to retrieve the OpenAPI definition of a specified domain version from SwaggerHub.

Get Domain JSON Definition

Tool to retrieve the OpenAPI definition for a specified domain version in JSON format.

Get Domain Lifecycle Settings

Tool to get the published status for a specific domain and version in SwaggerHub.

Get Domain Private Settings

Tool to retrieve the visibility (public or private) of a domain version in SwaggerHub.

Get Domain Versions

Tool to get a list of domain versions from SwaggerHub.

Get Domain YAML Definition

Tool to retrieve the OpenAPI definition for a specified domain version in YAML format from SwaggerHub.

Get lifecycle settings

Tool to get the published status for the specified API and version.

Get Organization Members

Tool to retrieve a list of organization members and their roles from SwaggerHub.

Get User Organizations

Tool to get organizations for a user.

Get Organization Projects V2

Tool to get all projects of an organization in SwaggerHub.

Get Owner APIs

Tool to get a list of APIs for a specified owner in SwaggerHub.

Get owner domains

Tool to retrieve domains owned by a specific SwaggerHub user or organization.

Get Portal

Tool to retrieve information about a portal.

Get Portal Access Requests

Retrieve paginated access requests for a SwaggerHub portal, optionally filtered by status or search query, with user, product, status, and timestamp details.

Get Portal Attachment

Tool to get informational attachment metadata from SwaggerHub Portal.

Get Portal Product

Retrieve information about a specific SwaggerHub portal product using its UUID or portal-subdomain:product-slug identifier.

Get Portal Products

Tool to get products for a specific portal that match your criteria.

Get Portals

Tool to search for available portals.

Get Portal Templates

Tool to get templates for a specific portal that match your criteria.

Get API Version Private Settings

Tool to get the visibility (public or private) of an API version.

List Resource Types and Roles

Tool to list available resource types and assignable roles for each in a SwaggerHub organization.

Get Templates

Tool to retrieve a list of templates for an owner in SwaggerHub.

Get User Roles

Retrieve a page of roles assigned to a user across resources in a SwaggerHub organization, including APIs, teams, domains, and other resources.

Get YAML Definition

Tool to get the OpenAPI definition in YAML format for the specified API version from SwaggerHub.

List Attachments

Tool to retrieve all attachments for a portal or product.

Remove Access Control for Teams

Tool to remove access control for teams from a SwaggerHub resource.

Remove Access Control For Users

Tool to remove access control for users from a SwaggerHub organizational resource.

Remove Organization Members

Tool to remove members from a SwaggerHub organization.

Search APIs

Search SwaggerHub APIs by free text and published state, with pagination and sorting.

Search APIs and Domains

Tool to search SwaggerHub APIs, domains, and templates.

Search Domains

Search SwaggerHub domains by text or published state, with pagination and sorting.

Search Published Portal

Search published content in a specific SwaggerHub portal for APIs, operations, schemas, or documents.

Update Access Control for Teams

Tool to update access control roles for teams on a SwaggerHub resource.

Update Access Control for Users

Tool to update access control roles for users on a SwaggerHub resource.

Update Portal

Tool to update specific portal information in SwaggerHub.

SETUP GUIDE

Connect Swaggerhub MCP Tool with your Agent

1

Install Composio

typescript
npm install @composio/core ai @ai-sdk/mcp @ai-sdk/openai
Install the Composio SDK and your agent framework
2

Create a session with MCP enabled

typescript
import { Composio } from "@composio/core";

const composio = new Composio();
const { mcp } = await composio.create("your-user-id", {
  toolkits: ["swaggerhub"],
  mcp: true,
});
Create a session scoped to Swaggerhub and read its MCP URL and headers
3

Connect your agent to the MCP server

typescript
import { createMCPClient } from "@ai-sdk/mcp";
import { openai } from "@ai-sdk/openai";
import { generateText, stepCountIs } from "ai";

const client = await createMCPClient({
  transport: { type: "http", url: mcp.url, headers: mcp.headers },
});

const { text } = await generateText({
  model: openai("gpt-5.6-sol"),
  tools: await client.tools(),
  prompt: "List all APIs I have access to in Swaggerhub.",
  stopWhen: stepCountIs(10),
});

console.log(text);
await client.close();
Pass the session's MCP URL and headers to your agent and run a Swaggerhub request
SETUP GUIDE

Connect Swaggerhub API Tool with your Agent

1

Install Composio

typescript
npm install @composio/core @composio/openai openai
Install the Composio SDK, the OpenAI provider, and the OpenAI SDK
2

Create a Composio session

typescript
import OpenAI from "openai";
import { Composio } from "@composio/core";
import { OpenAIResponsesProvider } from "@composio/openai";

const composio = new Composio({ provider: new OpenAIResponsesProvider() });
const client = new OpenAI();

const session = await composio.create("your-user-id", { toolkits: ["swaggerhub"] });
const tools = await session.tools();
Initialize Composio with the OpenAI Responses provider and create a session scoped to Swaggerhub
3

Run Swaggerhub tools with your agent

typescript
let response = await client.responses.create({
  model: "gpt-5.6-sol",
  tools,
  input: [{ role: "user", content: "List all APIs I have access to in Swaggerhub." }],
});

while (response.output.some((o) => o.type === "function_call")) {
  const outputs = await composio.provider.handleToolCalls(session, response.output);
  response = await client.responses.create({
    model: "gpt-5.6-sol",
    tools,
    previous_response_id: response.id,
    input: outputs,
  });
}

console.log(response.output_text);
Send a request, execute the Swaggerhub tool calls through the session, and print the final answer

Why Use Composio?

AI Native Swaggerhub Integration

  • Supports both Swaggerhub MCP and direct API based integrations
  • Structured, LLM-friendly schemas for reliable tool execution
  • Rich coverage for reading, writing, and querying your Swaggerhub data

Managed Auth

  • Built-in API key handling with secure storage
  • Central place to manage, scope, and revoke Swaggerhub access
  • Per user and per environment credentials instead of hard-coded keys

Agent Optimized Design

  • Tools are tuned using real error and success rates to improve reliability over time
  • Comprehensive execution logs so you always know what ran, when, and on whose behalf

Enterprise Grade Security

  • Fine-grained RBAC so you control which agents and users can access Swaggerhub
  • Scoped, least privilege access to Swaggerhub resources
  • Full audit trail of agent actions to support review and compliance

Rolling this out across your team?

Give your team centralized access control across every framework with Composio’s MCP Gateway.

EXPLORE MCP GATEWAY
FAQ

Frequently asked questions

Start with Swaggerhub.It takes 30 seconds.

Managed auth, hosted MCP servers, and every Swaggerhub tool your agent needs.Free to start.

Start building