Skip to content

Getting Started

Although integrations like databases and direct HTTP APIs are supported, they can come with certain limitations - for example, being restricted to querying from a single source at a time. To address this, Infragate introduces custom functions as an additional data source option.

While functions aren’t technically a data source in the traditional sense, within Infragate, we treat them as one. You can define a function once and reuse it across multiple MCP servers, giving you more flexibility and modularity in your integrations.

Infragate uses Deno as the primary runtime environment for these functions.

  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 Function Tool

    1. Once your server is up and running, go to the “Tools” tab and click on “Add Tool”.
    2. Define the function’s name, description, and parameters as needed. For this example add a single parameter called name of type string.
    3. In the “Tool Type” section, choose “Function” and then select “Create New Function Data Source” under Data Source.
    4. Give your function a name and proceed to the code editor.
    5. Leave the default function template as is for now.
      interface Request {
      name: string;
      }
      interface Response {
      message: string;
      }
      export async function handler(request: Request): Promise<Response> {
      const { name } = request;
      return { message: "Hello " + name };
      }
    6. Save the tool to add it to your MCP server.
  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 name parameter to see the function in action.