Skip to the content.

Client integrations — wire MCPg into your editor or agent

MCPg speaks all three MCP transports (stdio, streamable-http, sse), so it works with every major MCP client. This page gives the fastest install path per client. Everything below assumes uv is installed (pipx install uv or see astral.sh/uv); uvx mcpg fetches and runs the latest release with no separate install step. Every snippet below uses the same local-only example DSN (postgresql://user:pass@localhost:5432/mydb) — replace it with your own; remote hosts require ?sslmode=require (or stronger), which MCPg enforces at startup.

Safe by default everywhere: whatever the client, MCPg starts in read-only mode and every tool carries MCP readOnlyHint / destructiveHint annotations, so clients that support them can auto-approve reads and gate writes.

Claude Desktop

One-click: download mcpg-<version>.mcpb from the latest release and double-click it. You’ll be prompted for the connection URL (stored in the OS keychain). Manual config alternative in the installation guide.

Claude Code (CLI)

claude mcp add mcpg --env MCPG_DATABASE_URL=postgresql://user:pass@localhost:5432/mydb -- uvx mcpg

Cursor

One-click: Add to Cursor (then edit the placeholder connection URL under Settings → MCP).

Manual — ~/.cursor/mcp.json (global) or .cursor/mcp.json (per-project):

{
  "mcpServers": {
    "mcpg": {
      "command": "uvx",
      "args": ["mcpg"],
      "env": {
        "MCPG_DATABASE_URL": "postgresql://user:pass@localhost:5432/mydb"
      }
    }
  }
}

VS Code (Copilot agent mode)

One-click: Install in VS Code · Install in VS Code Insiders

The one-click install prompts for your connection URL as a masked input — it never lands in plain-text settings.

Manual — .vscode/mcp.json in your workspace:

{
  "inputs": [
    {
      "type": "promptString",
      "id": "database_url",
      "description": "PostgreSQL connection URL",
      "password": true
    }
  ],
  "servers": {
    "mcpg": {
      "command": "uvx",
      "args": ["mcpg"],
      "env": {
        "MCPG_DATABASE_URL": "${input:database_url}"
      }
    }
  }
}

Windsurf

~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "mcpg": {
      "command": "uvx",
      "args": ["mcpg"],
      "env": {
        "MCPG_DATABASE_URL": "postgresql://user:pass@localhost:5432/mydb"
      }
    }
  }
}

JetBrains IDEs (AI Assistant)

Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add → As JSON, then paste the same mcpServers block shown for Windsurf above. Available in AI Assistant 2025.1+ across IntelliJ IDEA, PyCharm, DataGrip, and the rest of the family.

Cline / Roo Code (VS Code extensions)

Cline can install MCPg autonomously — ask it to “set up the MCP server at github.com/devopam/MCPg” and it follows llms-install.md. Or configure it by hand: MCP Servers panel → Configure MCP Servers, or edit cline_mcp_settings.json:

{
  "mcpServers": {
    "mcpg": {
      "command": "uvx",
      "args": ["mcpg"],
      "env": {
        "MCPG_DATABASE_URL": "postgresql://user:pass@localhost:5432/mydb"
      }
    }
  }
}

Zed

settings.json (⌘, / Ctrl-,):

{
  "context_servers": {
    "mcpg": {
      "command": {
        "path": "uvx",
        "args": ["mcpg"],
        "env": {
          "MCPG_DATABASE_URL": "postgresql://user:pass@localhost:5432/mydb"
        }
      }
    }
  }
}

Google Antigravity (and Gemini CLI)

Antigravity’s IDE and CLI share one MCP config — ~/.gemini/config/mcp_config.json (also reachable in-app via Manage MCP Servers → View raw config; Antigravity reloads it automatically on save):

{
  "mcpServers": {
    "mcpg": {
      "command": "uvx",
      "args": ["mcpg"],
      "env": {
        "MCPG_DATABASE_URL": "postgresql://user:pass@localhost:5432/mydb"
      }
    }
  }
}

For a remote/shared deployment, use "serverUrl": "https://your-host:8000" with MCPg running the streamable-http transport (see the HTTP section below).

Continue

~/.continue/config.yaml:

mcpServers:
  - name: mcpg
    command: uvx
    args:
      - mcpg
    env:
      MCPG_DATABASE_URL: postgresql://user:pass@localhost:5432/mydb

Qwen Code (CLI)

~/.qwen/settings.json (global) or .qwen/settings.json in your project — the top-level mcpServers object:

{
  "mcpServers": {
    "mcpg": {
      "command": "uvx",
      "args": ["mcpg"],
      "env": {
        "MCPG_DATABASE_URL": "postgresql://user:pass@localhost:5432/mydb"
      }
    }
  }
}

qwen mcp add can write the entry for you, and the /mcp dialog inside an interactive session shows every configured server and its tools. Remote deployments can use "httpUrl" against MCPg’s streamable-http transport instead of command.

Perplexity (Mac app, paid plans)

Perplexity’s desktop app runs local MCP servers through a helper process: Settings → Connectors → install the PerplexityXPC helper → Add Connector. Use the Advanced tab and paste the same mcpServers JSON shown for Windsurf above (the Simple tab’s single command field can’t carry the MCPG_DATABASE_URL environment variable). Once the connector shows Running, toggle it on under Sources on the home screen.

ChatGPT (remote connector — developer mode)

ChatGPT connects to remote MCP servers only: HTTPS required, no localhost, OAuth or no-auth connectors. Run MCPg’s streamable-http transport on a reachable host (see the HTTP section below), then in ChatGPT: Settings → Apps → Advanced settings → Developer mode (Pro/Plus/Business/Enterprise, web) → add a connector with your server URL.

Auth caveat, stated plainly: ChatGPT’s connector options don’t include static bearer headers, so either front MCPg with an OAuth-terminating gateway or run a no-auth connector only on a private network against a read-only, non-production database — never expose an unauthenticated database tool surface to the public internet.

Microsoft Copilot

Anything that speaks HTTP (LangGraph, custom agents, web apps)

Run MCPg as a server and point the client at it:

MCPG_DATABASE_URL=postgresql://user:pass@localhost:5432/mydb \
MCPG_TRANSPORT=streamable-http \
MCPG_HTTP_PORT=8000 \
MCPG_HTTP_AUTH_TOKEN=change-me \
mcpg

Then connect any MCP-over-HTTP client to http://localhost:8000 with the bearer token. For OIDC/JWT auth, rate limiting, and TLS options, see the installation guide and cookbook.


Asked about, not (yet) coverable


No interesting data to point at? Seed the demo dataset first: mcpg --demo plants a curated schema that gives every tool above something real to find.