Postgres MCP for LangChain
io.github.edelciomolina/postgres-mcp
PostgreSQL MCP wrapper with .env credential mapping, tool selection, and safe read-only defaults.
client:LangChain
transport:stdio
runtime:npm
Install Postgres MCP in LangChain
pip install langchain-mcp-adapters
from langchain_mcp_adapters.client import MultiServerMCPClient
client = MultiServerMCPClient({
"postgres-mcp": {
"transport": "stdio",
"command": "npx",
"args": ["-y", "@edelciomolina/postgres-mcp"],
}
})
tools = await client.get_tools()
get_tools() returns the server's tools as LangChain tools, ready for an agent. LangChain docs