How to install MCP for AI coding tools
MCP (Model Context Protocol) allows AI coding tools to interact with PostgresAI services. This guide shows how to install MCP integration for supported tools.
Supported tools
- Cursor
- Claude Code
- Windsurf
- Codex
Prerequisites
- Authenticated with PostgresAI (see below)
Authenticate
- Installed CLI
- npx
- bunx
postgresai auth
npx postgresai auth
bunx postgresai auth
Install MCP
Run the following command to install MCP for your AI coding tool:
- Installed CLI
- npx
- bunx
postgresai mcp install
npx postgresai mcp install
bunx postgresai mcp install
The CLI will detect supported AI coding tools and configure MCP integration automatically.
Verify installation
After installation, your AI coding tool will have access to PostgresAI features:
- View and manage issues
- Access database monitoring data
- Get AI-assisted recommendations for database optimization
Manual configuration
If automatic installation doesn't work, you can configure MCP manually. See PostgresAI CLI reference for the mcp command options.
Next steps
- How to work with issues - Learn how to manage issue reports in AI coding tools