Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to the Neon MCP server

Vendor MCP
Open markdown

The Neon MCP connector routes your AI agent's tool calls to Neon's own MCP server through Scalekit. Each user signs in to Neon once, and Scalekit stores and refreshes their tokens, so your agent never handles credentials. It comes with 35 tools.

Tools
35
What they doRead · write · destructive
21 · 6 · 821 read6 write8 destructive
Users sign in with
OAuth app
Scalekit's or your own

Setup

  1. Install the SDK

    Terminal window
    npm install @scalekit-sdk/node dotenv
  2. Set your credentials

    Add your Scalekit credentials to your .env file. Find values in app.scalekit.com > Developers > API Credentials.

    .env
    SCALEKIT_ENVIRONMENT_URL=<your-environment-url>
    SCALEKIT_CLIENT_ID=<your-client-id>
    SCALEKIT_CLIENT_SECRET=<your-client-secret>
  3. Create the Neon MCP connection

    In AgentKit > Connections, create a Neon MCP connection. The name you give it is the connection_name your code passes. See Configure connections.

    Scalekit credentials are available for Neon MCP server, so you don't need to register an OAuth app.

  4. Authorize a user and make your first call

    quickstart.mts
    import { ScalekitClient } from '@scalekit-sdk/node'
    import 'dotenv/config'
    import { createInterface } from 'node:readline/promises'
    const scalekit = new ScalekitClient(
    process.env.SCALEKIT_ENVIRONMENT_URL,
    process.env.SCALEKIT_CLIENT_ID,
    process.env.SCALEKIT_CLIENT_SECRET,
    )
    const actions = scalekit.actions
    const connector = 'neonmcp'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize Neon MCP:', link)
    const rl = createInterface({ input: process.stdin, output: process.stdout })
    await rl.question('Press Enter after authorizing...')
    rl.close()
    // Make your first call
    const result = await actions.executeTool({
    connector,
    identifier,
    toolName: 'neonmcp_list_branch_computes',
    toolInput: {},
    })
    console.log(result)
    Terminal window
    npx tsx quickstart.mts

    Each user signs in once. See Authorize a user for the full flow and statuses.

Tools

Pass the exact name to execute_tool
Try in PlaygroundRequest a tool
  • neonmcp_compare_database_schemaCompare the database schema between two branches to identify differences in tables, columns, and constraints.Read-only

    Compare Database Schema

    Compare the database schema between two branches to identify differences in tables, columns, and constraints.

    Inputs

    branchIdstringrequired
    The ID of the branch. Leave blank to use the default branch.
    databaseNamestringrequired
    The name of the database. Defaults to `neondb` if not provided.
    projectIdstringrequired
    The ID of the Neon project.
  • neonmcp_describe_branchGet a tree view of all objects in a branch including databases, schemas, tables, views, and functions.Read-only

    Describe Branch

    Get a tree view of all objects in a branch including databases, schemas, tables, views, and functions.

    Inputs

    branchIdstringrequired
    The ID of the branch. Leave blank to use the default branch.
    projectIdstringrequired
    The ID of the Neon project.
    databaseNamestring
    The name of the database. Defaults to `neondb` if not provided.
  • neonmcp_describe_projectGet details and configuration of a specific Neon project by its ID.Read-only

    Describe Project

    Get details and configuration of a specific Neon project by its ID.

    Inputs

    projectIdstringrequired
    The ID of the Neon project.
  • neonmcp_describe_table_schemaGet column definitions, data types, and constraints for a specific table in a Neon database.Read-only

    Describe Table Schema

    Get column definitions, data types, and constraints for a specific table in a Neon database.

    Inputs

    projectIdstringrequired
    The ID of the Neon project.
    tableNamestringrequired
    The name of the table
    branchIdstring
    The ID of the branch. Leave blank to use the default branch.
    databaseNamestring
    The name of the database. Defaults to `neondb` if not provided.
  • neonmcp_explain_sql_statementAnalyze the query execution plan for a SQL statement using EXPLAIN ANALYZE.Read-only

    Explain Sql Statement

    Analyze the query execution plan for a SQL statement using EXPLAIN ANALYZE.

    Inputs

    projectIdstringrequired
    The ID of the Neon project.
    sqlstringrequired
    The SQL statement to execute.
    analyzeboolean
    Set to `true` to include ANALYZE in EXPLAIN. Default is `true`.default true
    branchIdstring
    The ID of the branch. Leave blank to use the default branch.
    databaseNamestring
    The name of the database. Defaults to `neondb` if not provided.
  • neonmcp_fetchFetch detailed information about a specific organization, project, or branch using its ID.Read-only

    Fetch

    Fetch detailed information about a specific organization, project, or branch using its ID.

    Inputs

    idstringrequired
    The entity ID returned by the `search` tool.
  • neonmcp_get_connection_stringGet a PostgreSQL connection string for a Neon database, resolving project, branch, and database automatically.Read-only

    Get Connection String

    Get a PostgreSQL connection string for a Neon database, resolving project, branch, and database automatically.

    Inputs

    projectIdstringrequired
    The ID of the Neon project.
    branchIdstring
    The ID of the branch. Leave blank to use the default branch.
    computeIdstring
    The ID of the compute endpoint. Defaults to the branch's read-write compute if not provided.
    databaseNamestring
    The name of the database. Defaults to `neondb` if not provided.
    roleNamestring
    The database role to connect with. Defaults to `neondb_owner` if not provided.
  • neonmcp_get_database_tablesList all tables in a Neon database on a specific branch.Read-only

    Get Database Tables

    List all tables in a Neon database on a specific branch.

    Inputs

    projectIdstringrequired
    The ID of the Neon project.
    branchIdstring
    The ID of the branch. Leave blank to use the default branch.
    databaseNamestring
    The name of the database. Defaults to `neondb` if not provided.