Neon MCP server for AI agents and assistants

Securely connect your AI agents and chatbots (Claude, ChatGPT, Cursor, etc) with Neon MCP or direct API to create projects, manage branches, provision databases, and run migrations through natural language.

Neon MCP logoNeon MCP
Dcr Oauth

Neon MCP is a managed platform for Neon projects, branches, and databases. Use it to streamline development workflows and manage databases with clarity.

104 Tools

Try Neon MCP now

Type what you want done — sign in and watch it run live in the Tool Router playground.

TOOL ROUTER PLAYGROUND
Neon MCP
Try asking
TOOLS

Supported Tools

Every Neon MCP action and event your agent gets out of the box.

Add auth oauth provider

Adds an OAuth provider configuration to the specified branch's Neon Auth integration.

Add auth trusted domain

Adds a domain to the redirect URI whitelist for the specified branch.

Compare database schema

Compare one database's SQL schema on a branch to another.

Complete database migration

Apply or discard a prepared migration and delete the temporary branch.

Complete query tuning

Apply or discard query-tuning changes and delete the temporary branch.

Create auth user

Creates a new user in the Neon Auth user directory for the specified branch.

Create branch

Creates a branch with a read-write compute and waits until it is ready.

Create postgres database

Creates a database in the specified branch.

Create postgres endpoint

Creates a compute endpoint on a branch.

Create postgres role

Creates a Postgres role in the specified branch.

Create project

Creates a Neon project and waits until the default compute is ready.

Create snapshot

Creates a snapshot from the specified branch.

Create storage bucket

Creates a new branchable object storage bucket on the specified branch.

Delete auth oauth provider

Deletes an OAuth provider from the specified project.

Delete auth trusted domain

Removes a domain from the redirect URI whitelist for the specified branch.

Delete auth user

Deletes the specified user from the Neon Auth user directory for the specified branch.

Delete branch

Delete a branch and all its data.

Delete data api

Deletes the Neon Data API for the specified branch.

Delete function

Deletes the function identified by its slug.

Delete functions custom domain

Removes a custom domain registered on the branch and stops routing it.

Delete postgres database

Deletes the specified database from the branch.

Delete postgres endpoint

Deletes the specified compute endpoint.

Delete postgres role

Deletes the specified Postgres role from the branch.

Delete project

Delete a Neon project and all its data.

Delete snapshot

Deletes the specified snapshot.

Delete storage bucket

Deletes the named bucket from the specified branch.

Delete storage object

Deletes the named object from the bucket on the specified branch.

Delete storage objects by prefix

Soft-deletes every object on the specified branch whose key starts with `prefix`, in a single call.

Deploy function

Creates a deployment for the function.

Describe branch

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

Describe project

Retrieves the project record (settings, compute, usage).

Describe table schema

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

Disable auth

Disables the Neon Auth integration for the specified branch, removing the connection to the authentication provider.

Explain sql statement

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

Fetch

Fetch detailed information about a specific organization, project, or branch using the ID returned by the `search` tool.

Finalize branch restore

Finalize a branch created with `restore_snapshot` and `finalize: false`: reassign computes (this restarts them) and swap names so it replaces the original branch.

Get ai gateway

Returns the AI Gateway endpoint host for the specified branch, used to render code-snippet base URLs.

Get auth

Retrieves the Neon Auth integration details for the specified branch, including the auth provider type and integration status.

Get branch

Retrieves information about the specified branch.

Get connection string

Get a PostgreSQL connection string for a Neon database.

Get data api

Retrieves the Neon Data API configuration for the specified branch, including endpoint URL, enabled state, and database settings.

Get database tables

List all tables in a Neon database.

Get default branch

Resolve the project's default branch by the default flag, not by name.

Get doc resource

Fetch one Neon documentation page as markdown.

Get function

Returns the function identified by its slug.

Get neon auth config

Read Neon Auth config for a branch with OAuth and SMTP secrets redacted as "***redacted***".

Get operation

Retrieves details for the specified operation.

Get postgres database

Retrieves information about the specified database.

Get postgres endpoint

Retrieves information about the specified compute endpoint.

Get postgres role

Retrieves details about the specified role.

Get snapshot schedule

Returns the backup schedule for the specified branch, including the configured snapshot frequencies.

Get storage

Returns whether branchable object storage is usable for the specified branch.

Inspect database

Run one read-only neon inspect db check (pick `check` from the input schema).

List auth oauth providers

Lists the OAuth providers configured for the specified branch's Neon Auth integration.

