2LY Logo

Langflow

Connect Langflow workflows to 2LY

Langflow workflows connect to 2LY through the MCP Connect component, providing access to your configured tools via the MCP protocol.

Overview

Integration uses Langflow's built-in MCP Connect component to:

  • Discover and load tools from 2LY runtime
  • Execute tool calls through MCP protocol
  • Handle authentication and routing automatically

Current Limitation: Langflow allows only one MCP server connection named "2ly" per workflow. We're developing a custom component to unlock full platform capabilities.

Quick Start

Prerequisites

# Ensure 2LY is running
npm run start

# Langflow installed and running
# Visit http://localhost:7860

Add MCP Tools Component

  1. Open your Langflow workflow
  2. Add MCP Tools component from the sidebar
  3. Configure connection:
{
    "mcpServers": {
    "2ly": {
      "command": "npx",
      "args": [
        "@2ly/runtime"
      ],
      "env": {
        "NATS_SERVERS": "nats://localhost:4222",
        "RUNTIME_NAME": "My Agent"
}
  1. Connect MCP output to your agent/chain components

Basic Workflow

MCP Connect (2ly) → Tool Caller → Agent → Output

The MCP Connect component discovers all tools from your 2LY workspace and makes them available to downstream components.

Current Limitations

Single MCP Constraint: Langflow's current architecture limits connections to one MCP server per workflow. This means:

  • Only one "2ly" MCP Connect allowed per workflow
  • Cannot partition tools across multiple MCP instances
  • Tool discovery includes all workspace tools

Workaround: Assign all required tools to a single agent in the 2LY dashboard to manage which tools are available to workflows.

Coming Soon

We're building a custom Langflow component that will:

  • Support multiple 2LY MCP connections
  • Provide advanced routing and caching
  • Add real-time tool updates

Troubleshooting

MCP Connection Failed

# Verify 2LY services
docker-compose ps

# Check MCP endpoint
curl http://localhost:4000/health

Tools Not Loading

  • Verify workspace ID is correct in MCP Connect component
  • Check tools are configured in 2LY dashboard
  • Ensure 2LY runtime is connected

Single MCP Limit Errors

  • Remove duplicate MCP Connect components
  • Use only one "2ly" connection per workflow
  • Consider splitting into multiple workflows if needed

Workflow Execution Issues

  • Check Langflow logs for errors
  • Verify tool permissions in 2LY dashboard
  • Test tools individually in 2LY playground

Next Steps