Model Context Protocol

From start to finish, set up an NLX application exposed through Model Context Protocol (MCP)

What's an application integrated through MCP?

Model Context Protocol (MCP) is a standardized protocol for how Large Language Models (LLMs) integrate and engage with external systems. Prior to MCP, builders would need to provide a multitude of tools via REST APIs to give an LLM the ability to perform even the simplest of tasks you wish to define:

  • Check the weather local to a user

  • Provide an activity recommendation local to a user

NLX’s MCP support allows you to turn any NLX application into an MCP Server, giving an MCP Client the ability to follow and perform tasks outlined in the application's flow(s) as well as pass context easily to NLX when the MCP Client interfaces with a user.

Your NLX flows effectively become MCP tools that you provide to a supporting MCP Client to boost its capabilities. This process is done entirely without writing code or exposing your systems and services to new vulnerabilities.


Checklist

You'll complete the following to successfully launch your MCP implementation:


Step 1: Construct a flow

Begin by identifying the tasks your conversational AI application will automate and organize them into individual topics handled by flows. Determine the sequence of steps and messaging that the conversational application follows to assist a user with the task. The conversation workflow is assembled in a flow's Canvas with a pattern of nodes similar to a flow diagram.

Each flow is invoked when your chosen AI model identifies customer intent from a user's query ("What's the weather like?") and matches it to a flow you've created (WeatherUpdate).

Variables required for the flow to work that should be extracted by the LLM in conversation and passed along to NLX are set up first in the flow's Settings:

  • Select Flows in workspace menu > Choose New flow > Enter a descriptive name (no spaces or special characters) > Select Save

  • Choose Settings (gear icon) in flow toolbar

  • From the AI settings tab:

    • In the AI description field, enter a concise description explaining the purpose of the flow that LLM models reference to invoke the flow

    • Enable MCP toggle

      • Provide a unique and concise input name (no spaces or special characters)

      • Enter the input schema containing necessary variable(s) that will be set and passed along by the LLM interfacing with a user

      • Expand each property variable defined in your MCP input schema > Expand their settings

        • Enter a brief description in the property's Description field for the LLM to understand the purpose and context of each (e.g., location property might have the accompanying description for a weather update flow: The location of the weather request)

  • Click Save

On any node of the flow, enter an open curly brace { and reference the MCP input variable you want to use as an output in messaging, payload fields, Split node conditions, etc:

MCP variable being passed to a Data request payload and referenced in a Basic node's message

Step 2: Deploy application

Now you'll set up and deploy an application to become your MCP server.

  • Select Applications from workspace menu > Choose New application

  • Enter a descriptive name > Click Save

  • Click Flows tab of application > Select Attach flows > Attach one or more flows created to make available to your application > Click Attach selected

  • Select Channels tab of application > Expand API option > Click + Create channel

    • Enable MCP interface toggle

    • Click Create channel

  • Select Settings tab of application > Under AI settings, enter a concise description of the application's purpose into the AI description field

  • Click Save

A build constructs the array of flows that make up your conversational AI application and updates any changes made to your flows, while deploying makes a successful build live:

  • Click Deployment tab of application > Select Create or Review & build

  • Wait for validation to complete > Select Create build*

  • When satisfied with a successful build, click Deploy

*After a build status appears as 🟢 Built, you may use the Test feature to test the conversation with your application using the latest build.

🧠 Looking for more? See Manage channels


Step 3: Set up MCP Client

To make your application available to a supported MCP Client, complete the following:

MCP URL and API key in deployment details
  • From the Deployment tab of your NLX application, select Details next to the Deployed status

  • Expand the API section under Setup instructions in the pop-up > Copy the MCP URL and the API key

  • Complete the MCP setup for your preferred MCP-supporting client:

  • Open the MCP configuration in Claude Desktop > Select Settings menu > Choose Developer tab > Click Edit Config

  • Claude Desktop will open the file explorer to the claude_desktop_config.json file

    • Paste the below MCP server JSON to the claude_desktop_config.json

    • Replace with the MCP URL and API key copied earlier and save

  • Relaunch Claude Desktop and open the conversation settings. Check to see your new MCP server is enabled

Claude Desktop can now use your NLX MCP server when relevant.

MCP server JSON configuration:

{
  "mcpServers": {
    "YourApplicationName": {
      "command": "npx",
      "args": [
        "-y",
        "@nlxai/mcp-nodejs-server"
      ],
      "env": {
        "NLX_API_KEY": "your API key",
        "NLX_APP_URL": "your MCP URL"
      }
    }
  }
}

Last updated