Skip to main content
Cover Image Langflow is a visual framework for building multi-agent and RAG applications using a drag-and-drop interface. By integrating Membit with Langflow, you can enhance your AI agents with real-time social context, enabling them to access current trends, breaking news, and live conversations from across the web through a node-based visual workflow.

Prerequisites

Before you begin, make sure you have:
  • Langflow application installed (download here)
  • A Membit account with an API key get your API key
  • Basic familiarity with Langflow’s visual workflow builder
  • A Google AI Studio API key for the chat model (optional)

Setting Up Membit MCP Tools

Follow these steps to integrate Membit with your Langflow workflows:
1

Create New Flow

Open the Langflow application and click Add New Flow to start building a new workflow.
Langflow main interface with add new flow button
2

Select Blank Flow

Choose Blank Flow to start with a clean workspace where you can build your custom workflow.
Langflow template selection showing blank flow option
3

Search for MCP Tools

In the component search bar, type “MCP tools” to find the Model Context Protocol integration component.
Searching for MCP tools in Langflow component library
The MCP Tools component enables Langflow to connect with external MCP servers like Membit, providing real-time context to your workflows.
4

Configure MCP Server

Configure the MCP Tools component by adding a new MCP server:
  1. Click Add MCP Server
  2. Select STDIO as the connection type
MCP server configuration interface showing STDIO option
STDIO Configuration:
  • Name: membit-mcp
  • Command: npx -y mcp-remote https://mcp.membit.ai/mcp
  • Argument 1: --header
  • Argument 2: X-Membit-Api-Key:${MEMBIT_API_KEY}
  • Environment Variables: MEMBIT_API_KEY <your-api-key>
Replace <your-api-key> with your actual Membit API key. Keep this credential secure and don’t share it with unauthorized users.
  1. Click Add Server to save the configuration
  2. Click Toggle Tool Mode to enable the MCP tools
MCP tools configuration showing toggle tool mode option

Building Your First Workflow

Now let’s create a complete workflow that uses Membit’s real-time context:
1

Add Agent Component

Search for “agent” in the component library and click Add to add an Agent component to your workflow.
Agent component in Langflow component library
The Agent component acts as the orchestrator, managing how your workflow processes requests and coordinates responses.
2

Configure Agent Model

Configure the Agent component with your preferred language model:
Config agent component
  • Model Provider: Select “Gemini 2.5 Flash” (or your preferred model)
  • API Key: Set your Google AI Studio API key
You can use other model providers like OpenAI, Anthropic, or local models depending on your preference and requirements.
3

Connect MCP Tools

Connect the Membit MCP component to the Agent Tools input to provide real-time context capabilities.
This connection enables your agent to access Membit’s real-time social media context when processing user queries.
4

Add Chat Components

Add Chat Input and Chat Output components to create an interactive interface:
  1. Chat Input - To receive user messages
  2. Chat Output - To display agent responses
Chat components in Langflow showing input and output nodes
Connection Pattern:
  • Chat InputAgent Input
  • Agent ResponseChat Output
Complete Langflow workflow showing connected components
5

Test Your Workflow

Click Playground to test your workflow with real-time context from Membit.
Langflow playground interface for testing workflows
Try asking questions like:
  • “Tell me about crypto trends”
  • “What’s happening in AI today?”
  • “Give me the latest tech news”
Langflow chat interface showing conversation with real-time context

Testing the workflow with real-time context from Membit

If successful, your agent will respond with current information about your query topic, powered by Membit’s real-time data feed.

Troubleshooting

Problem: Cannot establish STDIO connection to Membit MCP serverSolutions:Verify mcp-remote is available: run npx mcp-remote --version in terminalCheck the command format: npx -y mcp-remote https://mcp.membit.ai/mcpEnsure Node.js is properly installed and accessible to LangflowVerify environment variable MEMBIT_API_KEY is set correctlyTry restarting Langflow after configuration changes
Problem: MCP tools don’t appear or aren’t accessibleSolutions:Ensure “Toggle Tool Mode” is enabled after server configurationVerify the MCP server status shows as “Connected”Check server logs for connection errors or authentication failuresTry removing and re-adding the MCP server configurationConfirm all arguments are in correct order: --header then X-Membit-Api-Key:${MEMBIT_API_KEY}
Problem: Agent doesn’t utilize Membit tools in responsesSolutions:Ensure MCP Tools component is properly connected to Agent Tools inputTry more explicit prompts: “Use the available tools to search for…”Verify the chat model supports tool/function calling (Gemini 2.5 Flash recommended)Check if the agent has proper system instructions about tool usageTest with simpler, more direct questions about current events
Problem: Components won’t connect or show connection errorsSolutions:Verify component types match: Agent expects Tools input, not generic componentsCheck that all required inputs are connected (Chat Input → Agent, Model → Agent)Ensure MCP Tools output is properly mapped to Agent Tools inputTry reconnecting components in the correct orderRestart the workflow and test connections step by step
I