SmartBear VS Code Extension

The Swagger Model Context Protocol (MCP) Server lets AI assistants in Visual Studio Code (VS Code) work directly with your Swagger data. This topic explains the prerequisites, how to set up the SmartBear VS Code Extension, how to work with the Swagger tools in chat, and what to check if the connection fails.

The Swagger MCP Server is available in VS Code through the GitHub MCP Registry, so you can set it up directly from the Extensions view. No manual configuration or local server installation is required. For more information about MCP and the Swagger MCP Server, see Swagger MCP Server.

Prerequisites for the SmartBear VS Code Extension

  • The latest version of VS Code with GitHub Copilot enabled.

  • An account with access to Swagger.

Set up the SmartBear VS Code Extension

To connect to the Swagger MCP Server from VS Code, do the following:

  1. In VS Code, open the Extensions view.

  2. In the search box, enter @mcp swagger. VS Code shows the matching MCP servers from the GitHub MCP Registry.

  3. In the results, select the Swagger MCP Server to open its details page.

  4. On the details page, select Install.

  5. In the confirmation dialog box, confirm that you trust the server to start it.

  6. Follow the onscreen instructions to sign in with your account. Authentication for the Swagger MCP Server is handled in your browser, so you do not need to create or manage API tokens.

VS Code starts the Swagger MCP Server, discovers the available tools, and makes them available in chat.

Tip

Selecting Install adds the Swagger MCP Server to your user profile and makes it available in all your workspaces. To add the server to the current workspace only, right-click it in the results and select Install in Workspace.

Work with SmartBear VS Code Extension

To verify the connection and start working with your Swagger data, do the following:

  1. In VS Code, open the Chat view.

  2. In the mode list, select Agent.

  3. Enter a request that uses the Swagger tools.

  4. To review the available tools or turn individual tools on or off, select the tools icon in the chat input box.

For example, you can send the following requests to the Swagger MCP Server:

List the APIs in my organization.
Fetch the latest version of the Petstore API definition.

SmartBear VS Code Extension FAQ and troubleshooting

Do I need to install the Swagger MCP Server locally to use it in VS Code?

No. The Swagger MCP Server is available through the GitHub MCP Registry, so you can connect to it directly from the VS Code Extensions view without a local server installation or manual configuration.

Do I need an API token to connect to the Swagger MCP Server in VS Code?

No. Authentication for the Swagger MCP Server is handled in your browser when you sign in with your account, so you do not need to create or manage API tokens.

Is the Swagger MCP Server available in all my VS Code workspaces?

By default, yes. Selecting Install adds the Swagger MCP Server to your user profile and makes it available in all your workspaces. To limit the server to the current workspace, right-click it in the results and select Install in Workspace.

What should I check if the Swagger MCP Server does not start in VS Code?

Confirm that you use the latest version of VS Code with GitHub Copilot enabled, that you confirmed you trust the server in the confirmation dialog box, and that you signed in with a account that has access to Swagger.

See also

Publication date: