Once you've built a Langflow flow, you can do more than chat with it in the Playground: Langflow can expose every flow in a project as a tool over the Model Context Protocol (MCP). An MCP client such as LM Studio or Cursor can then call those tools when it answers a question, which is a useful way to wrap work you designed visually (document search, a specialised agent, or a multi-step workflow) and use it from the apps you already talk to. If MCP itself is new, our MCP explained primer covers the protocol. This guide is about Langflow's MCP server. 13.x, checked on 2 December 2026.
What you need
A running Langflow instance, either Desktop or the Python package, as in our guide to using Langflow with Ollama.
At least one flow in a project that has a Chat Output component. Langflow's MCP docs say this component is required for a flow to be used as an MCP tool.
A Langflow API key, created under your user icon > Settings > Langflow API Keys. New projects in Langflow 1.13.2 use API key authentication by default, even if automatic login to the UI is switched on; signing in to the UI does not authenticate an external MCP client.
An MCP-compatible client, such as LM Studio 0.3.17 or later, or Cursor. Keeping it on the same PC as Langflow is simplest, and is required for Langflow's Auto install option.
When you create a Langflow project, Langflow automatically adds it to the MCP server and makes its flows available as tools. You can change that:
On the Projects page, click the MCP Server tab (or, while editing a flow, click Share, then MCP Server).
The Flows/Tools section lists the flows currently served as tools.
Click Edit Tools, then tick or clear the checkbox in the first column for each flow.
Close the dialog to save.
You can stop automatic registration for new projects by setting LANGFLOW_ADD_PROJECTS_TO_MCP_SERVERS to false.
By default, a flow's tool name is its flow ID (a UUID such as adbbf8c7-0a34-493b-90ea-5e8b42f78b66), which tells an agent nothing about what the flow does. Langflow's docs treat names and descriptions as the agent's equivalent of function names and comments:
In the same Edit Tools dialog, click the Tool or Description field you want to change.
Use a name that states what the flow does, such as document_qa_for_resume.
Write a description that covers the specific action, including any limits. Langflow's example is "A flow for analyzing Emily's resume." In that example, an agent might use the tool for questions about Emily, and skip it for questions about someone else.
The MCP client treats one Langflow project as a single MCP server, with every enabled flow listed as a tool, so vague names can lead the agent to pick the wrong flow.
Step 3: Connect a client
Langflow fills in a JSON snippet for you. The default server address is http://localhost:7860. The default MCP transport is streamable HTTP at the /streamable path, with Server-Sent Events as a fallback.
In Langflow, open the MCP Server tab and check the project's authentication settings (Edit Auth). For API key authentication, use a key belonging to the project owner. Click Generate API key if you want a new one inserted into the snippet, or replace YOUR_API_KEY with an existing key.
Click the JSON tab and copy the snippet for your operating system.
In your MCP client, add a new MCP server and paste the snippet. In Cursor, that's Cursor Settings > MCP > Add New Global MCP Server, which opens mcp.json. In LM Studio, starting with version 0.3.17, switch to the Program tab in the right-hand sidebar, then click Install > Edit mcp.json. LM Studio follows Cursor's mcp.json notation.
Restart the client if it doesn't pick up the change, and confirm that the Langflow server appears in its list of MCP servers.
The generated snippet in Langflow's docs uses uvx to run mcp-proxy with streamable HTTP transport, passing the x-api-key header and a URL of the form:
http://LANGFLOW_SERVER_ADDRESS/api/v1/mcp/project/PROJECT_ID/streamable
Langflow fills in the server address and project ID automatically. Keep the authentication arguments from the generated snippet. If you need extra environment variables for the mcp-proxy process, add an env object of key-value pairs, but don't put API keys there; those belong under args.
For Cursor, Claude or Windsurf installed on the same computer as Langflow, the Auto install tab can write the configuration for you: find the client and click Add. Auto install only works for those local clients; if the client is remote or needs extra variables, use the JSON snippet.
Langflow's default tool-execution timeout is 180 seconds. The limit is decided in this order: a per-component Tool Execution Timeout (seconds) field on an MCP Tools component in a flow (a value of 0 disables that override and falls back to the global setting); then the LANGFLOW_MCP_TOOL_EXECUTION_TIMEOUT environment variable (default 180); then, if that and LANGFLOW_MCP_SERVER_TIMEOUT are both unset, 180 seconds. To allow longer tool calls, raise the global variable or the per-component field above 180. If LANGFLOW_MCP_SERVER_TIMEOUT is set higher than the tool-execution timeout, the server timeout becomes the actual limit.
A note on safety
MCP servers can run code, read files and use the network. LM Studio's MCP documentation warns you never to install MCP servers from untrusted sources, and that some servers written for large cloud models can use so many tokens that a local model struggles. Langflow's MCP page also points out that an agent may ask your permission before it uses a flow tool, depending on the client. Expose only the flows you actually want a client to be able to run, and turn the rest off in Edit Tools.
If you want another local agent that already talks to Ollama without a visual canvas, our Hermes Agent with Ollama guide is the command-line alternative. For a comparison of Langflow with the archived Flowise project, see Flowise vs Langflow.