From e1dbefc21dc76456b06d5d70da61dd074a803df8 Mon Sep 17 00:00:00 2001 From: Mendon Kissling <59585235+mendonk@users.noreply.github.com> Date: Fri, 5 Dec 2025 11:35:13 -0500 Subject: [PATCH] docs: langflow server supports streamable http (#10891) * initial-updates * check-params * server-params * peer-review * update-release-note * remove-delete-endpoint-for-legacy --- .../api-reference-api-examples.mdx | 22 ++++++++++----- docs/docs/Agents/mcp-client.mdx | 28 +++++++++++-------- docs/docs/Agents/mcp-server.mdx | 12 ++++---- docs/docs/Components/mcp-tools.mdx | 12 +++++++- docs/docs/Support/release-notes.mdx | 7 +++-- docs/docs/Support/troubleshooting.mdx | 7 +++-- 6 files changed, 57 insertions(+), 31 deletions(-) diff --git a/docs/docs/API-Reference/api-reference-api-examples.mdx b/docs/docs/API-Reference/api-reference-api-examples.mdx index 83b79c5832..7d7ed270e2 100644 --- a/docs/docs/API-Reference/api-reference-api-examples.mdx +++ b/docs/docs/API-Reference/api-reference-api-examples.mdx @@ -364,14 +364,22 @@ The following endpoints are most often used when contributing to the Langflow co * MCP servers: The following endpoints are for managing Langflow MCP servers and MCP server connections. They aren't typically called directly; instead, they are used to drive internal functionality in the Langflow frontend and when running flows that call MCP servers. - * HEAD `/v1/mcp/sse`: Health check for MCP SSE. - * GET `/v1/mcp/sse`: Open SSE stream for MCP server events. - * POST `/v1/mcp/`: Post messages to the MCP server. +Langflow MCP servers support both streamable HTTP and SSE protocols. + * HEAD `/v1/mcp/streamable`: Health check for streamable HTTP MCP. + * GET `/v1/mcp/streamable`: Open streamable HTTP connection for MCP server. + * POST `/v1/mcp/streamable`: Post messages to the MCP server via streamable HTTP. + * DELETE `/v1/mcp/streamable`: Close streamable HTTP connection. + * HEAD `/v1/mcp/sse` (LEGACY): Health check for MCP SSE. + * GET `/v1/mcp/sse` (LEGACY): Open SSE stream for MCP server events. + * POST `/v1/mcp/` (LEGACY): Post messages to the MCP server. * GET `/v1/mcp/project/{project_id}`: List MCP-enabled tools and project auth settings. - * HEAD `/v1/mcp/project/{project_id}/sse`: Health check for project SSE. - * GET `/v1/mcp/project/{project_id}/sse`: Open project-scoped MCP SSE. - * POST `/v1/mcp/project/{project_id}`: Post messages to project MCP server. - * POST `/v1/mcp/project/{project_id}/` (trailing slash): Same as above. + * HEAD `/v1/mcp/project/{project_id}/streamable`: Health check for project streamable HTTP MCP. + * GET `/v1/mcp/project/{project_id}/streamable`: Open project-scoped streamable HTTP connection. + * POST `/v1/mcp/project/{project_id}/streamable`: Post messages to project MCP server via streamable HTTP. + * DELETE `/v1/mcp/project/{project_id}/streamable`: Close project streamable HTTP connection. + * HEAD `/v1/mcp/project/{project_id}/sse` (LEGACY): Health check for project SSE. + * GET `/v1/mcp/project/{project_id}/sse` (LEGACY): Open project-scoped MCP SSE. + * POST `/v1/mcp/project/{project_id}` (LEGACY): Post messages to project MCP server. * PATCH `/v1/mcp/project/{project_id}`: Update MCP settings for flows and project auth settings. * POST `/v1/mcp/project/{project_id}/install`: Install MCP client config for Cursor/Windsurf/Claude (local only). * GET `/v1/mcp/project/{project_id}/installed`: Check which clients have MCP config installed. diff --git a/docs/docs/Agents/mcp-client.mdx b/docs/docs/Agents/mcp-client.mdx index 7e0ecbb872..24838a8785 100644 --- a/docs/docs/Agents/mcp-client.mdx +++ b/docs/docs/Agents/mcp-client.mdx @@ -19,8 +19,8 @@ The **MCP Tools** component connects to an MCP server so that a [Langflow agent] This component has two modes, depending on the type of server you want to access: -* [Connect to a non-Langflow MCP server](#mcp-stdio-mode) with a JSON configuration file, a server start command (STDIO mode), or a Streamable HTTP/SSE URL to access tools provided by external, non-Langflow MCP servers. -* [Connect to a Langflow MCP server](#mcp-sse-mode) to use flows from your [Langflow projects](/concepts-flows#projects) as MCP tools. You must use SSE transport because Langflow MCP servers currently only support SSE. +* [Connect to a non-Langflow MCP server](#mcp-stdio-mode) with a JSON configuration file, server start command, or HTTP/SSE URL to access tools provided by external, non-Langflow MCP servers. +* [Connect to a Langflow MCP server](#mcp-http-mode) to use flows from your [Langflow projects](/concepts-flows#projects) as MCP tools. ### Connect to a non-Langflow MCP server {#mcp-stdio-mode} @@ -33,9 +33,8 @@ This component has two modes, depending on the type of server you want to access * **JSON**: Paste the MCP server's JSON configuration object into the field, including required and optional parameters that you want to use, and then click **Add Server**. * **STDIO**: Enter the MCP server's **Name**, **Command**, and any **Arguments** and **Environment Variables** the server uses, and then click **Add Server**. For example, to start a [Fetch](https://github.com/modelcontextprotocol/servers/tree/main/src/fetch) server, the **Command** is `uvx mcp-server-fetch`. - * **Streamable HTTP/SSE**: Enter the MCP server's **Name**, **URL**, and any **Headers** and **Environment Variables** the server uses, and then click **Add Server**. - Langflow automatically tries Streamable HTTP transport first, and falls back to Server-Sent Events (SSE) transport if Streamable HTTP is not available. - The URL depends on the specific MCP server you're connecting to. For information about connecting to a Langflow MCP server, see [Connect a Langflow MCP server](#mcp-sse-mode). + * **HTTP/SSE**: Enter your MCP server's **Name**, **URL**, and any **Headers** and **Environment Variables** the server uses, and then click **Add Server**. + The default **URL** for Langflow MCP servers is `http://localhost:7860/api/v1/mcp/project/PROJECT_ID/streamable` or `http://localhost:7860/api/v1/mcp/streamable`. For more information, see [Connect to a Langflow MCP server](#mcp-http-mode). @@ -67,22 +66,27 @@ This component has two modes, depending on the type of server you want to access 8. If you want the agent to be able to use more tools, repeat these steps to add more tools components with different servers or tools. -### Connect a Langflow MCP server {#mcp-sse-mode} +### Connect a Langflow MCP server {#mcp-http-mode} Every Langflow project runs a separate MCP server that exposes the project's flows as MCP tools. For more information about your projects' MCP servers, including exposing flows as MCP tools, see [Use Langflow as an MCP server](/mcp-server). -To leverage flows-as-tools, use the **MCP Tools** component to connect to a project's MCP server endpoint. -Langflow MCP servers currently only support Server-Sent Events (SSE) transport, so you must use **Streamable HTTP/SSE** mode to connect to them. +Langflow MCP servers support both the **streamable HTTP** transport and **Server-Sent Events (SSE)** as a fallback. -1. Add an **MCP Tools** component to your flow, click