db-mcp-server: Cursor Failing to List and Execute Tools
Database MCP Server Tool Registration Issue
Description
The MCP Server is not functioning as expected. While it successfully connects to the PostgreSQL database, it fails to properly register database-specific tools, only registering the list_databases tool. Additionally, when the Cursor Agent attempts to call the tool, the operation hangs.
Environment
- Docker container running
freepeak/db-mcp-server - PostgreSQL database
- Transport mode: stdio
Configuration Files
~/.cursor/mcp.json:
{
"mcpServers": {
"multidb_stdio": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"--network=app_network",
"-v $HOME/postgres_mcp_server_config.json:/app/config.json",
"-e TRANSPORT_MODE=stdio",
"-e CONFIG_PATH=/app/config.json",
"freepeak/db-mcp-server",
"/app/server",
"-t",
"stdio",
"-c",
"/app/config.json"
]
}
}
}
postgres_mcp_server_config.json:
{
"connections": [
{
"id": "mydb",
"type": "postgres",
"host": "database",
"port": 5432,
"name": "postgres",
"user": "postgres",
"password": "postgres"
}
]
}
Logs
2025-04-02 05:21:36] INFO: Loaded database config from file: /app/config.json
[2025-04-02 05:21:36] INFO: Connection [0]: ID=banking_db, Type=postgres, Host=database, Port=5432, Name=postgres
[2025-04-02 05:21:36] INFO: Connected to postgres database at database:5432/postgres
[2025-04-02 05:21:36] INFO: Successfully connected to all 1 databases
[2025-04-02 05:21:36] INFO: Connected to 1 databases: [banking_db]
2025-04-02T05:21:36.762Z ERROR Error registering tools for database banking_db: failed to get database info for banking_db: failed to get schema information: pq: unrecognized configuration parameter "tables"
Expected Behavior
- The MCP Server should register all database-specific tools for the PostgreSQL database:
- query_banking_db
- execute_banking_db
- transaction_banking_db
- performance_banking_db
- schema_banking_db
- The
list_databasestool should execute successfully when called
Actual Behavior
- Only the
list_databasestool is registered - The tool registration fails with error:
unrecognized configuration parameter "tables" - When attempting to call the
list_databasestool, the operation hangs
Questions
- Is there a specific PostgreSQL version requirement for the MCP Server?
- Are there any additional PostgreSQL configuration parameters needed?
- Is there a way to enable debug logging for more detailed error information?
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 17 (8 by maintainers)
@PauloFavero
I think you should remove this block
And
$HOMEis real path like :D:/MY/demoDBFinal config should :
Thanks @linhdmn for the prompt resolution. I’ll try it later today and let you know.