Skip to content
LangChain

image generation for LangChain

io.github.magurelabs/image-generation

Generate an image from a text description with Google Gemini.

client:LangChain transport:stdio runtime:oci

Install image generation in LangChain

pip install langchain-mcp-adapters

from langchain_mcp_adapters.client import MultiServerMCPClient

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

tools = await client.get_tools()

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

image generation in other clients