Use Robility flow as an MCP client
Robility Flow supports integration with the Model Context Protocol (MCP) as both a client and a server. This guide focuses on using Robility Flow as an MCP client to connect to external tools using the MCP Tools component.
For details about acting as an MCP server, see Use Robility Flow as an MCP Server.
MCP Tools Component Overview
The MCP Tools component connects your flow to an MCP server and exposes that server’s tools to Robility Flow agents.
You can connect to:
1. External MCP servers (non-Robility Flow)
2. Robility Flow MCP servers (from other projects or flows)
Connect to an External (Non-Robility Flow) MCP Server
1. Add the MCP Tools component to your flow.
2. Select or add an MCP server in the MCP Server field:
a. JSON: Paste the MCP server’s JSON config and click Add Server.
b. STDIO: Enter the server’s name, command, arguments, and environment variables. For example, to start a Fetch server, use uvx mcp-server-fetch.
c. SSE: Provide the server’s name, SSE URL and any required headers or environment variables.
Note: uvx is bundled with uv in Robility Flow. To use npx-based servers, install an LTS version of Node.js.
For example, see Connect an Astra DB MCP server to Robility Flow.
3. Configure environment variables as needed using the Env fields. Use the format VARIABLE=value.
4. Important: Robility Flow only passes environment variables from the .env file, not from global variables defined in the UI. To use a variable globally, add it to the .env file before startup.
5. Select a tool from the connected MCP server (optional). Leave the field blank to expose all available tools.
6. Some tools may require additional configuration. Refer to your MCP server’s documentation for details.
7. Enable Tool Mode on the MCP Tools component to allow it to be used by agents.
8. Connect the MCP Tools component to your Agent component:
a. Link the Toolset port on the MCP Tools component to the Tools port on the Agent component.
b. Attach Chat Input and Chat Output components to the Agent component if they are not already part of the flow.
Once connected, the MCP Tools component makes external tools accessible to your agent, enabling more advanced, dynamic interactions through your flows.
Test the Flow and Use Connected Tools
1. Open the Playground and enter a prompt that triggers the connected tool via the MCP Tools component.
For example, if you’ve connected the mcp-server-fetch tool, you might prompt the agent with a question like “Summarize recent tech news.”
The agent should call the fetch function on the MCP server and return the relevant response.
2. To allow the agent to access additional tools, repeat the steps to add more MCP Tools components, each configured with a different server or tool.
Connect a Robility Flow MCP Server
1. Each Robility flow project runs its own MCP server that exposes the project’s flows as MCP tools. For more on managing flows exposed by your MCP server, refer to the guide on using Robility flow as an MCP server.
2. To connect and use flows as tools, follow these steps to configure the MCP Tools component in Server-Sent Events (SSE) mode:
3. Add an MCP Tools component to your flow, select Add MCP Server, and choose SSE mode.
4. In the MCP SSE URL field, update the default address to match your Robility flow server’s SSE endpoint.
The typical default URL is: http://localhost:7860/api/v1/mcp/sse.
When using SSE mode, all flows on the targeted server become available as tools.
5. In the component’s settings, enable Tool mode to make the component usable with an agent.
6. Connect the Toolset port of the MCP Tools component to the Tools port of the Agent component. Also ensure that Chat Input and Chat Output components are connected to the Agent if they aren’t already.
7. Test your flow to ensure the agent uses your flows to respond to queries. Open the Playground and enter a prompt that invokes a flow connected through the MCP Tools component.
8. To enable the agent to use additional flows, repeat these steps by adding more MCP Tools components and selecting different servers or tools.
MCP Tools Parameters
Name | Type | Description |
---|---|---|
command | String | Input parameter for stdio mode. Specifies the startup command for the MCP server. Default: uvx mcp-sse-shim@latest . |
sse_url | String | Input parameter for SSE mode. Specifies the SSE URL for the MCP server in a Robility flow project. Default for Robility flow Desktop: http://localhost:7868/ . Default for other installations: http://localhost:7860/api/v1/mcp/sse . |
tools | List[Tool] | Output parameter. A list of tools exposed by the MCP server. |
Managing Connected MCP Servers
You can manage connected MCP servers on the settings > MCP Servers page in the Robility flow client.
To add a new MCP server:
1. Select Add MCP Server to open the configuration pane.
2. Follow the steps outlined in Use the MCP Tools component to complete the setup.
To configure or delete an existing MCP server, select More next to the server entry.