Pg Aiguide
Pg Aiguide is an MCP server that adds database tools to AI assistants such as Claude Desktop, Claude Code and Cursor. Comprehensive PostgreSQL documentation and best practices, including ecosystem tools. It has 1,874 GitHub stars, is released under the Apache-2.0 license and runs locally with npx -y @tigerdata/pg-aiguide.
github.com/timescale/pg-aiguide (opens in a new tab)
Data as of from the GitHub API and the official MCP registry; description from the project's repository. Report an error
Install Pg Aiguide
Generated from the server's MCP registry entry. Replace your-value with your own values.
Claude Desktop
{
"mcpServers": {
"pg-aiguide": {
"command": "npx",
"args": [
"-y",
"@tigerdata/pg-aiguide"
],
"env": {
"OPENAI_API_KEY": "your-value",
"PGHOST": "your-value",
"PGPORT": "your-value",
"PGUSER": "your-value",
"PGPASSWORD": "your-value",
"PGDATABASE": "your-value"
}
}
}
}Settings > Developer > Edit Config. macOS: ~/Library/Application Support/Claude/, Windows: %APPDATA%\Claude\. Restart Claude Desktop afterwards.
Claude Code
claude mcp add --env OPENAI_API_KEY=your-value --env PGHOST=your-value --env PGPORT=your-value --env PGUSER=your-value --env PGPASSWORD=your-value --env PGDATABASE=your-value --transport stdio pg-aiguide -- npx -y @tigerdata/pg-aiguideCursor
{
"mcpServers": {
"pg-aiguide": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@tigerdata/pg-aiguide"
],
"env": {
"OPENAI_API_KEY": "your-value",
"PGHOST": "your-value",
"PGPORT": "your-value",
"PGUSER": "your-value",
"PGPASSWORD": "your-value",
"PGDATABASE": "your-value"
}
}
}
}Project file; use ~/.cursor/mcp.json to enable it in every project.
VS Code
{
"inputs": [
{
"type": "promptString",
"id": "openai_api_key",
"description": "OPENAI_API_KEY",
"password": true
},
{
"type": "promptString",
"id": "pghost",
"description": "PGHOST",
"password": true
},
{
"type": "promptString",
"id": "pgport",
"description": "PGPORT",
"password": true
},
{
"type": "promptString",
"id": "pguser",
"description": "PGUSER",
"password": true
},
{
"type": "promptString",
"id": "pgpassword",
"description": "PGPASSWORD",
"password": true
},
{
"type": "promptString",
"id": "pgdatabase",
"description": "PGDATABASE",
"password": true
}
],
"servers": {
"pg-aiguide": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@tigerdata/pg-aiguide"
],
"env": {
"OPENAI_API_KEY": "${input:openai_api_key}",
"PGHOST": "${input:pghost}",
"PGPORT": "${input:pgport}",
"PGUSER": "${input:pguser}",
"PGPASSWORD": "${input:pgpassword}",
"PGDATABASE": "${input:pgdatabase}"
}
}
}
}Claude Code (remote)
claude mcp add --transport http pg-aiguide "https://mcp.tigerdata.com/docs"The same server is also hosted as a remote MCP endpoint, so nothing runs on your machine.
Config formats checked against the official docs on Oct 7, 2026: modelcontextprotocol.io (opens in a new tab), code.claude.com (opens in a new tab), cursor.com (opens in a new tab), code.visualstudio.com (opens in a new tab).
Environment variables
Variables the server reads at startup.
| Name | Required | Description |
|---|---|---|
OPENAI_API_KEYsecret | Yes | Your API key for text embeddings via OpenAI |
PGHOSTsecret | Yes | PostgreSQL host to connect to |
PGPORTsecret | Yes | PostgreSQL port to connect to |
PGUSERsecret | Yes | PostgreSQL user to connect as |
PGPASSWORDsecret | Yes | PostgreSQL password to connect with |
PGDATABASEsecret | Yes | PostgreSQL database to connect to |
DB_SCHEMAsecret | No | PostgreSQL database schema to use |
About Pg Aiguide
AI-optimized PostgreSQL expertise for coding assistants pg-aiguide helps AI coding tools write dramatically better PostgreSQL code.
- ai
- ai-agents
- ai-coding
- claude-marketplace
- claude-plugin
- claude-skills
- docs
- documentation
- mcp
- mcp-server
Similar MCP servers
More databases MCP servers
MCP Memory Service
doobidoo/mcp-memory-service
Open-source persistent memory for AI agent pipelines (LangGraph, CrewAI, AutoGen) and Claude.
Active · last commit Oct 26, 2026
DatabasesPythonErd Editor
dineug/erd-editor
Design database schemas as ERDs in your browser, VS Code, JetBrains IDEs or Obsidian.
Active · last commit Oct 25, 2026
DatabasesTypeScriptMCP Server MySQL
benborla/mcp-server-mysql
A Model Context Protocol server that provides read-only access to MySQL databases.
Maintained · last commit Jul 27, 2026
DatabasesJavaScriptMySQL MCP Server
designcomputer/mysql_mcp_server
A Model Context Protocol (MCP) server that enables secure interaction with MySQL databases.
Active · last commit Aug 2, 2026
DatabasesPythonMindwtr
dongdongbh/Mindwtr
Task automation via SQLite, desktop Local API, or Mindwtr Cloud; read-only by default.
Active · last commit Oct 26, 2026
DatabasesTypeScriptMongoDB MCP Server
mongodb-js/mongodb-mcp-server
MongoDB Model Context Protocol Server.
Active · last commit Oct 23, 2026
DatabasesTypeScript
How do I install the Pg Aiguide MCP server?
Add the command npx -y @tigerdata/pg-aiguide to your MCP client: put it in claude_desktop_config.json for Claude Desktop, run claude mcp add for Claude Code, or add it to .cursor/mcp.json (Cursor) or .vscode/mcp.json (VS Code). The snippets on this page are ready to paste.
Is Pg Aiguide free?
The server is open source under the Apache-2.0 license, so running it is free. It needs credentials (OPENAI_API_KEY, PGHOST, PGPORT, PGUSER, PGPASSWORD, PGDATABASE and DB_SCHEMA) for the service it connects to, which may require a paid account.
Is Pg Aiguide actively maintained?
The most recent commit was on Oct 22, 2026. The latest release is v0.6.1, published Sep 4, 2026. appsgit only lists MCP servers with a commit in the last six months.