32dots HEIDELBERG AI
Session 5 medium

Ship it: export your flow as an API or MCP server

LESSONLesson 5 · ~20 min

🎯Goal. Turn your finished flow into something others can call: export it as a REST API or an MCP server with one click.

▶ Try this prompt

Open the API dialog for your flow, copy the Python API snippet, and run it from your own machine to call your flow remotely.

The export dialog offers Run cURL, Python API, Python Code and JS API tabs — pick whichever fits how you'll call it.

  1. 1Open the flow's API dialog. Langflow exposes any flow as a REST API — the dialog hands you ready-to-run snippets in the Run cURL, Python API, Python Code and JS API tabs.
  2. 2Copy a snippet and run it from outside Langflow to confirm your flow responds as a service — now a script, a website, or a colleague can call it.
  3. 3You can also export the flow as an MCP server, so AI assistants and other tools can use it as a capability. A literature-Q&A bot or data-lookup assistant becomes something a whole lab can plug into.
Langflow's 'flow as API' export dialog showing Python API code under tabs labelled Run cURL, Python API, Python Code and JS API
The export dialog turns any flow into a callable service — copy the snippet under Run cURL, Python API, Python Code or JS API and run it from anywhere. Source: https://www.langflow.org

You'll see. Your flow answering a request made from outside Langflow — it's now a callable service, not just a canvas.

💳Cost. Free: exporting and self-hosting the API/MCP server costs only your own infrastructure plus the model usage per call.

💡Takeaway. One click turns a flow into a REST API or MCP server — what you built on the canvas becomes a service others can use.