Skip to content
LangChain

postgres mcp for LangChain

io.github.sparta2025/postgres-mcp

PostgreSQL MCP server with 15 tools (SQL, EXPLAIN, health, indexes) plus a Gradio UI with LLM chat.

client:LangChain transport:stdio runtime:pypi

Install postgres mcp in LangChain

pip install langchain-mcp-adapters

from langchain_mcp_adapters.client import MultiServerMCPClient

client = MultiServerMCPClient({
        "postgres-mcp": {
            "transport": "stdio",
            "command": "uvx",
            "args": ["postgres-mcp-pro"],
        }
})

tools = await client.get_tools()

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

postgres mcp in other clients