Skip to content

Getting Started

Similar to database integrations, Infragate allows you to connect to HTTP APIs as data sources. This enables you to leverage external services and data within your AI applications by defining tools that interact with these APIs.

When setting up an API data source, you’ll need to provide the base URL of the API and configure any necessary authentication headers or parameters. You can then define tools that correspond to specific API endpoints, specifying the HTTP method, path, and any required query parameters or request body. The parameters defined in the tool will be mapped to the variables in the API request, allowing the AI model to interact with the API seamlessly.

In this guide, we’ll walk you through the steps to create an MCP server that integrates with an HTTP API data source that uses a BMI (Body Mass Index) Calculator API.

  1. Create an MCP Server
    Start by logging into the Infragate Console. Navigate to the “MCP Servers” section and click on “Create Server”. Provide a name for your server, select the desired authorization mode, and choose a deployment region. Click “Create Server” to initialize your MCP server.

  2. Add a HTTP Tool - BMI Calculator

    1. Once your server is up and running, go to the “Tools” tab and click on “Add Tool”.
    2. Define the tool’s name as calculate_bmi , with a matching description set to A BMI calculator.
    3. For this example add two parameters called weight and height of type number.
    4. In the “Tool Type” section, choose “HTTP API” and then select “Create New Data Source” under Data Source.
    5. Give your HTTP tool a name and set the Base URL to
      https://bmicalculatorapi.vercel.app
      Set Authentication Method to None.
    6. In API Configuration, set the following:
      • HTTP Method: GET
      • Endpoint: /api/bmi/:weight/:height
      • Query Parameters: Leave as {}.
      • Headers: Leave as {}.
      • Transform Output: Leave disabled.
    7. Save the tool to add it to your MCP server. MCP Server Overview
  3. Invoke the Function

    1. Using MCP Inspector or a client of your choice, use the endpoint of your MCP server to invoke the newly created function tool.
    2. Pass a value for the weight and height parameters to see the function in action.

    MCP Server Overview