N
Neon4mo ago
ambitious-aqua

Cursor Neon MCP not connecting to Vercels' linked Neon DB

Neon MCP created a new instance in Neon account, instead of using the DB connected to Vercel. Any idea how I can get the MCP to use the DB connected to Vercel?
No description
13 Replies
genetic-orange
genetic-orange4mo ago
The remote MCP server uses Neon's auth flow to connect. I don't think this will work for an Vercel-managed Neon project. You could try a local MCP server installation and supply an Org-scoped Neon API key: Local MCP server install instructions: https://neon.com/docs/ai/neon-mcp-server#local-mcp-server Org-scoped Neon API key: https://neon.com/docs/manage/api-keys#create-an-organization-api-key Please let us know if it works for you or not.
yelping-magenta
yelping-magenta4mo ago
I'm having the same issue, tried remote server and then local. Everything seems to be fine but agent don't find project or anything else. @Daniel
genetic-orange
genetic-orange4mo ago
Hi, I just tested this. I was able to access projects in my Vercel org using an organization-scoped API key and a local MCP server setup. When I changed my MCP server configuration from remote to local, it didn't work until I restarted Cursor and refreshed the MCP server.
No description
No description
No description
sensitive-blue
sensitive-blue4mo ago
@Thiago M @fury Did you try using a prompt with your org id?
list all projects in organization {orgID}
list all projects in organization {orgID}
The listProject tool takes an optional orgId as input. The LLM should be able to forward that to MCP if you include it in prompt. With OAuth authentication you should have access to organization projects as well. This might not work when running MCP locally because of user-scoped API keys.
ambitious-aqua
ambitious-aquaOP4mo ago
"Neon": { "command": "npx", "args": ["-y", "@neondatabase/mcp-server-neon", "start", "myKey"] }, -> Error: failed to initialize server: <truncated 43 bytes> hrow new ERR_MODULE_NOT_FOUND( ^ Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/Users/gn/.npm/_npx/ba0acfd5612a9e19/node_modules/@opentelemetry/api/build/src/index.js' imported from /Users/gn/.npm/_npx/ba0acfd5612a9e19/node_modules/@sentry/node/build/esm/integrations/http/index.js at finalizeResolution (node:internal/modules/esm/resolve:275:11) at moduleResolve (node:internal/modules/esm/resolve:860:10) at defaultResolve (node:internal/modules/esm/resolve:984:11) at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:780:12) at #cachedDefaultResolve (node:internal/modules/esm/loader:704:25) at ModuleLoader.resolve (node:internal/modules/esm/loader:687:38) at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:305:38) at ModuleJob._link (node:internal/modules/esm/module_job:137:49) { code: 'ERR_MODULE_NOT_FOUND', url: 'file:///Users/gn/.npm/_npx/ba0acfd5612a9e19/node_modules/@opentelemetry/api/build/src/index.js' } Node.js v23.11.0: server terminated. Click here to change your configuration. node --version v23.11.0 this works. but not the solution Daniel suggested. '''[info] Neon: Starting new stdio process with command: npx -y @neondatabase/mcp-server-neon start napixxx 2025-06-03 18:00:05.997 [info] Neon: Client closed for command 2025-06-03 18:00:05.997 [error] Neon: Failed to reload client: MCP error -32000: Connection closed 2025-06-03 18:00:05.998 [info] Neon: Handling ListOfferings action 2025-06-03 18:00:05.998 [error] Neon: No server info found''' can it be that @neondatabase/mcp-server-neon_ is not allowing org-keys? I managed to run it using Smithery, but I'd like to understand if/how it works using neon server. bump Unfortunately I've no solution and would be helpful is there is some direction from the devs.
genetic-orange
genetic-orange4mo ago
@shriidhar I am assuming that the auth flow uses a personal Neon account (like the Neon CLI) — and that account would have to be a member of the org to access org projects. Someone coming from Vercel would not have a personal Neon account, so I assume they would have to use a local MCP installation with an org-scoped API key. That's how I was able to access projects in my Vercel org via MCP.
sensitive-blue
sensitive-blue4mo ago
@fury If it worked on smithery and not with npx that would probably mean you are running older (cached) version of package. Please try with @latest to install latest version.
{
"Neon": {
"command": "npx",
"args": ["-y", "@neondatabase/mcp-server-neon@latest", "start", "<api_key>"]
},
}
{
"Neon": {
"command": "npx",
"args": ["-y", "@neondatabase/mcp-server-neon@latest", "start", "<api_key>"]
},
}
can it be that @neondatabase/mcp-server-neon is not allowing org-keys?
It should work just fine with org-keys, by listing just org-projects. There is no specific logic in here for Smithery or local.
ambitious-aqua
ambitious-aquaOP4mo ago
using your code leads to the folllowing error.
ambitious-aqua
ambitious-aquaOP4mo ago
"neon": { "command": "npx", "args": [ "-y", "@smithery/cli@latest", "run", "neon", "--key", "1175832f-11aa-4bb6-a43d-b20461d48cc2", "--config", ""{\"neonApiKey\":\"<myKey>\"}"" ] }, this works Any ideas?
sensitive-blue
sensitive-blue3mo ago
Tt looks like indeed a bug in latest version while identifying user accounts for one-of-new feature. One of the API call fails with org-api-key with insufficient permissions. This has been fixed and awaiting review. Will soon publish new version
ambitious-aqua
ambitious-aquaOP3mo ago
thank you. how to know about the merge with the fix?
sensitive-blue
sensitive-blue3mo ago
The new version with the fix has been published today. Please feel free to give it try and let me if that works.
{
"Neon": {
"command": "npx",
"args": ["-y", "@neondatabase/mcp-server-neon@latest", "start", "<org_api_key>"]
},
}
{
"Neon": {
"command": "npx",
"args": ["-y", "@neondatabase/mcp-server-neon@latest", "start", "<org_api_key>"]
},
}
ambitious-aqua
ambitious-aquaOP3mo ago
Didn't test it, but thank you for now for the effort. I'll test it in the next days.

Did you find this page helpful?