List auth trusted domains

Lists the trusted domains in the redirect URI whitelist for the specified branch.

List branch computes

Retrieves a list of compute endpoints for the specified branch.

List branches

Retrieves a list of branches for the specified project.

List docs resources

List Neon documentation page slugs from neon.

List functions

Lists functions on the specified branch.

List functions custom domains

Lists all custom domains registered on the branch, across every target entity.

List log fields

Lists the low-cardinality log fields observed on this branch.

List log field values

Lists distinct values for a low-cardinality log field.

List operations

Lists operations for a project.

List organizations

List all organizations the current user belongs to.

List postgres databases

Retrieves a list of databases for the specified branch.

List postgres endpoints

Retrieves a list of compute endpoints for the specified project.

List postgres roles

Retrieves a list of Postgres roles from the specified branch.

List project members

Lists organization members and their per-project roles for an org-owned project.

List project permissions

Retrieves details about users who have access to the project, including the permission `id`, the granted-to email address, and the date project access was granted.

List projects

List Neon projects you own.

List regions

Lists Neon regions available to the authenticated account.

List slow queries

List queries from pg_stat_statements by execution time, slowest first.

List snapshots

Lists the snapshots for the specified project.

List storage buckets

Lists branchable object storage buckets visible on the specified branch, including those inherited from ancestor branches.

List storage objects

Lists objects visible in the named bucket on the specified branch, including those inherited from ancestor branches.

Prepare database migration

Apply a schema change on a temporary branch and return a migration_id.

Prepare query tuning

Analyze a slow query on a temporary branch and return a tuning_id.

Presign storage object

Returns a presigned URL that transfers bytes directly to or from the object's bucket on the specified branch, without the caller ever handling S3 credentials.

Provision neon auth

Enables Neon Auth for the specified branch by connecting it to an authentication provider.

Provision neon data api

Creates a new instance of Neon Data API in the specified branch.

Query logs

Returns logs for a branch.

Recover project

Recovers a deleted project within the 7-day deletion recovery period.

Register functions custom domain

Registers a hostname on the branch and routes it to a function.

Reset from parent

Reset a branch to its parent's current HEAD.

Reset postgres role password

Resets the password for the specified Postgres role.

Restart postgres endpoint

Restarts the specified compute endpoint by immediately suspending it and then starting it again.

Restore snapshot

Restore a snapshot onto a new or existing branch.

Run sql

Execute one SQL statement on a Neon database.

Run sql transaction

Execute multiple SQL statements as one transaction.

Search

Search across all organizations, projects, and branches by keyword.

Set default branch

Sets the specified branch as the project's default branch.

Set snapshot schedule

Replace a branch's automatic snapshot schedule.

Start postgres endpoint

Starts a compute endpoint.

Suspend postgres endpoint

Suspends the specified compute endpoint.

Update auth config

Updates the auth configuration for the branch.

Update auth oauth provider

Updates an OAuth provider for the specified project.

Update auth user role

Updates the role of a user in the Neon Auth user directory for the specified branch.

Update branch

Updates the specified branch.

Update data api

Updates the Neon Data API configuration for the specified branch.

Update function

Updates the function's mutable metadata — currently only the display `name`.

Update postgres database

Updates the specified database in the branch.

Update postgres endpoint

Updates the specified compute endpoint.

Update project

Updates the specified project.

Update snapshot

Updates the specified snapshot.

SETUP GUIDE

Connect Neon MCP Tool with your Agent

1

Install Composio

typescript
npm install @composio/core ai @ai-sdk/mcp @ai-sdk/openai
Install the Composio SDK and your agent framework
2

Create a session with MCP enabled

typescript
import { Composio } from "@composio/core";

const composio = new Composio();
const { mcp } = await composio.create("your-user-id", {
  toolkits: ["neon_mcp"],
  mcp: true,
});
Create a session scoped to Neon MCP and read its MCP URL and headers
3

Connect your agent to the MCP server

typescript
import { createMCPClient } from "@ai-sdk/mcp";
import { openai } from "@ai-sdk/openai";
import { generateText, stepCountIs } from "ai";

const client = await createMCPClient({
  transport: { type: "http", url: mcp.url, headers: mcp.headers },
});

const { text } = await generateText({
  model: openai("gpt-5.6-sol"),
  tools: await client.tools(),
  prompt: "Create a new Neon project and database",
  stopWhen: stepCountIs(10),
});

console.log(text);
await client.close();
Pass the session's MCP URL and headers to your agent and run a Neon MCP request
SETUP GUIDE

