diff --git a/docs/docs/Components/components-tools.md b/docs/docs/Components/components-tools.md index 26182fd43..d28153aea 100644 --- a/docs/docs/Components/components-tools.md +++ b/docs/docs/Components/components-tools.md @@ -260,6 +260,22 @@ This component allows you to call the Serper.dev Google Search API. This component connects to a [Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction) server over `stdio` and exposes its tools as Langflow tools to be used by an Agent component. +To use the MCP stdio component, follow these steps: + +1. Add the [MCP stdio](/components-tools#mcp-stdio) component to your workflow, and connect it to an agent. The flow looks like this: + +![MCP stdio component](/img/mcp-stdio-component.png) + +2. In the MCP stdio component, in the **mcp command** field, enter the command to start your MCP server. For a [Fetch](https://github.com/modelcontextprotocol/servers/tree/main/src/fetch) server, the command is: + +```bash +uvx mcp-server-fetch +``` + +3. Open the **Playground**. +Ask the agent to summarize recent tech news. The agent calls the MCP server function `fetch` and returns the summary. +This confirms the MCP server is connected and working. + ### Inputs | Name | Type | Description | @@ -276,6 +292,13 @@ This component connects to a [Model Context Protocol (MCP)](https://modelcontext This component connects to a [Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction) server over [SSE (Server-Sent Events)](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events) and exposes its tools as Langflow tools to be used by an Agent component. +To use the MCP SSE component, follow these steps: + +1. Add the [MCP SSE](/components-tools#mcp-sse) component to your workflow, and connect it to an agent. The flow looks similar to the MCP stdio component flow. + +2. In the MCP SSE component, in the **url** field, enter the URL of your current Langflow server's `mcp/sse` endpoint. +This will fetch all currently available tools from the Langflow server. + ### Inputs | Name | Type | Description | @@ -288,7 +311,6 @@ This component connects to a [Model Context Protocol (MCP)](https://modelcontext |-------|-----------|-------------------------------------------| | tools | List[Tool]| List of tools exposed by the MCP server | - ## Python Code Structured Tool This component creates a structured tool from Python code using a dataclass. diff --git a/docs/static/img/mcp-stdio-component.png b/docs/static/img/mcp-stdio-component.png new file mode 100644 index 000000000..f6d433884 Binary files /dev/null and b/docs/static/img/mcp-stdio-component.png differ