Skip to content
LangChain

trino for LangChain

io.github.magurelabs/trino

Run read-only SQL against Trino and browse its catalogs, schemas and tables.

client:LangChain transport:stdio runtime:oci

Install trino in LangChain

pip install langchain-mcp-adapters

from langchain_mcp_adapters.client import MultiServerMCPClient

client = MultiServerMCPClient({
        "trino": {
            "transport": "stdio",
            "command": "docker",
            "args": ["run", "-i", "--rm", "docker.io/magureai/mcp-trino:2.0.0"],
        }
})

tools = await client.get_tools()

get_tools() returns the server's tools as LangChain tools, ready for an agent. LangChain docs

trino in other clients