

Introducing Nile MCP Server
We are excited to announce the launch of Nile MCP (Model Context Protocol) Server. The Model Context Protocol (MCP) is an open protocol that enables seamless integration between LLM applications and external data sources and tools. The Nile MCP supports an extensive set of tools, and we have many plans for the future. The MCP server works with Claude Desktop, Cursor, Cline, and Windsurf and can be invoked in a standalone mode. It supports both the STDIO and SSE modes of transport. Try out the Nile MCP server today. We would love your feedback.
How to think about MCP?
I've encountered many questions about what an MCP is and whether it is useful. One way to understand MCPs is to compare them to the USB port on your laptop. Your laptop can access all the data on its internal storage, but it cannot access data from external devices unless they are connected. When you plug in an external device via the USB port, your laptop can access the data on that device as if it were always a part of its system.
The relationship between a Large Language Model (LLM) and MCPs is quite similar. The LLM has access to the data it was trained on but lacks access to data silos in SaaS services or enterprise databases. MCPs provide a standard way to expose this external data to the LLM. Once the LLM has access to the MCPs, it can utilize them like an extended data source to answer queries, seamlessly integrating the information.

The benefit of standardizing the protocol is to build the MCP once and make it available to every tool in the LLM ecosystem. The standardization also helps build an ecosystem around MCPs, including packaging, discovery, deployment, communication, etc. Without a standard protocol, we will have many bespoke solutions and repeated implementations.
Installation and Configuration
Install the stable version:
npm install @niledatabase/nile-mcp-server
For the latest alpha/preview version:
npm install @niledatabase/nile-mcp-server@alpha
Configuration
Create a .env
file in the root directory with your Nile credentials. If you are setting up Claude Desktop or Cursor, you will pass this in the configuration file.
NILE_API_KEY=your_api_key_here
NILE_WORKSPACE_SLUG=your_workspace_slug
To create a Nile API key, log in to your Nile account, click Workspaces in the top-left, select your workspace, and navigate to the Security section in the left menu.
Using with Cursor, Claude Desktop, Winsurf or Cline
Setting up Cursor
- Go to Preferences > Cursor Settings (⌘,) > MCP
- Click "Add New MCP Server"
- Configure the server:
-
Name:
nile-database
(or any name you prefer) -
Type: Command
-
Command to run
env NILE_API_KEY=your_key NILE_WORKSPACE_SLUG=your_workspace node /absolute/path/to/nile-mcp-server/dist/index.js
your_key
with your Nile API keyyour_workspace
with your Nile workspace slug/absolute/path/to
with the actual path to your project
- Click "Save"
- You should see a green indicator showing that the MCP server is connected
- Restart Cursor for the changes to take effect
Once you have setup Cursor, you should be able to open the chat in agent mode and start asking questions to any database in the Nile workspace.
Setting up Claude Desktop
- Open Claude Desktop
- Go to Settings > MCP Servers
- Click "Add Server"
- Add the following configuration:
{
"mcpServers": {
"nile-database": {
"command": "node",
"args": ["/path/to/your/nile-mcp-server/dist/index.js"],
"env": {
"NILE_API_KEY": "your_api_key_here",
"NILE_WORKSPACE_SLUG": "your_workspace_slug"
}
}
}
}
Replace:
/path/to/your/nile-mcp-server
with the absolute path to your project directoryyour_api_key_here
with your Nile API keyyour_workspace_slug
with your Nile workspace slug
You can look at the docs to configure other IDEs like Windsurf or Cline to setup the MCP server.
Server Transport Modes
The server supports two operational modes:
STDIO Mode (Default)
The default mode uses standard input/output for communication, making it compatible with Claude Desktop and Cursor integrations. The examples of Cursor and Claude above shows this mode. The STDIO. mode is the most popular option today.
SSE Mode
MCP also supports Server-Sent Events (SSE) mode that enables real-time, event-driven communication over HTTP. Nile MCP server supports this.
To enable SSE mode:
- Set
MCP_SERVER_MODE=sse
in your.env
file - The server will start an HTTP server (default port 3000)
- Connect to the SSE endpoint:
http://localhost:3000/sse
- Send commands to:
http://localhost:3000/messages
Example SSE usage with curl:
In terminal 1 - Listen for events
curl -N http://localhost:3000/sse
In terminal 2 - Send commands
curl -X POST http://localhost:3000/messages \
-H "Content-Type: application/json" \
-d '{
"type": "function",
"name": "list-databases",
"parameters": {}
}'
Example Prompts
After setting up the MCP server in Cursor, you can use natural language to interact with Nile databases. Here are some example prompts:
Database Management
Create a new database named "my_app" in AWS_US_WEST_2 region
List all my databases
Get details for database "my_app"
Delete database "test_db"
Creating Tables
Create a users table in my_app database with columns:
- tenant_id (UUID, references tenants)
- id (INTEGER)
- email (VARCHAR, unique per tenant)
- name (VARCHAR)
- created_at (TIMESTAMP)
Create a products table in my_app database with columns:
- tenant_id (UUID, references tenants)
- id (INTEGER)
- name (VARCHAR)
- price (DECIMAL)
- description (TEXT)
- created_at (TIMESTAMP)
Querying Data
Execute this query on my_app database:
SELECT * FROM users WHERE tenant_id = 'your-tenant-id' LIMIT 5
Run this query on my_app:
INSERT INTO users (tenant_id, id, email, name)
VALUES ('tenant-id', 1, 'user@example.com', 'John Doe')
Show me all products in my_app database with price > 100
Schema Management
Show me the schema for the users table in my_app database
Add a new column 'status' to the users table in my_app database
Create an index on the email column of the users table in my_app
Tools
The server provides the following tools for interacting with Nile databases:
Database Management
- create-database
- Creates a new Nile database
- Parameters:
name
(string): Name of the databaseregion
(string): EitherAWS_US_WEST_2
(Oregon) orAWS_EU_CENTRAL_1
(Frankfurt)
- Returns: Database details including ID, name, region, and status
- Example: "Create a database named 'my-app' in AWS_US_WEST_2"
- list-databases
- Lists all databases in your workspace
- No parameters required
- Returns: List of databases with their IDs, names, regions, and status
- Example: "List all my databases"
- get-database
- Gets detailed information about a specific database
- Parameters:
name
(string): Name of the database
- Returns: Detailed database information including API host and DB host
- Example: "Get details for database 'my-app'"
- delete-database
- Deletes a database
- Parameters:
name
(string): Name of the database to delete
- Returns: Confirmation message
- Example: "Delete database 'my-app'"
Credential Management
- list-credentials
- Lists all credentials for a database
- Parameters:
databaseName
(string): Name of the database
- Returns: List of credentials with IDs, usernames, and creation dates
- Example: "List credentials for database 'my-app'"
- create-credential
- Creates new credentials for a database
- Parameters:
databaseName
(string): Name of the database
- Returns: New credential details including username and one-time password
- Example: "Create new credentials for database 'my-app'"
- Note: Save the password when it's displayed, as it won't be shown again
Region Management
- list-regions
- Lists all available regions for creating databases
- No parameters required
- Returns: List of available AWS regions
- Example: "What regions are available for creating databases?"
SQL Query Execution
- execute-sql
- Executes SQL queries on a Nile database
- Parameters:
databaseName
(string): Name of the database to queryquery
(string): SQL query to executeconnectionString
(string, optional): Pre-existing connection string to use for the query
- Returns: Query results formatted as a markdown table with column headers and row count
- Features:
- Automatic credential management (creates new if not specified)
- Secure SSL connection to database
- Results formatted as markdown tables
- Detailed error messages with hints
- Support for using existing connection strings
- Example: "Execute SELECT * FROM users LIMIT 5 on database 'my-app'"
Resource Management
- read-resource
- Reads schema information for database resources (tables, views, etc.)
- Parameters:
databaseName
(string): Name of the databaseresourceName
(string): Name of the resource (table/view)
- Returns: Detailed schema information including:
- Column names and types
- Primary keys and indexes
- Foreign key relationships
- Column descriptions and constraints
- Example: "Show me the schema for the users table in my-app"
- list-resources
- Lists all resources (tables, views) in a database
- Parameters:
databaseName
(string): Name of the database
- Returns: List of all resources with their types
- Example: "List all tables in my-app database"
Tenant Management
- list-tenants
- Lists all tenants in a database
- Parameters:
databaseName
(string): Name of the database
- Returns: List of tenants with their IDs and metadata
- Example: "Show all tenants in my-app database"
- create-tenant
- Creates a new tenant in a database
- Parameters:
databaseName
(string): Name of the databasetenantName
(string): Name for the new tenant
- Returns: New tenant details including ID
- Example: "Create a tenant named 'acme-corp' in my-app"
- delete-tenant
- Deletes tenants in the database
- Parameters:
databaseName
(string): Name of the databasetenantName
(string): Name for the tenant
- Returns: Success if the tenant is deleted
- Example: "Delete tenant named 'acme-corp' in my-app"
Nile MCP server is just the start in introducing more AI driven use cases in Nile. We think it should be possible to support many future use cases with the MCP including agentic workflows.
We're excited to see what you'll build with Nile MCP! Share your experiences, feedback, and questions with us on Discord or GitHub.