Skip to content

Use PG Next with MCP

Connect an AI assistant over Streamable HTTP and verify access before operating.

Updated View as Markdown

PG Next exposes MCP over Streamable HTTP at https://mcp.pgnext.dev/mcp. The console domain and MCP endpoint are different. A healthy endpoint does not mean a client has loaded the tools.

Set up your client

  1. Create an MCP-purpose key with the minimum required scope and permissions.
  2. Configure an HTTP MCP server in a compatible client, using the endpoint above and an Authorization: Bearer <your key> header through the client’s secret mechanism.
  3. Do not put real keys in repositories, prompts or docs. Reload the client/session if the tools do not appear.

This example applies to clients accepting this JSON shape. Other clients may require another format. Replace the illustrative value using your client’s secret mechanism; this literal is not a working credential:

{
  "mcpServers": {
    "neon": {
      "type": "http",
      "url": "https://mcp.pgnext.dev/mcp",
      "headers": { "Authorization": "Bearer MCP_KEY_FROM_CLIENT_SECRET" }
    }
  }
}

Start every live task

Call neon_whoami, then neon_list_projects. Verify the owner, scope, project and effective permissions before reading or changing resources. If the runtime does not expose neon tools, stop the operation. Do not use other credentials to bypass MCP through REST, SQL or Kubernetes.

Try a read-only task, such as listing branches of a project whose access you have verified. There is no need to create or delete resources to test client connectivity.

Confirm operations with impact

CONFIRMATION_REQUIRED prepares a single-use token; it is not user authorization. Review the impact and target, then replay the exact same request with the token only when the user has authorized that change. Expired, consumed or mismatched tokens are rejected.

SQL writes, DDL, multiple statements and uncertain classifications require confirmation. See access controls and the API/tool reference.

Navigation

Type to search…

↑↓ navigate↵ open resultEsc close