Edit

Share via


Create and register MCP servers in API Center based on Azure Logic Apps (preview)

Note

The following capability is in preview and is subject to the Supplemental Terms of Use for Microsoft Azure Previews.

To make an agent or large language model (LLM) fulfill requests by running actions on external services, systems, apps, or data, create a Model Context Protocol (MCP) server that provides tools for your agent or model to complete tasks. For example, these tools can read, update, or delete files, query databases, send emails, interact with APIs, perform computations, or even trigger workflows.

Through Azure API Center, you can create and register an MCP server with tools driven by prebuilt connector actions in Azure Logic Apps. You typically use connector actions and triggers in Azure Logic Apps to create workflows for automation and integration solutions. With access to over 1,400 connectors that work with a vast range of cloud services, on-premises systems, apps, and data, you can build diverse toolsets that interact with your enterprise resources and assets.

This guide shows how to complete the following tasks:

  • Create an MCP server backed by a Standard logic app.
  • Build tools that the server makes available for agents and models to call.
  • Register the MCP server through an API Center resource.

For more information, see the following articles:

Learn about MCP and API Center

The following diagram shows relationships between the different components at work in this scenario:

  • The MCP server and tools that you create and register through API Center
  • The connector actions in Azure Logic Apps that you use to build the tools that your MCP server provides
  • The interactions between your MCP client and your MCP server
  • The interactions between your MCP client and the agent or model
  • The inputs that go in through the MCP client to the agent or model
  • The outputs from the agent or model that go out through the MCP client

Diagram shows relationship between MCP server and tools in Azure API Center portal, agent, MCP client, and Azure Logic Apps.

MCP is an open standard that lets AI components such as LLMs, agents, and MCP clients use tools to work with external services and systems in a secure, discoverable, and structured way. This standard defines how to describe, run, and authenticate access to tools so that AI components can interact with real-world services, systems, databases, APIs, and business workflows. An MCP server acts like a bridge between AI components and the tools that they can use.

API Center provides centralized API discovery and design-time API governance so you can track all your APIs in a consolidated location. You can develop and maintain an organized structured inventory for your organization's APIs with information such as version details, API definition files, and common metadata, regardless of API type, lifecycle stage, or deployment location. Stakeholders across your organization, such as API program managers, IT administrators, app developers, and API developers, can design, discover, reuse, and govern these APIs.

Prerequisites

The following table describes the prerequisites for this guide:

Prerequisite Description or notes
Azure account with an active subscription If you don't have a subscription, create a free account.

Important: Make sure to use the same Azure subscription for the resources required in this scenario.
An API center resource For more information, see Quickstart: Create your API center - portal.
Access to the API Center portal To find and view the MCP server that you create, you must set up the API Center portal so you have access.

This portal is an Azure-managed website that developers and other stakeholders in your organization use to discover the APIs in your API center. After you sign in, you can browse and filter APIs and view API details such as API definitions and documentation. User access to API information is based on Microsoft Entra ID and Azure role-based access control.

For more information, see the following article and sections:

- Set up your API Center portal
- Enable sign-in to portal by Microsoft Entra users and groups
- Access the API Center portal
A Standard logic app resource You can use an existing logic app or create one when set up your MCP server. See Limitations and known issues.

- The MCP capability applies to Standard logic app resources that use any hosting option, such as the Workflow Service Plan.

- Your logic app resource and API center resource must use the same subscription.

- Your logic app resource must be running.

For more information, see Create an example Standard logic app using the Azure portal.
MCP client to test access to your MCP server This guide uses Visual Studio Code.

Important: Make sure to use the latest version of Visual Studio Code for MCP server testing. Visual Studio Code includes generally available MCP support in versions after 1.102. For more information, see MCP servers in Visual Studio Code.

For the example in this guide, you also need the GitHub Copilot extension. For more information, see the following articles:

- Use extensions in Visual Studio Code
- Set up Copilot in Visual Studio Code
- Get started with GitHub Copilot in Visual Studio Code
Access to the service, system, app, or data source from which to create your MCP server You need any required credentials for the resource that you use to create the MCP server and tools.

The example in this guide uses the Office 365 Outlook connector. If you don't have a work or school account, you can use the Outlook.com connector or another supported email connector. The general steps are the same, but your UX might slightly differ.

Limitations and known issues

For this release, the following list describes restrictions or issues that apply:

Create an MCP server and tools