Connect Neon MCP API Tool with your Agent

1

Install Composio

typescript
npm install @composio/core @composio/openai openai
Install the Composio SDK, the OpenAI provider, and the OpenAI SDK
2

Create a Composio session

typescript
import OpenAI from "openai";
import { Composio } from "@composio/core";
import { OpenAIResponsesProvider } from "@composio/openai";

const composio = new Composio({ provider: new OpenAIResponsesProvider() });
const client = new OpenAI();

const session = await composio.create("your-user-id", { toolkits: ["neon_mcp"] });
const tools = await session.tools();
Initialize Composio with the OpenAI Responses provider and create a session scoped to Neon MCP
3

Run Neon MCP tools with your agent

typescript
let response = await client.responses.create({
  model: "gpt-5.6-sol",
  tools,
  input: [{ role: "user", content: "Create a new Neon project and database" }],
});

while (response.output.some((o) => o.type === "function_call")) {
  const outputs = await composio.provider.handleToolCalls(session, response.output);
  response = await client.responses.create({
    model: "gpt-5.6-sol",
    tools,
    previous_response_id: response.id,
    input: outputs,
  });
}

console.log(response.output_text);
Send a request, execute the Neon MCP tool calls through the session, and print the final answer

Why Use Composio?

AI Native Neon MCP Integration

  • Supports both Neon MCP and direct API based integrations
  • Structured, LLM-friendly schemas for reliable tool execution
  • Rich coverage for reading, writing, and querying your Neon MCP data

Managed Auth

  • Built-in OAuth handling with automatic token refresh and rotation
  • Central place to manage, scope, and revoke Neon MCP access
  • Per user and per environment credentials instead of hard-coded keys

Agent Optimized Design

  • Tools are tuned using real error and success rates to improve reliability over time
  • Comprehensive execution logs so you always know what ran, when, and on whose behalf

Enterprise Grade Security

  • Fine-grained RBAC so you control which agents and users can access Neon MCP
  • Scoped, least privilege access to Neon MCP resources
  • Full audit trail of agent actions to support review and compliance
FRAMEWORKS

Use Neon MCP with any AI Agent Framework

Choose a Framework you want to connect Neon MCP with

Rolling this out across your team?

Give your team centralized access control across every framework with Composio’s MCP Gateway.

EXPLORE MCP GATEWAY
FAQ

Frequently asked questions

Yes, Neon MCP requires you to configure your own Dcr Oauth credentials. Once set up, Composio handles secure credential storage and management for you.

Yes! Composio's Tool Router enables agents to use multiple toolkits. Learn more.

Yes. Composio is SOC 2 Type II compliant and is built to keep your Neon connection and credentials secure. OAuth tokens and API keys are encrypted, and sensitive customer data is protected at rest and in transit.

Composio also undergoes independent security testing and continuously monitors its systems for security threats. You can review the latest reports and policies in the Composio Trust Center.

Composio maintains and updates all toolkit integrations automatically, so your agents always work with the latest API versions.

When you connect a Neon account through Composio, every action runs under that account, so anything the agent creates, sends, or changes shows up in Neon as done by you. Keep an approval step in your prompt for actions with side effects, such as sending or deleting, and have the agent draft first.

Whatever the credentials you connect allow inside Neon. If Neon lets you scope a key to specific permissions, create a scoped one so the agent can only do what you intend. You can revoke the key inside Neon at any time.

Yes. Composio supports multiple connected accounts for the same app, and that works in Claude, ChatGPT, or any other assistant you connect through Composio. Give each Neon connection a name such as work or personal, and the assistant uses the one you mention in the request. Each account keeps its own credentials and nothing is merged.

Composio's free Hobby plan includes 100,000 tool calls per month with no credit card, which covers most personal Neon use. Paid plans add higher limits and team features. Your Neon plan and its API limits still apply as usual.

Built-in connectors usually give one AI access to a limited set of apps. Many people use Composio because it lets their AI connect to more apps than it normally supports, or connect to multiple accounts for the same app (e.g. connect Claude to multiple Neon accounts).

With Composio, you connect Neon once and then use it across different AI assistants without setting it up separately in each one. Connect your apps to Composio once, then connect Composio to whichever AI you use, whether that's Claude, ChatGPT, Hermes, or your own custom assistant.

Start with Neon MCP.It takes 30 seconds.

Managed auth, hosted MCP servers, and every Neon MCP tool your agent needs.Free to start.

Start building