mcp-server-neon
by: neondatabase-labs
MCP server for interacting with Neon Management API and databases
📌Overview
Purpose: The Neon MCP Server facilitates communication between large language models (LLMs) and external systems using the Model Context Protocol (MCP), simplifying database management via natural language.
Overview: The Neon MCP Server allows users to interact with Neon databases through easily understandable commands, enhancing database management with a user-friendly interface. It supports various commands for creating and managing database schemas, as well as executing migrations safely with the ability to preview changes.
Key Features:
-
Natural Language Commands: Users can perform database operations such as creating databases, running migrations, and summarizing projects using intuitive language commands, which streamlines interaction.
-
Migration Management: The server supports a structured migration process with "Start" and "Commit" commands, enabling safe modifications to database schemas and promoting better testing practices through temporary branches.
Neon MCP Server
Model Context Protocol (MCP) is a standardized protocol for managing context between large language models (LLMs) and external systems. This repository provides an installer and an MCP Server for Neon, enabling natural language interactions with Neon through clients like Claude Desktop.
Claude Setup
Installing via Smithery
To install Neon MCP Server for Claude Desktop via Smithery:
npx -y @smithery/cli install neon --client claude
Requirements
- Node.js >= v18.0.0
- Claude Desktop
- Neon API key (generate it through the Neon console).
How to Use Locally
- Run
npx @neondatabase/mcp-server-neon init $NEON_API_KEY
- Restart Claude Desktop
- Use commands such as
List me all my Neon projects
Features
Supported Tools
list_projects
describe_project
create_project
delete_project
create_branch
delete_branch
describe_branch
get_connection_string
run_sql
run_sql_transaction
get_database_tables
describe_table_schema
prepare_database_migration
complete_database_migration
provision_neon_auth
Migrations
Migrations manage changes to your database schema. The Neon MCP server allows LLMs to perform migrations safely using "Start" and "Commit" commands, enabling easy testing of migrations before applying them.
Development
Development with MCP CLI Client
Iterate on the MCP Server using the mcp-client/
:
npm install
npm run build
npm run watch # Keep this open.
cd mcp-client/ && NEON_API_KEY=... npm run start:mcp-server-neon
Development with Claude Desktop
npm install
npm run build
npm run watch # Keep this open.
node dist/index.js init $NEON_API_KEY
Restart Claude each time to test changes.
Testing
To run tests, set up the .env
file according to .env.example
.
npm run test