LangFlow + MCP + IBM Watsonx Orchestrate Integration Guide

This guide walks you through setting up LangFlow, exposing it via ngrok, and integrating it with IBM Watsonx Orchestrate using the Model Context Protocol (MCP).

Prerequisites

Part 1: Environment Setup

1. Create Python Virtual Environment

python3 -m venv myenv
source myenv/bin/activate

2. Install LangFlow

brew install langflow

3. Install ngrok

brew install ngrok

4. Configure ngrok

  1. Create an account at the ngrok dashboard and follow macOS setup instructions.
  2. Generate an authentication token from your dashboard.
  3. Add the token to ngrok:
ngrok config add-authtoken <YOUR_AUTHTOKEN>

Part 2: Running LangFlow

5. Start LangFlow Server

cd ~/langflow-project
source myenv/bin/activate
langflow run --host 0.0.0.0 --port 7860

6. Expose LangFlow via ngrok

ngrok http 7860

Part 3: Configure LangFlow API Access

7. Get MCP Server URL

  1. Navigate to your flow's page in LangFlow.
  2. Click Share, then MCP.
  3. Copy the URL and save it.

8. Generate LangFlow API Key

  1. Click on Settings in LangFlow.
  2. Select Make API Key.
  3. Name and save the key.

9. Get Orchestrate Credentials

  1. In Orchestrate, click Settings.
  2. Click Generate API Key and save it.
  3. Copy the Service Instance URL.

Part 4: Connect to IBM Watsonx Orchestrate

10. Install Orchestrate SDK

pip install --upgrade ibm-watsonx-orchestrate

11. Add Orchestrate Environment (PS. get rid of <> 😎)

orchestrate env add -n <environment-name> -u <service-instance-url> --type ibm_iam --activate

12. Import LangFlow as MCP Server

orchestrate toolkits import \
  --kind mcp \
  --name langflow_mcp \
  --description "Langflow MCP Server (hosted via SSE)" \
  --package "mcp-proxy" \
  --language python \
  --command "uvx mcp-proxy <YOUR-NGROK-URL> --headers x-api-key <YOUR-LANGFLOW-API-KEY>" \
  -- tools "*"

13. Verify Installation

orchestrate toolkits list

Part 5: Create and Deploy Agent

14. Create New Agent

  1. In Orchestrate, open Agent Builder.
  2. Click Create Agent, name it, and create.

15. Add LangFlow Flows to Agent

  1. Click Toolset → Add tool → Add from file or MCP server → Import from MCP server.
  2. Click Select MCP server Select your LangFlow MCP server.
  3. Enable the flows you want by turning on the Activation toggle.

16. Deploy Agent

Click Deploy (top right).

Part 6: Testing

17. Run Your Flow

Important Notes

Troubleshooting

Security Considerations