create-databaseLABSCO SUMMARY
Provision the database and query it in the same conversation.
Most database servers assume the database already exists. This one creates it, mints credentials, creates tenants and then runs SQL — which suits Nile's tenant-per-customer model, where spinning up isolated data is routine rather than a one-off. Two things to hold onto: a new credential's password is shown once, and delete-database is as reachable as list-databases.
What it is
The Nile platform's MCP server. It covers the whole lifecycle of a Nile Postgres database: create it, get credentials, inspect schema, run queries, and manage the tenants that Nile's multi-tenant model is built around.
What you get
- Databases —
create-database(regionAWS_US_WEST_2for Oregon orAWS_EU_CENTRAL_1for Frankfurt),list-databases,get-database,delete-database - Credentials and regions —
create-credential, which returns a one-time password you must save when shown,list-credentials,list-regions - SQL —
execute-sqlagainst a named database, with credentials created automatically when you do not pass a connection string; results come back as a markdown table with row counts and errors carry hints - Schema —
read-resourcefor a table's columns, types, primary keys, indexes and foreign keys;list-resourcesfor every table and view - Tenants —
list-tenants,create-tenant,delete-tenant
Requirements
A Nile API key and workspace slug, set as NILE_API_KEY and NILE_WORKSPACE_SLUG — create the key from your workspace's Security settings. Install @niledatabase/nile-mcp-server with npm (the package ships a built dist/index.js), then register that file with node in Claude Desktop or Cursor, passing those two variables to it. Stdio is the default; set MCP_SERVER_MODE=sse to serve over HTTP instead, with an events endpoint at /sse and commands posted to /messages. MIT.
Setup effort
One command plus a key — npm install @niledatabase/nile-mcp-server, then supply credentials
USE CASES
Standing up a database for a new project
Check the available regions, create the database there, then mint the credentials you will connect with.
Understanding a schema you inherited
List the tables and views, then read the columns, keys and relationships of the ones that matter.
Answering a data question directly
Run the query against the named database and read the results as a table in the chat.
Onboarding a customer in a multi-tenant app
Create the tenant, then insert its first rows with the tenant ID in place.
13 tools
Listed in project docs. Your client may show a different list.
list-databasesget-databasedelete-databaselist-credentialscreate-credentiallist-regionsexecute-sqlread-resourcelist-resourceslist-tenantscreate-tenantdelete-tenantBEFORE YOU INSTALL
What to know first
Tools you get
13 tools named in the project's documentation.
Requires
- NILE_API_KEY in your environment
- NILE_WORKSPACE_SLUG in your environment
Where it runs
The documented client runs the server on your machine.
INSTALLATION
Connect your client
Server setup
npm install @niledatabase/nile-mcp-serverMCP Clients
Claude Desktop
{
"mcpServers": {
"nile-database": {
"command": "node",
"args": [
"<YOUR_PATH_TO_NILE_MCP_SERVER>/dist/index.js"
],
"env": {
"NILE_API_KEY": "<YOUR_NILE_API_KEY>",
"NILE_WORKSPACE_SLUG": "<YOUR_NILE_WORKSPACE_SLUG>"
}
}
}
}<YOUR_PATH_TO_NILE_MCP_SERVER> is the full path to node_modules/@niledatabase/nile-mcp-server in the folder where you ran npm install. The published package already contains dist/index.js, so there is nothing to build.