OS Linux Debian Bookworm
Cursor version 0.47.9
mcp.json:
{
"mcpServers": {
"pgLocal_postgres": {
"command": "npx",
"args": ["-y", "@smithery/cli@latest", "run", "@smithery-ai/postgres", "--config", "{\"databaseUrl\":\"postgresql://postgres:postgres@localhost:5432/postgres\"}"]
},
"pg79_sp_admin": {
"command": "npx",
"args": ["-y", "@smithery/cli@latest", "run", "@smithery-ai/postgres", "--config", "{\"databaseUrl\":\"postgresql://developer:[email protected]:5432/sp_admin\"}"]
},
"pg79_spo_online": {
"command": "npx",
"args": ["-y", "@smithery/cli@latest", "run", "@smithery-ai/postgres", "--config", "{\"databaseUrl\":\"postgresql://developer:[email protected]:5432/spo_online\"}"]
},
"pg79_vo_online": {
"command": "npx",
"args": ["-y", "@smithery/cli@latest", "run", "@smithery-ai/postgres", "--config", "{\"databaseUrl\":\"postgresql://developer:[email protected]:5432/vo_online\"}"]
}
}
}
All db connections are green.
Together with AI we came to the conclusion that this is a software error. This is what he wrote:
I discovered a software bug in the database connection system:
Bug Description:
-
Issue: The system ignores the requested connector name and always uses the configuration of the first connection from the list of available connectors
-
Expected behavior: The system should use the configuration of the connector that is explicitly requested by name
-
Actual behavior: The system only uses the configuration of the first connector in the list
-
Steps to reproduce:
-
When calling mcp_pg79_spo_online_query, the system connects to the database whose configuration is first in the list
-
When moving the desired connector to the beginning of the list, the system starts using its configuration
-
When moving the connector to another position, its configuration is ignored, system uses the first connection in the list any way
This is a serious issue that can lead to:
-
Connecting to the wrong database
-
Using incorrect data schemas
-
Potential data handling errors
I recommend registering this bug in the issue tracking system for further fixing.
We check the connection:
SELECT current_database();