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 129 tools.

Tools
129
What they doRead · write · destructive
57 · 50 · 2257 read50 write22 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_describe_project',
    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

    branch_idstringrequired
    No description.
    database_namestringrequired
    No description.
    base_branch_idstring
    No description.
    base_lsnstring
    No description.
    base_timestampstring
    No description.
    lsnstring
    No description.
    project_idstring
    Required for an unscoped connection. May be omitted when the connection is scoped to one project; if provided, it must match that project.
    timestampstring
    No description.
  • 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

    branch_idstringrequired
    An ID of the branch to describe
    database_namestring
    The name of the database. If not provided, the default neondb or first available database is used.
    project_idstring
    The ID of the project. Required for an unscoped connection. May be omitted when the connection is scoped to one project; if provided, it must match that project.
  • 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

    project_idstring
    Required for an unscoped connection. May be omitted when the connection is scoped to one project; if provided, it must match that 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

    table_namestringrequired
    The table name, optionally schema-qualified (for example, crm.contacts)
    branch_idstring
    An optional ID of the branch to execute the query against. If not provided the default branch is used.
    database_namestring
    The name of the database. If not provided, the default neondb or first available database is used.
    project_idstring
    The ID of the project to execute the query against. Required for an unscoped connection. May be omitted when the connection is scoped to one project; if provided, it must match that project.
  • 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

    sqlstringrequired
    The SQL statement to analyze
    analyzeboolean
    Whether to execute the statement with EXPLAIN ANALYZE. Defaults to false because execution may cause side effects.default false
    branch_idstring
    An optional ID of the branch to execute the query against. If not provided the default branch is used.
    database_namestring
    The name of the database. If not provided, the default neondb or first available database is used.
    project_idstring
    The ID of the project to execute the query against. Required for an unscoped connection. May be omitted when the connection is scoped to one project; if provided, it must match that project.
  • 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_ai_gatewayReturns the AI Gateway endpoint host for the specified branch, used to render code-snippet base URLs.Read-only

    Get Ai Gateway

    Returns the AI Gateway endpoint host for the specified branch, used to render code-snippet base URLs. branch_id is a branch id (br-...), not a branch name. Call list_branches to resolve a name.

    Inputs

    branch_idstringrequired
    No description.
    project_idstring
    Required for an unscoped connection. May be omitted when the connection is scoped to one project; if provided, it must match that project.
  • neonmcp_get_authRetrieves the Neon Auth integration details for the specified branch, including the auth provider type and integration status.Read-only

    Get Auth

    Retrieves the Neon Auth integration details for the specified branch, including the auth provider type and integration status. branch_id is a branch id (br-...), not a branch name. Call list_branches to resolve a name.

    Inputs

    branch_idstringrequired
    No description.
    project_idstring
    Required for an unscoped connection. May be omitted when the connection is scoped to one project; if provided, it must match that project.