The pg MCP server provides AI agents with direct access to PostgreSQL databases. It exposes SQL query execution, transaction management, and schema inspection. Agents use it to retrieve, manipulate, and analyze data stored in PostgreSQL. The server connects to PostgreSQL instances via standard JDBC connections. Developers use it to build AI applications that require database interaction, such as data analysis tools, automated reporting systems, and database management assistants.
The pg MCP server provides AI agents with direct access to PostgreSQL databases. It exposes SQL query execution, transaction management, and schema inspection. Agents use it to retrieve, manipulate, and analyze data stored in PostgreSQL. The server connects to PostgreSQL instances via standard JDBC connections. Developers use it to build AI applications that require database interaction, such as data analysis tools, automated reporting systems, and database management assistants.
pip install pg-mcp-serverAdd this configuration to your claude_desktop_config.json:
{
"mcpServers": {
"stuzero-pg-mcp-server-github": {
"command": "uvx",
"args": [
"pip install pg-mcp-server"
]
}
}
}Restart Claude Desktop, then ask:
"What tools do you have available from pg?"
API Key Required
This server requires an API key from pg. Add it to your environment or config.
| Variable | Required | Description |
|---|---|---|
| PG_API_KEY | Yes | Your pg API key |
"What resources are available in pg?"
Claude will query available resources and return a list of what you can access.
"Show me details about [specific item] in pg"
Claude will fetch and display detailed information about the requested item.
"Create a new [item] in pg with [details]"
Claude will use the appropriate tool to create the resource and confirm success.
We build custom MCP integrations for B2B companies. From simple connections to complex multi-tool setups.