Connections · stop 8 of 12
setup_connection
Detects or creates a connection from what's already on your machine.
Works in read modeSaves to your nexql-mcp setupTool sets: meta · full
You might ask
“Connect to the database this project uses.”
Your assistant may call setup_connection to answer.
How it works
- Looks at environment variables such as
DATABASE_URL, workspace files and saved settings. - A password given here goes to the OS keyring, never to a file in plain text. Prefer
add_database, which keeps the password out of the chat entirely.
Parameters
dbnamestring- Database name to connect to.
hoststring- Database server hostname.
interactiveboolean- Prompt (elicit) for missing credentials instead of failing. Default false.
namestring- Profile name to assign/detect.
passwordstring- Database role password. Never written to disk in plaintext — stored in the OS keyring, or the call fails with the password_command/password_file alternative.
portnumber- Database server port (default 5432).
sslmodestring- libpq sslmode value, e.g. "disable", "require", "verify-full".
urlstring- Full postgres:// connection URL; if given, host/port/dbname/user/password are ignored.
userstring- Database role/username.
What your assistant reads
The description nexql-mcp sends with the tool. It's how the assistant decides when to use it.
Automatically detect or configure a database connection. Scans environment variables, workspace files, and local settings, eliciting missing credentials when supported.