diff --git a/docs/docs/API-Reference/api-files.mdx b/docs/docs/API-Reference/api-files.mdx index 48b8abfb4856..996fd141e046 100644 --- a/docs/docs/API-Reference/api-files.mdx +++ b/docs/docs/API-Reference/api-files.mdx @@ -235,7 +235,7 @@ To send image files to your flows through the API, see [Upload image files (v1)] ::: This endpoint uploads files to your Langflow server's file management system. -To use an uploaded file in a flow, send the file path to a flow with a [**File** component](/components-data#file). +To use an uploaded file in a flow, send the file path to a flow with a [**Read File** component](/components-data#file). The default file limit is 1024 MB. To configure this value, change the `LANGFLOW_MAX_FILE_SIZE_UPLOAD` [environment variable](/environment-variables). @@ -265,10 +265,10 @@ The default file limit is 1024 MB. To configure this value, change the `LANGFLOW } ``` -2. To use this file in your flow, add a **File** component to your flow. +2. To use this file in your flow, add a **Read File** component to your flow. This component loads files into flows from your local machine or Langflow file management. -3. Run the flow, passing the `path` to the `File` component in the `tweaks` object: +3. Run the flow, passing the `path` to the `Read-File` component in the `tweaks` object: ```text curl --request POST \ @@ -280,7 +280,7 @@ This component loads files into flows from your local machine or Langflow file m "output_type": "chat", "input_type": "text", "tweaks": { - "File-1olS3": { + "Read-File-1olS3": { "path": [ "07e5b864-e367-4f52-b647-a48035ae7e5e/3a290013-fe1e-4d3d-a454-cacae81288f3.pdf" ] @@ -289,7 +289,7 @@ This component loads files into flows from your local machine or Langflow file m }' ``` - To get the `File` component's ID, call the [Read flow](/api-flows#read-flow) endpoint or inspect the component in the visual editor. + To get the `Read-File` component's ID, call the [Read flow](/api-flows#read-flow) endpoint or inspect the component in the visual editor. If the file path is valid, the flow runs successfully. diff --git a/docs/docs/API-Reference/api-monitor.mdx b/docs/docs/API-Reference/api-monitor.mdx index b0b62136db35..0f42edc6a17e 100644 --- a/docs/docs/API-Reference/api-monitor.mdx +++ b/docs/docs/API-Reference/api-monitor.mdx @@ -18,9 +18,9 @@ For more information, see the following: The Vertex build endpoints (`/monitor/builds`) are exclusively for **Playground** functionality. -When you run a flow in the **Playground**, Langflow calls the `/build/$FLOW_ID/flow` endpoint in [chat.py](https://github.com/langflow-ai/langflow/blob/main/src/backend/base/langflow/api/v1/chat.py#L143). This call retrieves the flow data, builds a graph, and executes the graph. As each component (or node) is executed, the `build_vertex` function calls `build_and_run`, which may call the individual components' `def_build` method, if it exists. If a component doesn't have a `def_build` function, the build still returns a component. +When you run a flow in the **Playground**, Langflow calls the `/build/$FLOW_ID/flow` endpoint in [chat.py](https://github.com/langflow-ai/langflow/blob/main/src/backend/base/langflow/api/v1/chat.py#L130). This call retrieves the flow data, builds a graph, and executes the graph. As each component (or node) is executed, the `build_vertex` function calls `build_and_run`, which may call the individual components' `def_build` method, if it exists. If a component doesn't have a `def_build` function, the build still returns a component. -The `build` function allows components to execute logic at runtime. For example, the [**Recursive Character Text Splitter** component](https://github.com/langflow-ai/langflow/blob/main/src/backend/base/langflow/components/langchain_utilities/recursive_character.py) is a child of the `LCTextSplitterComponent` class. When text needs to be processed, the parent class's `build` method is called, which creates a `RecursiveCharacterTextSplitter` object and uses it to split the text according to the defined parameters. The split text is then passed on to the next component. This all occurs when the component is built. +The `build` function allows components to execute logic at runtime. For example, the [**Recursive Character Text Splitter** component](https://github.com/langflow-ai/langflow/blob/main/src/lfx/src/lfx/components/langchain_utilities/recursive_character.py) is a child of the `LCTextSplitterComponent` class. When text needs to be processed, the parent class's `build` method is called, which creates a `RecursiveCharacterTextSplitter` object and uses it to split the text according to the defined parameters. The split text is then passed on to the next component. This all occurs when the component is built. ### Get Vertex builds diff --git a/docs/docs/Agents/mcp-server.mdx b/docs/docs/Agents/mcp-server.mdx index a916cdd5af7e..e49cffa82301 100644 --- a/docs/docs/Agents/mcp-server.mdx +++ b/docs/docs/Agents/mcp-server.mdx @@ -25,10 +25,20 @@ For information about using Langflow as an MCP client and managing MCP server co ## Serve flows as MCP tools {#select-flows-to-serve} -Each [Langflow project](/concepts-flows#projects) has an MCP server that exposes the project's flows as tools for use by MCP clients. +When you create a [Langflow project](/concepts-flows#projects), Langflow automatically adds the project to your MCP server's configuration and makes the project's flows available as MCP tools. -By default, all flows in a project are exposed as tools on the project's MCP server. -You can change the exposed flows and tool metadata by managing the MCP server settings: +If your Langflow server has authentication enabled (`AUTO_LOGIN=false`), the project's MCP server is automatically configured with API key authentication, and a new API key is generated specifically for accessing the new project's flows. +For more information, see [MCP server authentication](#authentication). + + +### Prevent automatic MCP server configuration for Langflow projects + +To disable automatic MCP server configuration for new projects, set the `LANGFLOW_ADD_PROJECTS_TO_MCP_SERVERS` environment variable to `false`. +For more information, see [MCP server environment variables](#mcp-server-environment-variables). + +### Selectively enable and disable MCP servers for Langflow projects + +With or without automatic MCP server configuration enabled, you can selectively enable and disable the projects that are exposed as MCP tools: 1. Click the **MCP Server** tab on the [**Projects** page](/concepts-flows#projects), or, when editing a flow, click **Share**, and then select **MCP Server**. @@ -207,6 +217,8 @@ For more information, see the MCP documentation for your client, such as [Cursor Each [Langflow project](/concepts-flows#projects) has its own MCP server with its own MCP server authentication settings. +When you create a new project, Langflow automatically configures authentication for the project's MCP server based on your Langflow server's authentication settings. If authentication is enabled (`AUTO_LOGIN=false`), the project is automatically configured with API key authentication, and a new API key is generated for accessing the project's flows. + To configure authentication for a Langflow MCP server, go to the **Projects** page in Langflow, click the **MCP Server** tab, click