Skip to content
LangChain

the trivia api mcp for LangChain

io.github.mrfentmen/the-trivia-api-mcp

Trivia questions from The Trivia API. No key required.

client:LangChain transport:stdio runtime:npm

Install the trivia api mcp in LangChain

pip install langchain-mcp-adapters

from langchain_mcp_adapters.client import MultiServerMCPClient

client = MultiServerMCPClient({
        "the-trivia-api-mcp": {
            "transport": "stdio",
            "command": "npx",
            "args": ["-y", "the-trivia-api-mcp"],
        }
})

tools = await client.get_tools()

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

the trivia api mcp in other clients