For example, suppose you want to create an MCP server with tools that manage contacts and sends emails.

  1. In the Azure portal, open your API center resource.

  2. On the resource sidebar, under Discovery, select MCP.

  3. On the MCP page, find the Azure Logic Apps tile, and select Register.

    Screenshot shows Azure portal, selected API Center, and selected Register button on Azure Logic Apps tile.

  4. On the Register an MCP server with Azure Logic Apps wizard home page, follow these steps:

    1. In the Project details section, provide the following information about your MCP server:

      Property Required Value Description
      MCP server name Yes <mcp-server-name> The name to use for the MCP server.
      Description Yes <mcp-server-description> The description about the MCP server's role, purpose, and tasks that the server can perform. This description helps agents and models more accurately identify and choose the appropriate server and tools to use.
      Logic app Yes <Standard-logic-app-resource> From the list, select an existing Standard logic app to use, or to create a new one, select Create a logic app.

      Screenshot shows MCP wizard and Project details section.

    2. In the Tools section, under *Connectors, select Add connector or Add.

      Screenshot shows Connections section with selected options for Add and Add connector.

    3. On the Add connector pane and the Choose connector tab, find and select the connector for which you want to create a tool, for example:

      Screenshot shows Add connector pane with selected Office 365 Outlook connector.

    4. On the Select actions tab, select each action that you want to create as a tool. When you're done, select Next.

      You can select multiple actions, but you can create only one tool for each selected action.

      Screenshot shows Add connector pane with selected connector actions to create as tools.

    5. On the Create connection tab, provide any connection information or sign in and authenticate your credentials, if required.

      If you must create a different connection, select Add new.

    6. When you're done, select Save, which returns you to the Register an MCP Server with Azure Logic Apps page.

      The Connectors section now shows your selected connector. The Actions section shows the selected actions that power the tools that your MCP server provides. By default, any parameters for these actions use an LLM as the input source. You can change this input source to user-provided, based on your scenario's needs.

      Screenshot shows Connectors and Actions sections with tools list.

  5. To help an agent or LLM choose the correct tool and pass correctly sourced inputs to tool parameters, review and update each tool's setup by following these steps:

    1. In the Actions section, select either the tool name or the edit (pencil) button for that tool.

    2. On the Edit: <tool-name> pane, provide the following information:

      Section Description
      Description Describes the purpose for the action-backed tool to help an agent or LLM determine when to use the tool. A default description exists, but you can customize the text for your needs.

      The default text comes from the connector's API Swagger description, for example, Actions - Office 365 Outlook.
      Default parameters Lists any parameters required to run the tool. For each parameter, the input source options are Model and User. By default, the model (LLM) provides the inputs. If you select User, the appropriate UX appears for you to provide the input source. For more information, see Learn how parameter values resolve at runtime.
      Optional parameters Select any other parameters that you want to include for the tool.

      The following example shows the description and parameters for the Send email (V2) tool:

      Screenshot shows Edit pane for an example tool.

    3. When you're done, select Save changes.

  6. When you're done reviewing or updating each tool, select Register.

  7. Wait for the notifications that Azure successfully registered your MCP server.

Learn how parameter values resolve at runtime

This section describes the options for how your MCP server sources input parameter values for action-backed tools. You can either keep the model as the default source, or you can provide hardcoded static values for all interactions.

  • Model-provided inputs

    By default, the model passes in parameter values at runtime based on the conversation between the agent and the end user. These values are dynamic and unknown until runtime.

  • User-provided inputs

    You specify the parameter values during development. These values are typically hardcoded and stay the same across all interactions between the agent and the end user.

Find and view your MCP server

For this task, make sure you completed the requirement to set up the API Center portal.

  1. On your API Center resource sidebar, under API Center portal, select Settings.

  2. On the Settings toolbar, select View API Center portal.

    Your browser opens the API portal for your API Center resource at the following URL:

    https://<API-Center-resource-name>.<region>.azure-apicenter.ms.

    For more information, see Access the API Center portal.

  3. Sign in with your Azure account.

    The API portal shows the available MCP servers.

  4. Find and select the MCP server that you created.

  5. On your MCP server information pane, on the Options tab, find the Endpoint URL section, and select Copy URL so you can test access from an MCP client.

Test access to your MCP server

  1. In Visual Studio Code, from the View menu, select Command Palette. Find and select MCP: Add Server.

    Screenshot shows Visual Studio Code, Command Palette, and command to add MCP server.

  2. Select HTTP (HTTP or Server-Sent Events). For Enter Server URL, provide the URL for your MCP server.

  3. For Enter Server ID, provide a meaningful name for your MCP server.

    When you add an MCP server for the first time, you must choose where to store your MCP configuration. You get the following options, so choose the best option for your scenario:

    Option Description
    Global Your user configuration, which is the directory at c:\users<your-username>\AppData\Roaming\Code\User and is available across all workspaces.
    Workspace Your current workspace in Visual Studio Code.

    This example selects Global to store the MCP server information in the user configuration. As a result, Visual Studio Code creates and opens an mcp.json file, which shows your MCP server information.

  4. In the mcp.json file that opens, select the Start or Restart link to establish connectivity for your MCP server, for example:

    Screenshot shows mcp.json file with Start link selected.

  5. When the authentication prompt appears, select Allow, and then select the account to use for authentication.

  6. Sign in and give consent to call your MCP server.

    After authentication completes, the mcp.json file shows Running as the MCP server status.

    Screenshot shows mcp.json file with Running status selected.

  7. As a test, try calling your MCP server from GitHub Copilot:

    1. On the Visual Studio Code title bar, open the Copilot list, and select Open Chat.

    2. Under the chat input box, from the Built-in modes list, and select Agent.

    3. From the LLM list, select the LLM to use.

    4. To browse the tools available in your MCP server, select Configure Tools.

    5. In the tools list, select or clear tools as appropriate, but make sure that your new MCP server is selected.

Now you can interact with your MCP server through the Copilot chat interface.