
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.

2
Select Blank Flow
Choose Blank Flow to start with a clean workspace where you can build your custom workflow.

3
Search for MCP Tools
In the component search bar, type “MCP tools” to find the Model Context Protocol integration component.

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:
STDIO Configuration:
- Click Add MCP Server
- Select STDIO as the connection type

- 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.- Click Add Server to save the configuration
- Click Toggle Tool Mode to enable the MCP tools

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.

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:

- 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:
Connection Pattern:
- Chat Input - To receive user messages
- Chat Output - To display agent responses

- Chat Input → Agent Input
- Agent Response → Chat Output

5
Test Your Workflow
Click Playground to test your workflow with real-time context from Membit.
Try asking questions like:

- “Tell me about crypto trends”
- “What’s happening in AI today?”
- “Give me the latest tech news”

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
MCP Server STDIO Connection Issues
MCP Server STDIO Connection Issues
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/mcp
Ensure Node.js is properly installed and accessible to LangflowVerify environment variable MEMBIT_API_KEY
is set correctlyTry restarting Langflow after configuration changesTool Mode Not Working
Tool Mode Not Working
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}
Agent Not Using Tools
Agent Not Using Tools
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
Workflow Component Connection Errors
Workflow Component Connection Errors
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