MCP setup
Has anyone been able to setup an MCP to connect to their database on neon using cursor?
19 Replies
conscious-sapphire•6mo ago
We have a guide here:
https://neon.tech/guides/cursor-mcp-neon
Neon
Get started with Cursor and Neon Postgres MCP Server - Neon Guides
Make schema changes with natural language using Cursor and Neon MCP Server
extended-salmonOP•6mo ago
Thanks for your response Daniel.
I followed the steps listed in the documentation but I still cannot get it to connect. I attached picture of the error and the developer tools console.
I am running my project on my windows machine and using node version 21.5.0.
Do you have any idea why it is still failing to connect?


conscious-sapphire•6mo ago
I'll post internally to see if someone can take a look.
stormy-gold•6mo ago
I can't really say whats wrong here, the MCP server's
start
command does not interact with file system. Do you have any other MCP server working on Windows + Cursor.
This being said, we recently launched a remote MCP server, now you longer need to run it on your system. You can read about it here - https://neon.tech/blog/announcing-neons-remote-mcp-server
You can add following config to cursor and it should trigger the OAuth flow, please give it a try
other-emerald•6mo ago
hey! on cursor mac
where can i add
"Neon": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://mcp.neon.tech/sse"]
}
we dont have mcp_config
other-emerald•6mo ago

conscious-sapphire•6mo ago
Do you see this option:

conscious-sapphire•6mo ago
That will open the mcp.json file:

other-emerald•6mo ago
thnks! but this is now giving
client closed
I tried the cmd /c trick seen on forums and its still not working

other-emerald•6mo ago
when i run the command in a terminal seperately it runs tho
grumpy-cyan•6mo ago
Having some trouble with setting up the Remote Neon MCP Server as well, have tried Cursor, Windsurf, and now Claude Desktop to no avail. Basically an OAuth window never opens in my browser. I'm on a Mac with default browser set to Chrome, not sure if y'all have any insights.
"An OAuth window will open in your browser. Follow the prompts to authorize Claude to access your Neon account."
https://neon.tech/guides/neon-mcp-server
Neon
Get started with Claude Desktop and Neon MCP Server - Neon Guides
Enable natural language interaction with your Neon Postgres databases using LLMs
grumpy-cyan•6mo ago
grumpy-cyan•6mo ago
grumpy-cyan•6mo ago
Things work fine when connecting via MCP Inspector

causal-orange•5mo ago
I'm still getting a 404 error when I try to run_sql. Been this way for a couple of weeks but thought it was working at one point.
conscious-sapphire•5mo ago
I just tried it with Cursor by listing my databases on my branch. This setup uses the MCP remote server. https://neon.tech/guides/cursor-mcp-neon#option-1-setting-up-the-remote-hosted-neon-mcp-server
I wonder if it has something to do with the Postgres user that owns your database. I'm using the default
neondb
database and the neondb_owner
user. There was a previous issue we had with connecting to a database owned by a different user. Check to make sure you have the latest MCP server installed or use our remote MCP server.Neon
Get started with Cursor and Neon Postgres MCP Server - Neon Guides
Make schema changes with natural language using Cursor and Neon MCP Server

causal-orange•5mo ago
I was using Option #2 because I couldn't get Option #1 working but I dug into that a little deaper. The issue with not being able to get option #1 working was my node installation was missing pkce-challenge package. Had to clear cache and then run "npm install -g @modelcontextprotocol/sdk pkce-challenge" just in case it helps someone else.
It is definitely a permission issue. If I have Cursor create a new database and test a query it can do that. Thanks for the help.
conscious-sapphire•5mo ago
Thank you for letting us know, @Tuck !
optimistic-gold•2mo ago
FYI... I use nvm to manage node. It turned out that I had an node version that was less than v18 installed. I uninstalled it and restarted my client which is connecting to the MCP server (Claude Desktop) and the oauth process initiated. All good!