pgmcp for LangChain
io.github.pascalallen/pgmcp
Read-only Postgres ops/DBA diagnostics: slow queries, EXPLAIN, locks, index and table health.
client:LangChain
transport:stdio
runtime:oci
Install pgmcp in LangChain
pip install langchain-mcp-adapters
from langchain_mcp_adapters.client import MultiServerMCPClient
client = MultiServerMCPClient({
"pgmcp": {
"transport": "stdio",
"command": "docker",
"args": ["run", "-i", "--rm", "ghcr.io/pascalallen/pgmcp:1.1.0"],
}
})
tools = await client.get_tools()
get_tools() returns the server's tools as LangChain tools, ready for an agent. LangChain docs