06 MCP Tool#

Script: example/06_mcp_tool.py.

This key-free example starts the in-repo stdio MCP echo server, discovers its tool schema, wraps the tool as a FlowToolCall, and calls it directly.

python example/06_mcp_tool.py

API

Purpose

mcp_tools_from_server([...])

Discovers stdio MCP tools.

MCPToolCall

Exposes one MCP tool as an OpenRath tool.

tool(Session.from_user_message(...), args)

Calls the wrapped tool.

Use this page when wiring a real MCP server into flow.Agent(tools=...).

← Runnable Examples