[Technology preview] Configuring the MCP servers

Create and deploy Model Context Protocol (MCP) servers by using an OpenAPI file and a set of supported commands.

About this task

You can use the MCP client tool to streamline the extension of your API Agent's capabilities by connecting to external services and tools.

By using the MCP tool, you can do the following key actions.
  • Dynamically create and deploy MCP servers from OpenAPI 3.0 specifications
  • Enable and interact with external or internal MCP servers
  • Run operations on any compliant server by using natural language prompts
  • Automatically generate tool interfaces and schemas based on server definitions

Procedure

To configure the MCP server, complete the following steps.

  1. In Visual Studio Code, open API Agent. To know more information about how to use API Agent in Visual Studio Code, see Getting started.
  2. In the Type something field, enter the following prompt.
    Create an MCP server from [@insert file here]

    API Agent displays the proposed plan.

  3. Click Start.
  4. Download the compressed file and save it in your Visual Studio Code workspace.
    Note: Ensure that YAML or compressed files are available in the Visual Studio Code workspace so that API Agent can access them.
  5. To run the server locally, click the Deploy the application code using [zip file] instruction.
  6. Delete the brackets, and select the compressed file.
  7. In the proposed plan, click Start.
  8. To check the deployment status, enter the following prompt.
    Give me the deployment status for the application code file @output.zip

    After the successful deployment, API Agent displays a URL where the MCP server is deployed.

  9. To configure the external MCP server, enter the following prompt.
    Enable the MCP server for github with description 'GitHub integration for 
    repository management',deployed_url: [Add URL],authentication: [Add token number]
    Note: If you face any issue during configuration, see troubleshooting or limitations.