Neon PostgreSQL MCP Server
Description
# Neon PostgreSQL MCP Server A Model Context Protocol (MCP) server that provides secure access to Neon PostgreSQL databases, enabling AI assistants like Claude to interact with your database through standardized tools. ## Overview This MCP server allows AI assistants to: - Query…
About
# Neon PostgreSQL MCP Server A Model Context Protocol (MCP) server that provides secure access to Neon PostgreSQL databases, enabling AI assistants like Claude to interact with your database through standardized tools. ## Overview This MCP server allows AI assistants to: - Query data using SELECT statements - Execute…
Details
- Author
- spragginsdesigns
- Downloads
- 264
- Categories
- Database
Jump to
- Secure SSL/TLS encrypted connections to Neon PostgreSQL.
- Connection pooling with configurable maximum connections and idle timeout.
- Input validation and type safety for all operations.
- Comprehensive error handling with meaningful messages.
- Full implementation of the Model Context Protocol specification.
- Multiple server implementations (ES module, CommonJS, basic, TypeScript).
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
Neon PostgreSQL MCP ServerCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
Clone the repository, install dependencies with npm install, and set the NEON_PG_CONNECTION_STRING environment variable to your Neon PostgreSQL connection string. Run one of the provided server implementations (e.g., node pg-mcp-server.js for the ES module version) and configure your MCP-compatible client (e.g., Claude Desktop or Cursor IDE) to point to the server script with the environment variable set.
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"neon postgresql mcp server": {
"neon-pg-mcp-server": {
"command": "node",
"args": [
"pg-mcp-server.js"
]
}
}
}
}
McpServers
{
"neon-pg-mcp-server": {
"command": "node",
"args": [
"pg-mcp-server.js"
]
}
}
Neon PostgreSQL MCP Server
A Model Context Protocol (MCP) server that provides secure access to Neon PostgreSQL databases, enabling AI assistants like Claude to interact with your database through standardized tools.
Overview
This MCP server allows AI assistants to:
- Query data using SELECT statements
- Execute data modifications (INSERT, UPDATE, DELETE)
- List available tables
- Describe table structures
The server implements multiple versions to demonstrate different approaches:
- pg-mcp-server.js - Modern ES module implementation using the latest MCP SDK
- index.js - CommonJS implementation with class-based architecture
- basic-pg-server.js - Simplified implementation with basic MCP protocol handling
- src/index.ts - TypeScript implementation (requires compilation)
Features
- Secure Connection: SSL/TLS encrypted connections to Neon PostgreSQL
- Connection Pooling: Efficient database connection management
- Type Safety: Input validation for all operations
- Error Handling: Comprehensive error handling with meaningful messages
- MCP Compliance: Full implementation of the Model Context Protocol specification
Prerequisites
- Node.js 18+
- A Neon PostgreSQL database account and connection string
- An MCP-compatible client (e.g., Claude Desktop, Cursor IDE)
Installation
1. Clone this repository:
git clone <repository-url>
cd neon-pg-server
2. Install dependencies:
npm install
3. Set up your Neon PostgreSQL connection string as an environment variable:
export NEON_PG_CONNECTION_STRING="postgresql://user:password@host/database?sslmode=require"
Usage
Running the Server
Choose one of the available implementations:
ES Module version (recommended):
node pg-mcp-server.js
CommonJS version:
node index.js
Basic version:
node basic-pg-server.js
TypeScript version:
```bash
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.



