Neon MCP not performing sql

Hi,

I have a problem with adding the MCP server to the Cursor.
I have created an API, added a MCP server to Cursor, it shows the tools, so it should be properly installed.
But still the agent is not able to list tables or run SQL, it returns a 404.
Even if I provide the correct database nema, branch and project id, I get a 404.

AGENT trace:
“”“”
I’ll try again to list the tables in your “****” database:

Called MCP toolget_database_tables

Let me try a different approach using SQL with the branch ID we know exists:

Calling MCP toolrun_sql

{

“params”: {

“projectId”: “***”,

“databaseName”: “***”,

“branchId”: “***”,

“sql”: “SELECT table_schema, table_name FROM information_schema.tables WHERE table_schema NOT IN (‘pg_catalog’, ‘information_schema’, ‘neon_system’) ORDER BY table_schema, table_name;”

}

}

try again

I’ll try again to list the tables in your database:

Called MCP toolrun_sql

Parameters:

{

“params”: {

“projectId”: “***”,

“databaseName”: “***”,

“sql”: “SELECT table_schema, table_name FROM information_schema.tables WHERE table_schema NOT IN (‘pg_catalog’, ‘information_schema’, ‘neon_system’) ORDER BY table_schema, table_name;”

}

}

Result:

Request failed with status code 404

We’re still getting the same 404 error…
“”“”

I have tried regenerating a key and a direct curl call to the API (which works for both keys) but have had no luck! I’m out of ideas on how to make the MCP work in Cursor. Do you have any ideas?

Hi, from what i see 404 means that the server URL has an issue when called as it returns Not Found response.

Have you tried this with an MCP inspector outside of Cursor? or on other MCP integrations?

Or does it work when you call that MCP tool with same query from commandline? Simulating the Cursor MCP tool call.

I tried with @modelcontextprotocol/inspector

When I call list_projects tool it returns a list of projects, it works perfectly!

But when I call tool get_database_tables, I get a response: Tool Result: Error

Request failed with status code 404

I have triple checked that I am using the right project id, database name, I also added the branch id.

I am sure I passed the right branc, I got it from: curl -X GET “https://console.neon.tech/api/v2/projects/****/branches”…

I get the same error when I call run_sql tool.

So tools: run_sql and get_database_tables are returning 404
while list_projects returns a response.

Any other ideas?

If i understand your reply correctly, you are saying that even with inspector calling get_database_tables returns 404? if yes then only neon tech can help if they are the maker of that mcp or API.

OK, will try to get Neon support.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.