Skip to main content

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

  1. Authenticated with PostgresAI (see below)

Authenticate

postgresai auth

Install MCP

Run the following command to install MCP for your AI coding tool:

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