Before you begin
- Before running the
initcommand, ensure that you have installed the Neon CLI. - If you have not authenticated with the neon auth command, running a Neon CLI command automatically launches the Neon CLI browser authentication process. Alternatively, you can specify a Neon API key using the
--api-keyoption when running a command. See Connect.
The init command
The init command installs the Neon MCP (Model Context Protocol) Server and authenticates it to Neon using a Neon API key.
Usage
From the CLI:
You can run it from the Neon CLI to install the Neon MCP (Model Context Protocol) Server and authenticate.
neon initnpx
You can also run the init command in the root directory of your app with npx instead of installing the Neon CLI locally:
npx neonctl@latest initAfter running the command, you can ask your Cursor chat to "Get started with Neon using MCP Resource", as shown in the example below. The Neon MCP Server uses AI rules defined in neon-get-started.mdc to help you get started with Neon, including helping you configure a database connection.
Options
This command supports global options only.
Example
Navigate to the root directory of your application and run the neonctl@latest init command:
cd /path/to/your/app
npx neonctl@latest initThe command outputs progress as it completes each step:
npx neonctl@latest init
┌ Adding Neon to your project
│
◒ Authenticating.
┌────────┬──────────────────┬────────┬────────────────┐
│ Login │ Email │ Name │ Projects Limit │
├────────┼──────────────────┼────────┼────────────────┤
│ alex │ alex@domain.com │ Alex │ 20 │
└────────┴──────────────────┴────────┴────────────────┘
◇ Authentication successful ✓
│
◇ Installed Neon MCP server
│
◇ Success! Neon is now ready to use with Cursor.
│
│
◇ What's next? ────────────────────────────────────────────────────────────────────────────╮
│ │
│ Restart Cursor and ask Cursor to "Get started with Neon using MCP Resource" in the chat │
│ │
├───────────────────────────────────────────────────────────────────────────────────────────╯
│
└ Have feedback? Email us at feedback@neon.techAI Assistant Support
This feature is currently in beta for Cursor, with VS Code and Claude Code support coming soon.
Need help?
Join our Discord Server to ask questions or see what others are doing with Neon. For paid plan support options, see Support.